[MINC-users] minctoraw

John Sled John.Sled@swchsc.on.ca
Thu, 5 Sep 2002 10:39:48 -0400


Hi Steve,

Another option you might consider is to use mincreshape to normalize
the slices as follows

volume_stats -min -max brain.mnc

File:         brain.mnc
# voxels:     902629
% of total:   100
Volume (mm3): 7.22103e+06
Min:          0
Max:          1.32407e+06

mincreshape -image_range 0 1.32407e06 brain.mnc brain_norm.mnc

File:         brain_norm.mnc
# voxels:     902629
% of total:   100
Volume (mm3): 7.22103e+06
Min:          0
Max:          1.32407e+06


This seems to leave the overall scaling the same but removes the interslice
scaling.


with regards,


John Sled

Hospital for Sick Children
Mouse Imaging Centre
555 University Ave.
Toronto, Ontario
M5G 1X8
Canada

Phone: 416 813-7654 x1438
Fax: 416 813-2208


On Thu, Sep 05, 2002 at 09:00:52AM +0100, Stephen Smith wrote:
> 
> Hi - thanks for this. In fact, using the normalise option DOES make all
> the slices have the right intensity _relative to eachother_ but the
> overall 3D intensity scaling is in general lost - unless you use the
> normalise option with the output datatype set as float in which case all
> is well. It is a pain to have to use floats but that seems the only thing
> that works....hohum :)
> 
> 	Thanks, Steve.
> 
> 
> 
> On Thu, 5 Sep 2002, Andrew Janke wrote:
> 
> > On Thu, 29 Aug 2002, Stephen Smith wrote:
> >
> > > 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?
> >
> > Time for me to add my 2c + 15% GST worth.
> >
> > >  image-min = 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,
> >
> > What peter is elluding to is that your images have probably been rescaled (per
> > slice) along the way. This can be viewed as either an unfortunate or fortunate
> > thing... :)
> >
> > Peter also is taking a stab at your input and output data range being 12-bit.
> > (something that we all know is very common of certain unnamed manufacturers).
> >
> > The problem as you describe it sounds like you are writing out data that is
> > scaled per slice and getting "zippering" between slices. Unfortunately minctoraw
> > and mincextract don't appear to have an option to "normalize" just between
> > slices although peter will correct me here if I am wrong.
> >
> > As such what you need to do is make sure a MINC image has only one max and min
> > value before doing a minctoraw/mincextract.  Most programs that use volume_io
> > and set_volume_real_range have the side-effect of doing this.. :)
> >
> > On this note, I have been meaning to write a quick volume_io proggie to do this.
> > Stay tuned (or email me again in a week) and I'll have a fix for you.
> >
> >
> > andrew
> >
> >
> >
> > _______________________________________________
> > 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
> 
> _______________________________________________
> MINC-users@bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users