[Insight-users] Writing Analyze file and specifying header properties

Saurabh Garg srbh.garg at gmail.com
Mon Apr 2 22:54:31 EDT 2012


Hi Sara,

I am not sure if setting the orientation would help you but you can
set the orientation using the Orientation image filter
(http://www.itk.org/Doxygen/html/classitk_1_1OrientImageFilter.html).
The code would look something like:
----------------------
typedef itk::OrientImageFilter<ImageType, ImageType> OrientFilterType;
OrientFilterType::Pointer orienter =   OrientFilterType::New();
orienter->SetInput(image);
orienter->SetUseImageDirection(true);
orienter->SetDesiredCoordinateOrientation(itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RPI);
orienter->Update();
------------

For other orientation types have a look at the following link:
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkSpatialOrientation.h?view=markup&root=Insight&revision=1.1

Hope this Helps.

Cheers!
Saurabh


On Mon, Apr 2, 2012 at 3:43 PM, Sara Rolfe <smrolfe at u.washington.edu> wrote:
> Hello,
>
> I would like to read a file of bmp images and write them as a 3DAnalyze
> image.  I have implemented this using the ImageSeriesReader.  However, when
> the output is written as an Analyze volume, the default values for
> orientation and voxel resolution are incorrect.  This causes the output
> image to be mirrored.  I've not been able to find an explanation of how to
> set these properties and would appreciate help figuring this out.
>
> Thanks,
> Sara
>
>
> _____________________________________
> 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.php
>
> 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