[MINC-users] N3 crashes when processing a volume on MacOSx

Andrew Janke a.janke at gmail.com
Tue Sep 5 20:03:39 EDT 2006


Thorarin,

The file type will not matter.  My guess is that one of the files has
something like an irregular step size in Z.  Use mincheader on the
Input file and I suspect in the zspace section you will see something
like spacing:irregular.

In this case dcm2mnc has become a tad confused during the conversion.
There is a simple fix.  If you think the step is correct just do this:

   minc_modify_header -sinsert zspace:spacing=regular  input.mnc


a

On 9/5/06, Thorarin Bjarnason <thor4ooo at gmail.com> wrote:
> Hello Sylvain,
>
> I get the following results <based on the scenario described earlier> :
>
> ] mincinfo -image_info InputFile.mnc
> file: InputFile.mnc
> image: signed__ short -32768 to 32767
> image dimensions: zspace yspace xspace
>    dimension name         length         step        start
>    --------------         ------         ----        -----
>    zspace                     50            3     -74.4609
>    yspace                    256    -0.859375      108.378
>    xspace                    256     -0.85938          115
>
> ] mincinfo -image_info OutputFile.mnc
> file: OutputFile.mnc
> image: signed__ float 0 to 1285.8984375
> image dimensions: zspace yspace xspace
>    dimension name         length         step        start
>    --------------         ------         ----        -----
>    zspace                     50            3     -74.4609
>    yspace                    256     0.859375     -110.762
>    xspace                    256      0.85938     -104.142
>
>
> Should I be worried about a change from 'singed short' to 'signed float'?
>
> Cheers,
> Thor
>
> On 9/5/06, Sylvain MILOT <sylvain at bic.mni.mcgill.ca> wrote:
> >
> > Hello,
> >
> > seems like an overkill - I would guess that dcm2mnc fails to set some
> > step/start values and that mnc2nii/nii2mnc uses some defaults values which
> > may not be correct - but for nu_correct's sake, I dont think it matters.
> >
> > What does mincinfo reveal on both volumes?
> >
> >  On Tue, 5 Sep 2006, Thorarin Bjarnason wrote:
> >
> > > Hello:
> > >
> > > Thank you for your help.
> > >
> > > I guess I did not tell the whole story <by accident, of course>.
> > >
> > > The problem might originate from converting dcm2mnc. When I ran this
> > > command to convert the dicom volume I had a warning:
> > >
> > > > dcm2mnc * .
> > > Checking file types...
> > > File Img000.dcm appears to be DICOM (CD/Export).
> > > Parsing 50 files     |<--------------------------------------------------->|
> > > Sorting 50 files...   Done sorting files.
> > > Processing files, one series at a time...
> > > -Parsing series info |<--------------------------------------------------->|
> > > WARNING: calculated slice width (2.9271522383) disagrees with file's
> > > slice width (3.0000000000)
> > > -Creating minc file  |<--------------------------------------------------->|
> > > Done processing files.
> > >
> > > So perhaps this warning caused an error later on. I have a work around though:
> > >
> > > ] dcm2mnc * .
> > > ] mnc2nii InputFile.mnc Temp1.nii
> > > ] nii2mnc Temp1.nii Temp2.mnc
> > > ] nu_correct -options Temp2.mnc OutputFile.mnc
> > >
> > > nu_correct ran to completion this time. Can anyone comment as to
> > > whether this workflow is OK?
> > >
> > > Have a nice day,
> > > Thor
> > >
> > > On 9/5/06, Sylvain MILOT <sylvain at bic.mni.mcgill.ca> wrote:
> > > >
> > > >
> > > > Hello,
> > > >
> > > > I haven't used nu_correct in a long while but one thing caught my eye:
> > > >
> > > > Files /var/tmp/nu_correct_7953//test_field.mnc and InputFile.mnc have
> > > > > different step coordinates (zspace)
> > > > > nu_evaluate: crashed while running mincmath (termination status=256)
> > > >
> > > > mincmath requires that all its input data have the same shape and
> > > > same coordinate sampling.
> > > >
> > > > try nu_correct -keeptmp ... to troubleshoot.
> > > >
> > > > hoe this helps,
> > > >
> > > > Sylvain
> > > >
> > > > On Tue, 5 Sep 2006, Thorarin Bjarnason wrote:
> > > >
> > > > > Hello All,
> > > > >
> > > > > I recently got minc tools running on Mac OS X 10.4.7 < with effort ;-)
> > > > > >. I am interested in running N3. I have no trouble taking one file
> > > > > from a dicom set and processing it <by converting it to mnc and
> > > > > running nu_correct>. Processing an entire volume is not working as
> > > > > well, unfortunately. Everything appears to be running fine until the
> > > > > end <I think> where nu_correct crashes. My work flow is as follows:
> > > > >
> > > > > I convert dicom to mnc using:
> > > > > dcm2mnc * .
> > > > >
> > > > > I go to the mnc output dir and use the following command:
> > > > > nu_correct -fwhm 0.15 -distance 50 -stop 0.0001 -iterations 1000
> > > > > InputFile.mnc test.mnc
> > > > >
> > > > > and the computer works away for a while with the following output:
> > > > > Processing:..............Done
> > > > > Not implemented yet in cache_volume_range_has_changed()
> > > > > Not implemented yet in cache_volume_range_has_changed()
> > > > > Processing:..............Done
> > > > >       ... etc ...
> > > > > Not implemented yet in cache_volume_range_has_changed()
> > > > > Not implemented yet in cache_volume_range_has_changed()
> > > > > Number of iterations: 138
> > > > > CV of field change: 9.77015e-05
> > > > > Transforming slices:..................................................Done
> > > > > Not implemented yet in cache_volume_range_has_changed()
> > > > > Not implemented yet in cache_volume_range_has_changed()
> > > > > Transforming slices:..................................................Done
> > > > > Files /var/tmp/nu_correct_7953//test_field.mnc and InputFile.mnc have
> > > > > different step coordinates (zspace)
> > > > > nu_evaluate: crashed while running mincmath (termination status=256)
> > > > > nu_correct: crashed while running nu_evaluate (termination status=256)
> > > > >
> > > > > A test.imp file was created. I tried changing some of the imput
> > > > > parameters when I call the nu_correct function, but I get the same
> > > > > error.
> > > > >
> > > > > Does anyone know how I can fix this error?
> > > > >
> > > > > Kind Regards,
> > > > >
> > > > > --
> > > > >
> > > > > Thorarin Bjarnason, BEng, MASc
> > > > > www.imaginginformatics.ca
> > > > > _______________________________________________
> > > > > MINC-users at bic.mni.mcgill.ca
> > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> > > > >
> > > >
> > > > ---
> > > > Sylvain Milot (sylvain at bic.mni.mcgill.ca)
> > > >               (trinity at bic.mni.mcgill.ca)
> > > > Brain Imaging Centre
> > > > Montreal Neurological Institute
> > > > Webster 2B, Room 208
> > > > Montreal, Qc., Canada, H3A 2B4
> > > > Phone  : (514) 398-4965, Fax: 398-8948
> > > > Mobile : (514) 712-1768
> > > > Office : 527 Av Des Pins O., Room 204
> > > >          Montreal, Qc., H2W 1S4
> > > >
> > > >
> > > > _______________________________________________
> > > > MINC-users at bic.mni.mcgill.ca
> > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> > > >
> > >
> > >
> > > --
> > >
> > > Thorarin Bjarnason, BEng, MASc
> > > www.imaginginformatics.ca
> > > _______________________________________________
> > > MINC-users at bic.mni.mcgill.ca
> > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> > >
> >
> > ---
> > Sylvain Milot (sylvain at bic.mni.mcgill.ca)
> >               (trinity at bic.mni.mcgill.ca)
> > Brain Imaging Centre
> > Montreal Neurological Institute
> > Webster 2B, Room 208
> > Montreal, Qc., Canada, H3A 2B4
> > Phone  : (514) 398-4965, Fax: 398-8948
> > Mobile : (514) 712-1768
> > Office : 527 Av Des Pins O., Room 204
> >          Montreal, Qc., H2W 1S4
> >
> >
> > _______________________________________________
> > MINC-users at bic.mni.mcgill.ca
> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >
>
>
> --
>
> Thorarin Bjarnason, BEng, MASc
> www.imaginginformatics.ca
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>


-- 
Andrew Janke   (a.janke at gmail.com || http://a.janke.googlepages.com/)
Canada->Montreal                                   Cell: +1 (514) 924 2012


More information about the MINC-users mailing list