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

Sara Rolfe smrolfe at u.washington.edu
Tue Apr 3 17:09:30 EDT 2012


It seems like it would be easiest to manually reverse the pixel rows,  
but I'm not clear on how this would change the orientation in the  
image information.  Isn't this necessary to change the Analyze header  
orientation option to "CORONAL" instead of "TRANSVERSE", or am I  
missing something?

If I use the OrientImageFilter on the reconstructed 3D volume I  
thought AnalyzeImageIO would get the new orientation from this image.   
Is this correct?  It is true that I'm not sure how to choose the  
correct orientation to get the output I need.

I am wondering if there is an easier way to accomplish this.  Other  
image readers allow a stack of BMPs to be read into a 3D volume and  
let the user to input the orientation (eg Transverse or Coronal) and  
voxel resolution.  It seems strange that the ITK forces the user to  
use the default orientation (Transverse) and resolution.

Thanks,
Sara

On Apr 3, 2012, at 1:48 PM, Kent Williams wrote:

> 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