Resampling

Hi guys,

I wanna resample a spread with a 768 count into a 64 count spread.
I am trying different combinations, but I cant get the result I need.

The patch is very small and self explanatory… i am essentially trying to lower the resultion of the shape which is formed.

Any ideas?

Thanks.

resample.v4p (15.1 kB)

IS THIS A BUG??? (win 7 64 bit)

Hmmzz… I am discovering something very weird… I get -1000 on some slices, any one else sees this?

A single shot Resample is not going to work, since for the Resample node you are inserting an array of 1x768 slices. It doesn’t know you are working with rows and columns.

The idea is, take every 4 slices, look at the average (use: mean (spectral) ) and if they are above 0.5, than that cluster will become a one.
Next we rotate the grid (use: SwapDim (spreads) ) and we do that again, than we rotate it back.

I made a patch, and the idea works :)

edit: You could replace Mean with Resample (Mode: Linear, Binsize -4) but the debugging mode says that mean is better for performance.

IOboxToggleBug.v4p (17.7 kB)
Mean.v4p (10.2 kB)

Awesome.

Thanks, that’s exactly what I was looking for.

But about that -1000 bug, am I crazy or is it really there???

@west: don’t worry about the -1000. 1000/-1000 is the default for an ioboxes max/min. so it seems that this iobox was a normal one before having been turned into toggles and not all toggles have been triggered at least once to set its value to 0/1. something like that…