<div>Thank you Daniele and Oleksandr. There is a lot of good information.</div>
<div> </div>
<div>I was trying to use the orient image filter to re-orient the images to RPI direction as suggested by Daniele. However, I kept getting this exception druing writer->Update(): </div>
<div>
<p>ExceptionObject caught !</p>
<p>itk::ExceptionObject (0126F420)<br>Location: "unknown"<br>File: D:\InsightToolkit-3.2.0\Code\BasicFilters\itkPermuteAxesImageFilter.txx<br>Line: 104<br>Description: Order indices must not repeat</p></div>
<div>The code is very simple as below:</div>
<div> typedef itk::OrientImageFilter<ImageType,ImageType> OrienterType;<br> OrienterType::Pointer orienter = OrienterType::New();<br> orienter->UseImageDirectionOn();<br> orienter->SetDesiredCoordinateOrientation(itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RPI);<br>
orienter->SetInput(reader->GetOutput());</div>
<div> writer->SetInput( orienter->GetOutput());</div>
<p> try<br> { <br> writer->Update();<br> }</p>
<p> catch( itk::ExceptionObject & err)<br> {<br> std::cerr << "ExceptionObject caught !" << std::endl;<br> std::cerr << err << std::endl;<br> return EXIT_FAILURE;<br> }:</p>
<div> </div>
<div>Any ideas? Any comments or feedback is greatly appreciated.</div>
<div> </div>
<div>Regards,</div>
<div>Brandon</div>
<div><br><br> </div>
<div><span class="gmail_quote">On 6/13/08, <b class="gmail_sendername">Daniele Domenichelli</b> <<a href="mailto:daniele.domenichelli@gmail.com">daniele.domenichelli@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Oleksandr Dzyubak wrote:<br>> The only problem is that the Analyze75 header does not have a tag with<br>
> that info, right?<br><br>No, analyze has a tag "orient" (1 byte) but it has only 6 valid values<br><br> 0 transverse unflipped<br> 1 coronal unflipped<br> 2 sagittal unflipped<br>
3 transverse flipped<br> 4 coronal flipped<br> 5 sagittal flipped<br><br>Nifti uses quaternion for orientation. See nifti header if you are<br>interested:<br><br> <a href="http://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h">http://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h</a><br>
<br><br><br>> The Analyze75 header size is 348 vs 352 for NifTI. Does it mean that<br>> those extra bites can hold all the directional info in case of the NIfTI<br>> format and well treated by the ITK filters?<br>
<br>No bytes from 349 to 352 are used for extensions.<br>Nifti header in not necessarily 352 bytes, it can contain extensions for<br>example to contain dicom tags (see nifti header for details)<br>Nifti stores informations about orientations of the image in bytes that<br>
were not used in Analyze<br><br><br>> The question is since the Analyze image format has "poor performance" in<br>> a sense<br>> of the directional info, how does it affect the final results after ITK<br>
> filters have been used<br>> on those images? Do any "info corruptions/changes" squeeze in<br>> automatically into<br>> the image info tags afterwards since it might be implemented in a filter<br>> by some defaults?<br>
<br>I think that the only thing you should take care of when using analyze<br>files is that you can't write them in any direction, so you may need to<br>reorient the image.<br><br>I'm not sure about this anyway, because I mostly use nifti, maybe<br>
someone else on the mailing list who uses analyze can tell you something<br>more...<br><br><br>Regards,<br>Daniele<br></blockquote></div><br>