[Insight-users] ITK Writer Error

David Doria daviddoria at gmail.com
Sun Apr 3 14:30:37 EDT 2011


On Sun, Apr 3, 2011 at 2:01 PM, Abayiz <abayiz at yahoo.com> wrote:
> Hello,
>
> Just as the title indicates, I encountered an error with ITK writer. I found that when I let itk write the output as a file, it writes it in the inverse direction, i.e, if I try to just read and write an image doing nothing else, the result image is the inverse of the input image. What is this called? Is there any suggestions?
> Here is the itk writer I used:
>
> ********************************
> typedef itk::Image< float, 2 >             ImageType;
> typedef itk::ImageFileWriter < ImageType > WriterType;
>  WriterType::Pointer writer = WriterType::New();
>  writer->SetFileName(argv[2]);
>  writer->SetInput(output);
>  writer->Update();
> *******************************
> The full code is here:
> http://www.vtk.org/Wiki/ITK/Examples/Functions/GuassianBlurImageFunction

I wouldn't use the GuassianBlurImageFunction example as a test for
this. You should just write a short program that reads an image and
then writes it back out. Give this a try and let us know if the
problem still happens. And what do you mean by "inverse direction"? Is
the image flipped in X? Y? Both?

David


More information about the Insight-users mailing list