[MINC-users] help on using rawtominc and n3

Runa Parveen runa at medphys.ucl.ac.uk
Thu Dec 8 18:19:03 EST 2005


Hi Andrew,

I am sending this message again as I have not received any reply. Many thanks.

Many thanks for your early response. In some points, I am still struggling 
to proper use of this package.

1.   rawtominc -coronal -short -unsigned -scan_range \
    -xstep 1 -ystep 1 -zstep 1 \
    -xstart -10 -ystart -50 -zstart -50 \
     -mri data_pix_out.mnc 171 256 256 < data_pix_in.img
According to your suggestion, I have used the above command for the 
transfer image into minc format. But when I displayed the image in DISPLAY 
menu, I have seen negative value -16321.2 in some point shown between 
bottom .1000 and .2000 in the column of colour bar in the left hand side. 
Please let me know why this one is displaying.

2. also, when I check with mincheader command of the "data_pix_out.mnc" the
image-max = 65285, 65285, 65285, 65285...................
and
image_min = _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
     _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
     _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
     _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
     _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
     _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
     _, _, _, _, _, _, _, _,

Is there any information I missed to put in the rawtominc conversion 
command line?

3. In mincresample, what would be the position of centre of first voxel 
along each of the world dimensions? the command line I use:
mincresample data_pix_out.mnc data_pix_resample.mnc -transform 
data_pix_res.xfm -like average_305.mnc -step 1 1 1 -short -unsigned -range 
0 32767 -nearest_neighbour -nelements 171 256 256

I was trying to resample the input image with average_305.mnc in mritotal 
and mincresample command before using NU_CORRECT. Which would be the better 
solution for NU_CORRECT? directly use on input image or after transforming 
data in a model (average_305) and then use the intensity correction? Please 
give me suggestion in this regard.

4. I would like to transfer the *.minc image into *.raw after the 
correction to use my own algorithm run on the intensity corrected image. I 
was using the command
minctoraw -short -unsigned -normalize data_pix_out_nu.mnc > data_pix_out_nu.raw

The value in the raw file are varied from -32767 to 32767. My original 
input image is unsigned short, intensity voxel value min is zero and  max 
1700. Please give me the appropriate command line to transfer the image format.

My sincere thanks to you for your kind help.

Yours sincerely,

Runa

******************************************************************** 

* Runa Parveen                                                            **
* Medical Imaging Group                                               **
* Dept. of Medical Physics & Bioengineering                   **
* University College London                                            **
* 2nd Floor, New Malet Place Engineering Building           **
* Gower Street, off Torrington Place                                 **
* London WC1E 6JA                                                 **
* 
UK 
**
* Tel. +44 (0) 20 7679 0246 (Dept.)
          +44 (0) 7984 084 959 (mob.)                                  **
* Fax.+44 (0) 20 7679 0255 (Dept.)                                  **
* e-mail: runa at medphys.ucl.ac.uk                                  **
*********************************************************************

At 00:00 01/12/2005 -0500, you wrote:
>On 30/11/05, Runa Parveen <runa at medphys.ucl.ac.uk> wrote:
> > 1. I have coronal slices, dimension: 256x256x170, cubic voxel :1mm, T1
> > weighted. I could not understand how I could give the command when changing
> > from rawtominc? also in world coordinate space?
> > the command line I use:
> >
> > rawtominc -coronal -short -unsigned -origin 0 0 0 -range 0 32767
> > -real_range 0 32767 -orange 0 32767 -ystep 1 -zstep 1 -xstep 1 -xdircos 1 0
> > 0 -ydircos 0 1 0 -zdircos 0 0 1 -mri data_pix_out.mnc 171 256 256 <
> > data_pix_in.img
> >
> > I am worried about the right way of mentioning dimension and also what
> > would be the first voxel of the data in world coordinate.
>
>The command above looks generally right to me, I'd suggest s few
>changes if you'd like to position the first voxel (say at -10,-50,-50)
>
>    rawtominc -coronal -short -unsigned -scan_range \
>    -xstep 1 -ystep 1 -zstep 1 \
>    -xstart -10 -ystart -50 -zstart -50 \
>     -mri data_pix_out.mnc 171 256 256 < data_pix_in.img
>
>Although given that your data appears to be in ANALYZE/Nifti format,
>the easiest thing may be this:
>
>    nii2mnc data_pix_in.hdr data_pix_out.mnc
>
> > 2. In mincresample, what would be the position of centre of first voxel
> > along each of the world dimensions?
> > the command line I use:
> > mincresample data_pix_out.mnc data_pix_resample.mnc -transform
> > data_pix_res.xfm -like average_305.mnc -step 1 1 1 -short -unsigned -range
> > 0 32767 -nearest_neighbour -nelements 171 256 256
>
>I am a bit confused as to what you are trying to achive in the above.
>I suspect you should drop the -step argument and instead specify one
>of -use_input_sampling or -like <target.mnc>.  I'd also drop the type
>and range arguments unless you really do want to change the range to
>be exactly this.
>
> > The volume of the output in this stage is almost half of the rawtominc 
> output?
>
>Meaning the output file is now 1/2 the original size or the image data?
>
> > 3. In display, the image is showed in some tilting position. Also I would
> > like to know when the image_range is used, what would be value of the voxel
> > when viewing the image in Display?
>
>The real value of the data in a voxel is displayed in a column on the
>left hand side of the image data.
>
> > 4. Also after applying nu_correct, the program runs only for 2 iteration
> > and given CV: 0.000878881, is it OK?
>
>Possibly, but without knowing the data it is difficult to answer this.
>
> > 5. As it is stopped after 2 iterations, I use the command:
> > nu_correct -iterations 100 -stop 2.e-5 data_pix_resample.mnc 
> data_pix_nu.mnc
> > it stopped after 37 iterations and CV of field changes: 1.61641e-05.
>
> > Also, in Display, the view of the image in tilting position. Also I would
> > like to know how I could understand the non-uniformity has been corrected?
>
>Look carefully at things like the intensity of the grey/white matter
>across the image (in coronal,sagital and axial planes).  Use windowing
>with say the spect colour map to best illustrate the differences in
>register.
>
>The corrections that N3 makes are often very subtle.
>
>--
>Andrew Janke      (a.janke at gmail.com || www.cmr.uq.edu.au/~rotor)
>Canada->Montreal                                   Cell: +1 (514) 924 2012
>
>_______________________________________________
>MINC-users at bic.mni.mcgill.ca
>http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users




More information about the MINC-users mailing list