<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi,</div><div><br></div><div>After applying the patch, we unfortunately had another issue with that file from one of our customers.</div><div><br></div><div>The orient code of the header is 3 (flipped transverse), which was not handled by the itkAnalyzeIO. </div><div><br></div><div>Applying the patch partially solved the issue, but the image is still flipped.</div><div><br></div><div>I noted a comment in itkAnalyzeDbh.h (I am using ITK 3.20).</div><div><br></div><div>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).</div><div><br></div><div>I'd first like to confirm that behaviour.</div><div>I'd also like to have an idea of if/how easy or hard it would be to solve that issue.</div><div><br></div><div>Thank you,</div><div><br></div><div>Mathieu</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); ">/**< The 'orient' field in the data_history structure specifies the primary</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> orientation of the data as it is stored in the file on disk. This</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> usually corresponds to the orientation in the plane of acquisition,</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> given that this would correspond to the order in which the data is</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> written to disk by the scanner or other software application.</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); min-height: 15px; "><br></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> It would be vary rare that you would ever encounter any old ANALYZE 7.5</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> files that contain values of 'orient' which indicate that the data has been</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> 'flipped'. The 'flipped flag' values were really only used internal to the</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> Analyze program to precondition data for fast display in the Movie module,</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> where the images were actually flipped vertically in order to accommodate</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> the raster paint order on older graphics devices. The only cases you will</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> encounter will have values of 0, 1, or 2.</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); min-height: 15px; "><br></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - hdr->orient "MayoClinic/Analyze" Origin dims[1] dims[2] dims[3]</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - ======================================================================</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - 0 transverse-unflipped IRP R->L P->A I->S</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - 1 coronal-unflipped IRP R->L I->S P->A</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - 2 sagittal-unflipped IRP P->A I->S R->L</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - 3 transverse-flipped IRA R->L A->P I->S</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - 4 coronal-flipped SRP R->L S->I P->A</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - 5 sagittal-flipped ILP P->A I->S L->R</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - Where the Origin disignators are with respect to the patient</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - [(I)nferior|(S)uperior] [(L}eft|(R)ight] [(A)nterior|(P)osterior]</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); min-height: 15px; "><br></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> SPECIAL NOTE: THE BEHAVIOR OF THIS IO ROUTINE DIFFERS FROM THAT OF ANALYZE!</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> NO RE_ORIENTATION OF THE DATA WILL OCCUR IN THE ITK IMPLEMENTATION.</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> Upon loading into the Analyze program, all data is reoriented into the</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> 3D Analyze Coordinate System.</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> The orientation of patient anatomy in the 3D Analyze Coordinate System</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> has a fixed orientation relative to each of the orthogonal axes.</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> This coordinate system does fix the origin in the subject's</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> Inferior-Right-Posterior location relative to anatomy, with a</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> left-handed coordinate system for specification of the other</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> anatomy relative to the axes as given here:</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - X-Y plane is Transverse</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - X-Z plane is Coronal</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); "> - Y-Z plane is Sagittal</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); ">where:</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); ">- X axis runs from patient right (low X) to patient left (high X)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); ">- Y axis runs from posterior (low Y) to anterior (high Y)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(0, 132, 0); ">- Z axis runs from inferior (low Z) to superior (high Z)</div></div><div><br></div><div><br></div><br><div><div>On 2013-03-25, at 6:26 PM, Sean McBride <<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Mon, 25 Mar 2013 22:05:45 +0000, Matt McCormick said:<br><br><blockquote type="cite">After adding some missing colons :-)<br></blockquote><br>Whoops! I blame my coworker! :)<br><br><blockquote type="cite">the patch has been pushed:<br><br> <a href="http://itk.org/gitweb?p=ITK.git;a=c">http://itk.org/gitweb?p=ITK.git;a=c</a><br>ommit;h=a9fd63e26738f3c1449133c8077c67e072d1202a<br></blockquote><br>Thanks!<br><br>-- <br>____________________________________________________________<br>Sean McBride, B. Eng <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>Rogue Research <a href="http://www.rogue-research.com">www.rogue-research.com</a> <br>Mac Software Developer Montréal, Québec, Canada<br><br><br>_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-developers<br></blockquote></div><br></body></html>