[Insight-developers] Flipped Analyze 7.5 files

Mathieu Coursolle mathieu at rogue-research.com
Fri Apr 5 16:28:06 EDT 2013


Hi,

After applying the patch, we unfortunately had another issue with that file from one of our customers.

The orient code of the header is 3 (flipped transverse), which was not handled by the itkAnalyzeIO. 

Applying the patch partially solved the issue, but the image is still flipped.

I noted a comment in itkAnalyzeDbh.h (I am using ITK 3.20).

It looks like orient codes 3, 4 and 5 are expected to have the middle axis flipped since they use a different coordinate system as 0, 1 and 2 (left-handed vs right handed).

I'd first like to confirm that behaviour.
I'd also like to have an idea of if/how easy or hard it would be to solve that issue.

Thank you,

Mathieu

/**< The 'orient' field in the data_history structure specifies the primary
                                      orientation of the data as it is stored in the file on disk.  This
                                      usually corresponds to the orientation in the plane of acquisition,
                                      given that this would correspond to the order in which the data is
                                      written to disk by the scanner or other software application.

                                      It would be vary rare that you would ever encounter any old ANALYZE 7.5
                                      files that contain values of 'orient' which indicate that the data has been
                                      'flipped'.  The 'flipped flag' values were really only used internal to the
                                      Analyze program to precondition data for fast display in the Movie module,
                                      where the images were actually flipped vertically in order to accommodate
                                      the raster paint order on older graphics devices.  The only cases you will
                                      encounter will have values of 0, 1, or 2.

                                      - hdr->orient  "MayoClinic/Analyze"   Origin   dims[1]  dims[2]  dims[3]
                                      - ======================================================================
                                      - 0            transverse-unflipped   IRP       R->L     P->A    I->S
                                      - 1            coronal-unflipped      IRP       R->L     I->S    P->A
                                      - 2            sagittal-unflipped     IRP       P->A     I->S    R->L
                                      - 3            transverse-flipped     IRA       R->L     A->P    I->S
                                      - 4            coronal-flipped        SRP       R->L     S->I    P->A
                                      - 5            sagittal-flipped       ILP       P->A     I->S    L->R
                                      - Where the Origin disignators are with respect to the patient
                                      - [(I)nferior|(S)uperior] [(L}eft|(R)ight] [(A)nterior|(P)osterior]

                                      SPECIAL NOTE:  THE BEHAVIOR OF THIS IO ROUTINE DIFFERS FROM THAT OF ANALYZE!
                                      NO RE_ORIENTATION OF THE DATA WILL OCCUR IN THE ITK IMPLEMENTATION.
                                      Upon loading into the Analyze program, all data is reoriented into the
                                      3D Analyze Coordinate System.
                                      The orientation of patient anatomy in the 3D Analyze Coordinate System
                                      has a fixed orientation relative to each of the orthogonal axes.
                                      This coordinate system does fix the origin in the subject's
                                      Inferior-Right-Posterior location relative to anatomy, with a
                                      left-handed coordinate system for specification of the other
                                      anatomy relative to the axes as given here:
                                      - X-Y plane is Transverse
                                      - X-Z plane is Coronal
                                      - Y-Z plane is Sagittal
where:
- X axis runs from patient right (low X) to patient left (high X)
- Y axis runs from posterior (low Y) to anterior (high Y)
- Z axis runs from inferior (low Z) to superior (high Z)



On 2013-03-25, at 6:26 PM, Sean McBride <sean at rogue-research.com> wrote:

> On Mon, 25 Mar 2013 22:05:45 +0000, Matt McCormick said:
> 
>> After adding some missing colons :-)
> 
> Whoops!  I blame my coworker! :)
> 
>> the patch has been pushed:
>> 
>> http://itk.org/gitweb?p=ITK.git;a=c
>> ommit;h=a9fd63e26738f3c1449133c8077c67e072d1202a
> 
> Thanks!
> 
> -- 
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com 
> Mac Software Developer              Montréal, Québec, Canada
> 
> 
> _______________________________________________
> 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://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-developers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20130405/8b1f47ca/attachment.htm>


More information about the Insight-developers mailing list