<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Nadan,<div><span class="Apple-tab-span" style="white-space:pre">        </span>Thank you for pointing this out. The comment is erroneous. I will fix the comment in the version that is committed to git.</div><div>Don</div><div><br><div><div>On Dec 2, 2010, at 7:09 PM, nadan zhu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br>Sorry for not relevant to your issues. But i found inconsistency in itkPhilipsRECImageIO.cxx line 766<br><br> // Sagittal - the REC data appears to be stored as anterior-posterior,<br> // superior-inferior, and right-left. ///////////////////////////////////////////////////should be left-right ?<br>
// Verified using marker on right side of brain.<br> coord_orient = SpatialOrientation::ITK_COORDINATE_ORIENTATION_ASL;<br><br><br><br>nadan<br><br><div class="gmail_quote">On Thu, Dec 2, 2010 at 2:06 PM, Don Bigler <span dir="ltr"><<a href="mailto:dcb210@psu.edu">dcb210@psu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; position: static; z-index: auto; ">All,<br>
When I wrote itkPhilipsRECImageIO I correctly identified the image storage orientation as R-L, A-P, I-S (RAI) for axial images, ASL for sagittal, and RSA for coronal using a marker on the right side of a brain image. Currently, the reader sets the direction cosines using the SpatialOrientation class. However, the reader does not currently (ITK 3.20) set the correct origin or modify the direction cosines according to rotations specified in the PAR header. I'm in the process of implementing these features using itkNiftiImageIO as an example and I'm discovering some apparent inconsistencies/problems in itkNiftiImageIO.<br>
1. First, I noticed that qform_xorient, qform_yorient, and qform_zorient don't appear to used anywhere in the reader to determine the storage orientation of the NIFTI image. Unless nifticlib uses these values internally, this would appear to be a bug.<br>
2. Second, the origin and direction cosines are automatically negated for the first two dimensions (indexes 0 and 1). Why? I found a previous posting mentioning that NIFTI images are stored RAS and ITK uses LPS. However, as I already mentioned this may not be the case if qform_xorient, qform_yorient, and qform_zorient are not set to RAS. I may be missing something from a previous posting, but there appears to be an inconsistency.<br>
Having said all this, how should I set the direction cosines and origins for itkPhilipsRECImageIO?<br>
-Don<br>
<br>
Don Bigler, Ph.D.<br>
Postdoctoral Scholar<br>
Center for Emerging Neurotechnology and Imaging<br>
Penn State University College of Medicine<br>
500 University Dr.<br>
Psychiatry, C5518<br>
Hershey, PA 17033<br>
Phone: (717) 531-7963<br>
Fax: (717) 531-6491<br>
<br>
Hershey Confidentiality Statement:<br>
<br>
This message (including any attachments) contains information intended for a specific individual(s) and purpose that may be privileged, confidential or otherwise protected from disclosure pursuant to applicable law. Any inappropriate use, distribution or copying of the message is strictly prohibited and may subject you to criminal or civil penalty. If you have received this transmission in error, please reply to the sender indicating this error and delete the transmission from your system immediately.<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br>
</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Don Bigler, Ph.D.</div><div>Postdoctoral Scholar</div><div>Center for Emerging Neurotechnology and Imaging<br>Penn State University College of Medicine</div><div>500 University Dr.</div><div>Psychiatry, C5518<br>Hershey, PA 17033 </div><div>Phone: (717) 531-7963<br>Fax: (717) 531-6491<br><br>Hershey Confidentiality Statement:<br><br>This message (including any attachments) contains information intended for a specific individual(s) and purpose that may be privileged, confidential or otherwise protected from disclosure pursuant to applicable law. Any inappropriate use, distribution or copying of the message is strictly prohibited and may subject you to criminal or civil penalty. If you have received this transmission in error, please reply to the sender indicating this error and delete the transmission from your system immediately.</div></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></body></html>