[Insight-users] question about the resampler and imagewriter
Luis Ibanez
luis.ibanez at kitware.com
Mon Oct 26 22:39:58 EDT 2009
Hi Lewes,
We will need more information....
1) By "resampler" do you mean the "itkResampleImageFitler" ?
or are you referring to any of the specific resampling examples
in the directory Insight/Examples/Filtering ?
2) If you are using the itkResampleImageFilter
then, please post to the list *all* the parameters
that you are passing to this filter, including:
2.1) Output Origing
2.2) Output Spacing
2.3) Output Direction and
The Transform that you are connecting to the
resampling filter.
3) The case where you just read the image and write it
back (without transformation), seem to indicate a
problem with the Analyze image that you are using
as input. A common problem with Analyze is that
this file format (in some versions..) only supports
three specific anatomical orientations.
Are you using a try/catch block around the Update()
call of your reader and writer ?
4) Please add a line, such as:
reader->GetOutput()->Print( std::cout );
Just after the call to
reader->Update();
and post the output that you get to the list.
Thanks
Luis
----------------------------------------------------------------------
2009/10/26 liulewes <lewes_infor at hotmail.com>:
> Hi:
> I have tested the resampler with ver 3.14.0 and ver 3.16.0 under vista64.
> It did well on 2D images, but not on 3D volumes.
>
> I have a volume with spacing[1.2,1.2.1] size[256,256,455] origin [0,0,0] in
> analyze format. Firstly, I just read the volume and saved it using the
> writer, it didn't give me the correct volume but a blank one.
> Then I tested the resampler with exactly the same parameters as the original
> data;however, it won't work until I set origin = [ 0, -1.2*256,0]. And the
> result seemed to have been rotated around z-axis by 180 degrees. Well
> according the document for ver 2.4 it shouldn't be like this. And I wonder
> if the will affect my registration pipeline since I think it might involve
> resampling during the iterations. Anyone can give some suggestions? Thanks.
>
> Best,
>
> Lewes
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list