[Insight-users] Problem writing to Analyze file format
Oleksandr Dzyubak
adzyubak at gmail.com
Wed Jun 11 10:59:17 EDT 2008
Hi Daniele,
Thanks for a good explanation.
Since all my images in Analyze75 format, I am very interested in the
discussions on this topic.
I have couple questions if I may.
1) Analyze75, as well as NIfTI, uses two separate file approach:
a header where all image info is encoded and a data file with pixel values.
In such an approach, as soon as you know a priori info about the image,
you even do not need a header at all since you can read in the image as
a raw data file.
That means that all the directional info you might need is always there,
in a data file.
The only problem is that the Analyze75 header does not have a tag with
that info, right?
The Analyze75 header size is 348 vs 352 for NifTI. Does it mean that
those extra bites can hold all the directional info in case of the NIfTI
format
and well treated by the ITK filters?
2) OK. The ITK library always complains about the "directional poor
performance" of the Analyze image format.
But a lot of people are still using that format. And it is not that I am
not capable to
convert it to, let say, DICOM or something else.
The Analyze75 images are still in practice and I have to live with that.
The question is since the Analyze image format has "poor performance" in
a sense
of the directional info, how does it affect the final results after ITK
filters have been used
on those images? Do any "info corruptions/changes" squeeze in
automatically into
the image info tags afterwards since it might be implemented in a filter
by some defaults?
Thanks for you informative explanation,
Alex
Daniele Domenichelli wrote:
> 2008/6/5 Brandon Lin <brandon.lin at gmail.com>:
>
>> If I use AnalyzeImageIO, I got an output window saying "ERROR: Analyze 7.5
>> File Format Only Allows RPI, PIR, and RIP Orientation".
>>
>
>
> Analyze format (as you can read in the error) supports only 3 of the
> 48 possible orientations of a 3D image. Nifti format supports all of
> them.
> You can find some useful information about orientation here:
>
> http://www.insight-journal.org/InsightJournalManager/download_pdf.php?pubid=62_1.pdf
> http://www.wideman-one.com/gw/brain/orientation/orientterms.htm
>
> but pay attention because ITK terminology is exactly the opposite then
> the one used in the last document (For example "R" in ITK means that
> the origin is in the rightmost point of the image while in this
> tutorial means that index increases from left to right)
>
>
> You can try reorienting the image before writing them by using
> OrientImageFilter:
>
>
> typedef itk::OrientImageFilter<ImageType,ImageType> OrienterType;
> OrienterType::Pointer orienter = OrienterType::New();
> orienter->UseImageDirectionOn();
> orienter->SetDesiredCoordinateOrientation(itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RPI);
> //or your desired orientation
> orienter->SetInput(last_filter->GetOutput());
> writer->SetInput(orienter->GetOutput());
>
>
> Best Regards,
> Daniele
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list