[Insight-developers] Analyze format problema

Luis Ibanez luis.ibanez at kitware.com
Sat Apr 19 10:45:05 EDT 2008


Hi Ivan,

The Analyze file format has restrictions on the image orientations
that it supports.

You could avoid this problem by using the Nifti writer instead of
the Analyze ImageIO.


Simply remove the line:

          writer->SetImageIO( itk::AnalyzeImageIO::New() );


The new default manager for "hdr" files in ITK is the Nifti writer.


We assume here that you are using a fairly recent version of ITK....


     Regards,


         Luis


----------------
ivan gm wrote:
> Hi!
> 
> I've a problem when i run the code bellow:
> 
>             typedef itk::VTKImageToImageFilter<ImageType> VTKConnectorType;
>             VTKConnectorType::Pointer connectorVtk = 
> VTKConnectorType::New();
>             connectorVtk->SetInput( this->pvtkIslandRemoval->GetOutput() );
>             connectorVtk->Update();
>             typedef itk::ImageFileWriter<ImageType> WriterType;
>             WriterType::Pointer writer = WriterType::New();
>             writer->SetFileName(cFileDialog.GetPathName() + ".hdr");
>             writer->SetImageIO( itk::AnalyzeImageIO::New() );
>             writer->SetInput( connectorVtk->GetOutput() );
>             writer->Update();
> 
> In the screen appears the following message in a new window:
>      WARNING: In .\itkAnalyzeImageIO.cxx, line 1307
>      AnalyzeImageIO (128E2CE8): ERROR: Analyze 7.5 File Format Only 
> Allows RPI, PIR, and RIP Orientation
> 
> Instead of the message, the writer writes the image.hdr and the 
> image.img files in a proper way, so how can I avoid the message and the 
> new window?
> 
> Thanks a lot.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers


More information about the Insight-developers mailing list