[MINC-users] minctoraw

Stephen Smith minc-users@bic.mni.mcgill.ca
Thu, 29 Aug 2002 10:26:20 +0100 (BST)


Hi - thanks for the reply, though I couldn't quite follow what the range
options are really doing. I have tried that and sadly it gives junk output
- most values being set to 32767...

The intensity range parts of mincheader are below - does that tell you
anything useful about what the options should be to mincextract?

Many thanks, Steve.


 image-min = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
    0, 0, 0, 0, 0 ;

 image-max = 5896592.46886447, 6089528.00976801, 5860417.05494506,
    6511574.50549451, 6487457.56288156, 6487457.56288156,
6439223.67765568,
    7247141.25518926, 8887093.35286935, 8127409.66056166,
8127409.66056166,
    7970649.53357753, 8404754.5006105, 7560661.50915751, 7476252.21001221,
    8368579.08669109, 7910357.17704518, 7584778.45177045,
7645070.80830281,
    8091234.24664225, 7669187.75091575, 8103292.71794872,
7741538.57875458,
    8356520.61538462, 8175643.54578755, 9092087.36507937,
8416812.97191697,
    7102439.5995116, 7138615.01343101, 7560661.50915751, 7174790.42735043,
    7223024.31257631, 6704510.04639805, 7838006.34920635,
6981854.88644689,
    6981854.88644689, 7319492.08302808, 7765655.52136752,
7813889.40659341,
    8682099.34065934, 8043000.36141636, 8139468.13186813,
8368579.08669109,
    7042147.24297924, 5920709.41147741, 5691598.45665446,
3641658.33455433,
    3581365.97802198, 3436664.32234432, 3931061.64590965 ;


On Wed, 28 Aug 2002, Peter NEELIN wrote:

> On Wed, 28 Aug 2002, Stephen Smith wrote:
>
> > hello - I've just found a gotcha in "minctoraw -normalise" (which I use to
> > convert to analyze). It seems to me that without the -normalise option you
> > get the "arbitrary" scaling of each slice's intensity, which you clearly
> > don't want in the final raw image - right? So my conversion program has
> > always used the -normalise flag. However I have just discovered that there
> > is still some overall intensity scaling that gets lost this way, because
> > when I compare two MINC files their subtraction makes sense - but when
> > comparing two converted analyze files, they are somehow scaled relative to
> > eachother, so the subtraction is not now sensible
>
> Yes. I am afraid that I never got around to replacing minctoraw (the
> original, rather primitive program with the helpful name) with mincextract
> (the later, more featureful program with a less obvious name). Between
> being afraid of breaking things and general inertia, I never fixed
> that problem and so people still end up using the rather limited
> minctoraw.
>
> mincextract has the option -image_range that allows you to specify the
> normalization of the output data (combined with the valid_range, one can
> calculate a scale from real values to the dumped voxel values). Note also
> that mincextract has -normalize turned on by default. You will need to
> specify the output type, however (probably something like
> "-short -signed -range 0 4095" for analyze files). If your original data
> was integer data and that scaling was preserved in the conversion to minc,
> then you can get the original integer values back with something like
>
>    mincextract -short -signed -range 0 4095 -image_range 0 4095 file.mnc
>
> (completely untested - just working from memory). The important point is
> that using the same -range and -image_range will give a scaling of 1 and
> offset of 0 when converting real values back to voxel values.
>
> 'Hope this helps.
>
>             Peter
> ----
>             Peter Neelin (neelin@bic.mni.mcgill.ca)
>
> _______________________________________________
> MINC-users@bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>

 Stephen M. Smith
 Head of Image Analysis, FMRIB

 Oxford University Centre for Functional MRI of the Brain
 John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK
 +44 (0) 1865 222726  (fax 222717)

 steve@fmrib.ox.ac.uk  http://www.fmrib.ox.ac.uk/~steve