[Insight-users] Stack on resampling a volume, please help.

Juliette Deniau juliette.deniau at yahoo.fr
Tue Sep 29 07:05:19 EDT 2009


Hi Luis and itk users, 
Hope some one can help me, I have posted my question but I still with no answer.
I’m always stack on the problem of resmapling a volume using AffineTransform. What I want to do is simply sclaing a volume to another volume which differ in size(it depends in the data, some times I want to scale down and sometime I want to scale up the volume so that its size will be the same as a predefined size) … I dug in the itk maling list and I have found a code writen by Mr Luis in the link http://www.itk.org/pipermail/insight-users/2004-February/006509.html.
So I used the a modified code to do my scaling (atached):
(1 instead to use “itkNearestNeighborInterpolateImageFunction” I use "itkNearestNeighborInterpolateImageFunction”  as interpolater,  and 
(2 instead of use “itkIdentityTransform” I use “itkAffineTransform” and I set it to identity.
So basically it’s the same code.
When I use for instance brainweb165a10f17.mha" as output volume and its segmenetd volume(white matter)as input volume, the result is fine. But when I use the segmented volume as output volume and brainweb165a10f17.mha" as input volume, the output volume is black with no information.
As the two volumes have the same size, origine and spacing, I could not understand the origin of this problem? 
Also is there any rule to resize a volume(up or down)regarding the size,origine and spacing of the original volume and the desired output volume size.
I have upload the two volumes at: http://www.kitware.com/cgi-bin/uploadfile.cgi

Thank you in advance for your time.
Juliette  whos wainting with inpatiance for your answers.


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090929/2de1c845/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ResamplingVolume_Juliette.cpp
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090929/2de1c845/attachment.asc>


More information about the Insight-users mailing list