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

Kent Williams nkwmailinglists at gmail.com
Tue Apr 3 16:48:37 EDT 2012


The OrientImageFilter is 3D only.  The easiest thing for you to do if
your images are showing up left/right swapped when converted to
Analyze would be to manually reverse the pixel rows.

I assume you're going from BMP->itk::Image<pixType,2>. If you're
assembling a bunch of BMP files into a 3D Volume, then the
OrientImageFilter might be the thing to use.  But for that to work
properly you'd have to know what the orientation for the image you're
constructing is.

On Tue, Apr 3, 2012 at 3:16 PM, Sara Rolfe <smrolfe at u.washington.edu> wrote:
> Hi Kent,
>
> Thanks, that makes sense.  Unfortunately I am stuck using the Analyze
> format.
>
> Would I use the Orientation image filter that Saurabh mentioned to change
> the direction cosines?
>
> Thanks,
> Sara
>
>
> On Apr 3, 2012, at 10:45 AM, Kent Williams wrote:
>
>> When you read in the BMP file, the image orientation defaults to
>> identity.  You can change the Direction cosines for the image to
>> reflect what you want for the output image.  The ImageIO object that
>> does the actual writing uses the orientation/spacing/origin
>> information contained in the image that you're writing.
>>
>> I guess there's a reason you're using Analyze format, but I'd
>> recommend against it, as it's very limited, especially when it comes
>> to correct representation of orientation.
>>
>> On Mon, Apr 2, 2012 at 5: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