[Insight-users] Writing Analyze file and specifying header properties
Sara Rolfe
smrolfe at u.washington.edu
Tue Apr 3 13:01:00 EDT 2012
Hi Saurabh,
Thanks for your reply. This looks something like what I need, but the
orientation types don't correspond. I need to change the orientation
from the default TRANSVERSE to CORONAL. When I look at the
AnalyzeImageIO I see a GetDefaultDirection, but don't see a way to
change this. I also don't see a way to set the VoxelDepth,
VoxelHeight, and VoxelWidth.
When I compare the Analyze file that is created to a correct version,
I also see that the ITK version has several NIFTI fields.
Thanks,
Sara
On Apr 2, 2012, at 7:54 PM, Saurabh Garg wrote:
> 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