Frequently Asked Questions about MNI N3
Updated Aug. 11, 1999
N3 uses data in the MINC file
format. The minc
package provides two programs rawtominc and minctoraw for converting raw
data to and from minc format respectively. An example of using these
programs is as follows. Suppose the data is unsigned short integers
consisting of twenty-four 256 by 256 slices. If this data came from
an MRI scanner producing 12 bit data with different endian than the
machine running rawtominc then one might do the conversion as follows:
dd conv=swab if=mydata.raw | rawtominc -transverse -short -unsigned -xstep -1 -ystep -1 -zstep 5.5 -mri -origin 0 0 0 -range 0 4095 -real_range 0 4095 -clobber mydata.mnc 24 256 256
And the conversion back to raw as follows:
minctoraw -range 0 1800 -normalize somedata.mnc | dd conv=swab of=somedata.raw
The masked region for N3 is defined as any voxel greater than zero.
However, the program extracttag which resamples the mask into the
working resolution has some peculiarities which can result in errors.
The trouble is that extracttag is fussy about the real
range of the data set. In the minc format the mapping between the raw
binary data (so called voxel values) and their interpretation as real
numbers (so called real values) is somewhat arbitrary.
By default rawtominc sets the mapping to map the entire range of voxel
values to the range [0, 1]. This can be overridden by giving the -range
and -real_range options. For example, for 12 bit MR data one might choose
-range 0 4095 -real_range 0 4095. Anyway, I'm not exactly clear on what
extracttag excepts and doesn't except. However, I have found the command
mincmath -gt -const 0 old_mask.mnc new_mask.mnc
fixes the problem.
As an aside about real and voxel ranges, keep in mind that N3 treats
values less than one as part of the background. Hence, a data set created
by rawtominc without a range specification will yeild a volume that is
empty as far as N3 is concerned.
Yes, it works fine on single slice data. Note, however, that a bug in
verison 1.02 may create erratic results for volumes with only a few slices.
This is fixed in version 1.04.
Yes, however the default settings are not optimal. Due to the extreme
non-uniformity in surface coil data, N3 usually hits its iteration limit
before the correction is complete. Try using nu_correct with the options
-iterations 150
. If that doesn't help, try reducing the stopping
threshold as well by adding the option -stop 0.0001
.
Warning messages like
Not implemented yet in cache_volume_range_has_changed()
Not implemented yet in cache_volume_range_has_changed()
are harmless. They refer to a portion of the volume_io libary that N3
does not use.
For volumes with particularly severe non-uniformity, N3 reachs its iteration
limit before the algorithm has converged. In these instances running the
algorithm a second time should improve upon the result. However, it is
more straight forward to adjust the stopping criteria using the -iterations
and -stop options to set the maximum number of iterations and minimum
change in field estimate respectively. Try for example the option
'-iteration 150'.
John SLED
1999-08-11