<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi,</div><div><br></div><div>Thanks, in fact I managed to clarify a few things today. ;)</div><div><br></div><div>In the end, my main issue is now that there doesn't seem</div><div>to have a way to retrieve the original s-form from the NIfTI file</div><div>right ?</div><div><br></div><div>MAthieu</div><div><br></div><br><div><div>On 6-Apr-09, at 4:34 PM, Bill Lorensen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Mathieu,<br><br>I believe that the Coursolle definition is the opposite of the ITK<br>definition. The Coursolle definition is the same as the<br>OrientImageFilter direction.<br><br>In other words, ITK says that<br>X increasing from Right to Left<br>Y increasing from Anterior to Posterior<br>Z increasing from Inferior to Superior<br>is LPS.<br><br>Dicom/ITK name the axes based on the positive name of the axis.<br>OrientImageFilter (and Meta and nifti and Analyze) name the axes based<br>on the negative name of the axis.<br><br>So, if you tell OrientImageFilter that you want RAI, you will get an<br>ITK direction of LPS.<br><br>Confused??? See my recent e-mail.<br><br>Bill<br><br>On Mon, Apr 6, 2009 at 3:05 PM, Mathieu Coursolle<br><<a href="mailto:mcoursolle@rogue-research.com">mcoursolle@rogue-research.com</a>> wrote:<br><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite">Just to clarify...what I meant by RAI is:<br></blockquote><blockquote type="cite">X increasing from Right to Left<br></blockquote><blockquote type="cite">Y increasing from Anterior to Posterior<br></blockquote><blockquote type="cite">Z increasing from Inferior to Superior<br></blockquote><blockquote type="cite">So is ITK the opposite (LPS) ? Or do we mean the same ?<br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite">Mathieu<br></blockquote><blockquote type="cite">On 6-Apr-09, at 2:47 PM, Bill Lorensen wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I believe, that the OrientImageFilter defines its orientations the<br></blockquote><blockquote type="cite">reverse of dicom/itk. In other words, to achieve RAI in ITK's world,<br></blockquote><blockquote type="cite">you should specify LPS to OrientImageFilter. But, LPS is ITK's<br></blockquote><blockquote type="cite">coordinate system. So you should not need to use OrientImageFilter.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Confused... I am,. See my recent e-mail regarding this.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Bill<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Mon, Apr 6, 2009 at 2:37 PM, Mathieu Coursolle<br></blockquote><blockquote type="cite"><<a href="mailto:mcoursolle@rogue-research.com">mcoursolle@rogue-research.com</a>> wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks again.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Maybe I did not understand the way ITK stores its direction and origin<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">then...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">My NIfTI file doesn't have a qform, but it has a sform that defines the<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">transform to MNI-152 space.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Limited to the data size, this space is bound to :<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Left is -90 mm<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Right is +90 mm<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Posterior is -126 mm<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Anterior is 90 mm<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Inferior is -72 mm<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Superior is +108 mm<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">What I am looking for is a 4 x 4 matrix I could use to multiply an index in<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">RAI<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">to get the location in MNI-152 space.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I though that the origin was the location of the first voxel in space (in<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">this case MNI-152).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">In this case, 126 is out of my space.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I would expect an origin of (90, 90, -72), since this is the most Right,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Anterior, Inferior point of<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">the data.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I typically read the file using itkNIfTIImageIO, then convert it to RAI<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">using itkOrientImageFilter.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I expect an origin of (90, 90, 72) mm at the ouput of itkOrientImageFilter,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">but I instead get (-90, -90, -72).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">What could I do to get the expected result ? I guess I am missing a<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">transformation somehow...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">MAthieu<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 6-Apr-09, at 1:33 PM, Luke Bloy wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi Mathieu,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">So nothing happens to the data buffer, meaning that its ordering isn't<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">rearranged. the only thing that is changed is the way we relate the i,j,k<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">coordinates to 'world coordinates'.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">the 'origin' in both nifti and itk refers to the world coordinates of the<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">first voxel in the data buffer (0,0,0).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">so with a qform =<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[1, 0, 0, -90]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 1, 0, -126]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 1, -72]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 0, 1]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">you get an origin of (-90 mm, -126 mm, -72 mm), since nifti qforms use RAS<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">as the world frame this means that the (0,0,0) ijk voxel is located 90mm to<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">the left, 126 posterior and 72 mm inferior, to whatever is at 0mm,0mm,0mm<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(in MRI this usually the scanner isocenter). So in itk's LPS world frame<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">the origin should be set to (90,126,-72).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This is unrelated to the itkOrientImageFilter, which does do actually<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">flipping and transposing of the data buffer.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-Luke<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Mathieu Coursolle wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks for your clarifications.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">However, I must admit that I am still a bit confused.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Since NIfTI and ITK have different Left/Right and Anterior/Posterior<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">directions,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I admit that the direction matrix needs to be modified.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Since my image dimension is 181 x 217 x 181, a flip in X means that to<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">change<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">the direction, the new origin is -90 + (181 - 1) = 90.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">A flip in Y however means that the new origin should be -126 + (217 - 1) =<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">90.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Should I then expect instead a GetDirection() and GetOrigin() result of:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[-1, 0, 0, 90]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, -1, 0, 90]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 1, -72]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 0, 1]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Just inverting the sign of the origin would then mean that the world<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">coordinates<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">are centered on (0, 0, 0)mm, which is not the always the case.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Am I right ?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Mathieu<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 6-Apr-09, at 12:13 PM, Luke Bloy wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi all,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">So this is my understanding of how orientations and ITK work.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">the GetDirection and GetOrigin methods in itk::Image return the directional<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">cosines in an LPS world frame. Thus an identity matrix returned by<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">GetDirection() would mean the image is stored in LPS.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The QForm and SForm matrices in the nifti file format are in the RAS world<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">coordinate frame. See<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields/nifti1fields_pages/qsform.html">http://nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields/nifti1fields_pages/qsform.html</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">So Mathieu, what you are reporting is the expected behavior.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">qform (shown by fslhd etc) of<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[1, 0, 0, -90]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 1, 0, -126]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 1, -72]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 0, 1]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">should yield a GetDirection() and GetOrigin of<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-1 0 0 90<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">0 -1 0 126<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">0 0 1 -72<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">0 0 0 1<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Antoine,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Your situation is more confusing, I'm not familiar with dcm2nii, but it<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">isn't unheard of to have dicom converters change the orientation of the<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">output image, to bring it into some consistent frame (LAS is a favorite of<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">labs that have lots of old code expecting analyze files). From what you<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">posted it seems that dcm2nii converted your image from an LPS arranged dicom<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">to an LAS arranged Nifti file. I would investigate the nifti file's qform<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">and sform matrics using either nifti_tool, fslhd or pynifti to confirm this.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hope this helps,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Luke<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Mathieu Coursolle wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am having a similar issue, which may be related.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have a NIfTI file, which I load using itkNIfTIImageIO.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">By stepping into ITK, I can see that the s-form (sto_xyz) is:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[1, 0, 0, -90]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 1, 0, -126]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 1, -72]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 0, 1]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">However, when it read the origin and orientation of the resulting itkImage,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I get:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[-1, 0, 0, 90]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, -1, 0, 126]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 1, -72]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 0, 1]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This data is in the MNI-152 space. I know that the index (0, 0, 0) should be<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(-90, -126, -72) mm in LPI coordinate system (NIfTI's default I believe).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Since I want my data in the RAI coordinate system, I then use the<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">itkOrientImageFilter.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Assuming it converts the image from LPI to RAI, I would expect the ouput to<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">be:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[-1, 0, 0, 90]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, -1, 0, 90]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 1, -72]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 0, 1]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">But I get:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[1, 0, 0, -90]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 1, 0, -90]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 1, -72]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[0, 0, 0, 1]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">By the way, my image dimensions are 181 x 217 x 181.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I know that index (0, 0, 0) is (90, 90, -72) mm in RAI.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am right that the matrix I get from ITK is not what is expected ?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It looks to me that the itkNIfTIImageIO is doing some transform to<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">the orientation matrix.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">What would be that transformation's purpose ?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks a lot!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Mathieu<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">____________________ Mathieu Coursolle, M.Ing.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Rogue Research Inc. <a href="http://www.rogue-research.com">www.rogue-research.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://www.rogue-research.com/">http://www.rogue-research.com/</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 6-Apr-09, at 10:46 AM, Antoine DUCHAMPS wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi all,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have a DWI sequence (brain) acquired with a Siemens scanner in Dicom<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">format. After converting it to NIfTI with dcm2nii<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(<a href="http://www.sph.sc.edu/comd/rorden/mricron/dcm2nii.html">http://www.sph.sc.edu/comd/rorden/mricron/dcm2nii.html</a>) I tried to read<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">it an recover the orientation by using ITK (I've copied the code below).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The matrix I obtain is the following:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">0.9997 0.0000 0.0252<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">0.0002 -1.0000 -0.0072<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-0.0252 -0.0072 0.9997<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">However, the transforation matrix in the Dicom header is<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">0.9997 0.0000 0.0252<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">0.0002 1.0000 -0.0072<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-0.0252 0.0072 0.9997<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">If the Dicom image orientation is LPS, this means that the image<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">orientation in NIfTI is LAS (And not RAS as I believed). Could anybody<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">clarify this please? Are there several possible orientations in NIfTI?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">If so, how can I know the specific image orientation?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Antoine.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">#include "itkImageFileReader.h"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">#include "itkOrientedImage.h"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">const unsigned int Dimension = 4;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">typedef short PixelType;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">typedef itk::OrientedImage<PixelType, Dimension> ImageType;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">typedef ImageType::Pointer ImagePointerType;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">typedef itk::ImageFileReader< ImageType > ReaderType;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">int main(int argc, char* argv[])<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">{<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">ImageType::Pointer image = ImageType::New();<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">ReaderType::Pointer reader = ReaderType::New();<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">reader->SetFileName(argv[1]);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">reader->Update();<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">image = reader -> GetOutput();<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">std::cout << image->GetDirection() << std::endl; std::cout.flush();<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_____________________________________<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Powered by www.kitware.com <<a href="http://www.kitware.com">http://www.kitware.com</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Visit other Kitware open-source projects at<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Please keep messages on-topic and check the ITK FAQ at:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Follow this link to subscribe/unsubscribe:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------------------------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_____________________________________<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Powered by <a href="http://www.kitware.com">www.kitware.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Visit other Kitware open-source projects at<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Please keep messages on-topic and check the ITK FAQ at:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Follow this link to subscribe/unsubscribe:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">____________________ Mathieu Coursolle, M.Ing.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Rogue Research Inc. <a href="http://www.rogue-research.com">www.rogue-research.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://www.rogue-research.com/">http://www.rogue-research.com/</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">____________________<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Mathieu Coursolle, M.Ing.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Rogue Research Inc.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://www.rogue-research.com">www.rogue-research.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_____________________________________<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Powered by <a href="http://www.kitware.com">www.kitware.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Visit other Kitware open-source projects at<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Please keep messages on-topic and check the ITK FAQ at:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Follow this link to subscribe/unsubscribe:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">____________________<br></blockquote><blockquote type="cite">Mathieu Coursolle, M.Ing.<br></blockquote><blockquote type="cite">Rogue Research Inc.<br></blockquote><blockquote type="cite"><a href="http://www.rogue-research.com">www.rogue-research.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br></div></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; 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: 0; "><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: 12px; 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: 12px; 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: 12px; 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>____________________ <br>Mathieu Coursolle, M.Ing.<span class="Apple-tab-span" style="white-space: pre; ">                </span><br>Rogue Research Inc. </div><div><a href="http://www.rogue-research.com/">www.rogue-research.com</a><br></div><div><br></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>