[Insight-users] "Zoom -> Paste -> Write" pipeline problem

Arturo Caissut arturo_caissut at tiscali.it
Thu Sep 10 21:10:54 EDT 2009


Hi all,

I'm in a little trouble with the final part of a small utility I'm
writing, and I'd appreciate very much your help to solve it, as usual.

The goal of the program I'm writing is to extract one off the 116 parts
of the Tzourio-Mazoyer's AAL atlas from it, and then save such a part on
an arbitrary sized 3D image. It doesn't really matter where this
segmented part is situated, nor if it is scaled (in a geometrical sense)
or not, since the output of my program is supposed to become the input
of another tool I already wrote, that makes the user able to adjust size
and position of the segmented image at will: I just need a bunch of
correctly shaped white pixels somewhere on a black image, with the only
(deadly for me) condition that atlas image and output image must have
the same voxel size.

I wrote all the related and unrelated stuff, then I started with a
threshold filter to obtain an RGB image with black background and white
voxels where the segmented part is situated. It obviously worked. Now,
since I don't know which part my user should want to obtain, I won't try
to "cut away" at runtime a right sized area around the segmented part to
save it as an output image, but I'll reduce (or enlarge) the whole atlas
thresholded image (let's call this "the atlas size segmented image")
instead, and then I'll paste such a reduced (or enlarged) version of the
image on a black properly sized "collector" image I created.

Needing a way to "zoom" the atlas segmented image, I thought I could
easily do it by resetting its spacing and regions values (multiplying
these values by a "scale" needed factor deduced comparing the output
dimensions with the original ones), but shall I be able to paste an
image with -let's say- spacing = (0.5, 0.5, 0.5) on another one with
spacing = (1, 1, 1)? Since ITK has a "pixel based mind", I think that'd
be a mistake, wouldn't it?
Perhaps I should try an "hybrid" approach and copy the atlas size
segmented image on a vtkImageData to handle the image from an "higher"
point of view?


Thank you for your time, I'm sorry if I've been a little chaotic in
explaining my situation but it's 3 am here and I've worked at this
project for three full days now, so I really, really, REALLY need to sleep.
Arturo


More information about the Insight-users mailing list