<div dir="ltr"><div><div>Thanks,<br></div>I've tested this with my data and it seems to fix the problem.<br><br></div>Thanks!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 25, 2013 at 7:46 AM, Jean-Christophe Fillion-Robin <span dir="ltr"><<a href="mailto:jchris.fillionr@kitware.com" target="_blank">jchris.fillionr@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi Richard, <br><br></div>There is currently a patch being reviewed, could you test that that it fix the problem for you ?<br>
</div>See <a href="http://review.source.kitware.com/#/c/12771/" target="_blank">http://review.source.kitware.com/#/c/12771/</a><br>
<br></div>Thanks<br></div>Jc<br></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Tue, Sep 24, 2013 at 5:15 PM, Richard Beare <span dir="ltr"><<a href="mailto:richard.beare@gmail.com" target="_blank">richard.beare@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div>Hi,<br></div>I'm having problems with the MGH IO module enabled under ITK 4.5 that I'm using to process Freesurfer data. I'm not sure who is looking after this code.<br>
<br></div>
The first problem (minor), is that the freesurfer filenames like aparc.a2009s+aseg.mgz seem to not pass the modules readability test. Copying to a name without + or . seems to solve the problem.<br><br></div>The more serious problem is lack of origin preservation. My input has the following, reported by mri_info:<br>
<br> type: MGH<br> dimensions: 256 x 256 x 256<br> voxel sizes: 1.0000, 1.0000, 1.0000<br> type: UCHAR (0)<br> fov: 256.000<br> dof: 0<br> xstart: -128.0, xend: 128.0<br>
ystart: -128.0, yend: 128.0<br>
zstart: -128.0, zend: 128.0<br> TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees<br> nframes: 1<br> PhEncDir: UNKNOWN<br>ras xform present<br> xform info: x_r = -1.0000, y_r = 0.0000, z_r = 0.0000, c_r = 6.7153<br>
: x_a = 0.0000, y_a = 0.0000, z_a = 1.0000, c_a = 12.4186<br> : x_s = 0.0000, y_s = -1.0000, z_s = 0.0000, c_s = -8.1481<br><br>talairach xfm : /home/rbeare/NCIdv0_scratch/ADNIMRI/Freesurfer//0720/mri/transforms/talairach.xfm<br>
Orientation : LIA<br>Primary Slice Direction: coronal<br><br>voxel to ras transform:<br> -1.0000 0.0000 0.0000 134.7153<br> 0.0000 0.0000 1.0000 -115.5814<br> 0.0000 -1.0000 0.0000 119.8519<br>
0.0000 0.0000 0.0000 1.0000<br><br></div>My output is:<br><div><br>Volume information for /tmp/h.mgz<br> type: MGH<br> dimensions: 256 x 256 x 256<br> voxel sizes: 1.0000, 1.0000, 1.0000<br>
type: INT (1)<br> fov: 256.000<br> dof: 1<br> xstart: -128.0, xend: 128.0<br> ystart: -128.0, yend: 128.0<br> zstart: -128.0, zend: 128.0<br> TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees<br>
nframes: 1<br> PhEncDir: UNKNOWN<br>ras xform present<br> xform info: x_r = -1.0000, y_r = -0.0000, z_r = -0.0000, c_r = -6.7153<br> : x_a = 0.0000, y_a = 0.0000, z_a = 1.0000, c_a = -12.4186<br>
: x_s = 0.0000, y_s = -1.0000, z_s = 0.0000, c_s = -8.1481<br><br>talairach xfm :<br>Orientation : LIA<br>Primary Slice Direction: coronal<br><br>voxel to ras transform:<br> -1.0000 -0.0000 -0.0000 121.2847<br>
0.0000 0.0000 1.0000 -140.4185<br> 0.0000 -1.0000 0.0000 119.8519<br> 0.0000 0.0000 0.0000 1.0000<br><br>voxel-to-ras determinant -1<br><br><br></div><div>The output segmentation image does not align with the original in freeview.<br>
<br></div><div>If I display the images within the ITK code I get the expected matrices:<br></div><div>input<br> RequestedRegion:<br> Dimension: 3<br> Index: [0, 0, 0]<br> Size: [256, 256, 256]<br> Spacing: [1, 1, 1]<br>
Origin: [-134.715, 115.581, 119.852]<br> Direction:<br>1 -5.36551e-19 0<br>0 -0 -1<br>5.36551e-19 -1 0<br><br> IndexToPointMatrix:<br>1 -5.36551e-19 0<br>0 0 -1<br>5.36551e-19 -1 0<br><br></div><div>output:<br> RequestedRegion:<br>
Dimension: 3<br> Index: [0, 0, 0]<br> Size: [256, 256, 256]<br> Spacing: [1, 1, 1]<br> Origin: [-134.715, 115.581, 119.852]<br> Direction:<br>1 -5.36551e-19 0<br>0 -0 -1<br>5.36551e-19 -1 0<br><br> IndexToPointMatrix:<br>
1 -5.36551e-19 0<br>0 0 -1<br>5.36551e-19 -1 0<br><br></div><div>If I use mri_convert to convert aseg.mgz to aseg.nii.gz and convert the processed image back to mgz, everything works as expected.<br></div><div><br></div>
</div>
<br></div></div>_______________________________________________<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://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</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-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br>
</font></span></div>
</blockquote></div><br></div>