[MINC-users] Problems with Emma in newimage.m
Mathieu Dehaes
mathieu.dehaes at polymtl.ca
Mon Apr 10 14:16:52 EDT 2006
Hi,
I try to use Emma 0.9.7 on Mac OS X 10.4 and I have 2 problems with the
newimage.m function.
1- I just want to create a minc file with the command :
>> handle = newimage('new.mnc', [0 1 31 49]);
and Matlab gives me the error :
Command: micreateimage new.mnc -size 0 1 31 49 -type byte -valid_range 0 255
-orientation transverse
Output:
??? Error using ==> newimage
Error running micreateimage to create file new.mnc
I resolved this problem by changing the newimage.m file on line 253-255 :
if (Parent == -1)
execstr = sprintf ('micreateimage %s -size %d %d %d %d -type %s -valid_range
%.20g %.20g -orientation %s', ...
NewFile, DimSizes, ImageType, ValidRange, Orientation);
by these lines :
execstr = sprintf ('/usr/local/emma/bin/micreateimage %s -size %d %d %d %d -
type %s -orientation %s', ...
NewFile, DimSizes, ImageType, Orientation);
i.e. by giving the whole path to the micreateimage program. Does anyone know how
to use newimage.m without changing the file?
2- If you check the changed lines above, there is another change. I removed the
error associated with the "ValidRange", because Matlab gave me
Command: /usr/local/emma/bin/micreateimage new.mnc -size 0 1 31 49 -type byte
-valid_range 0 255 -orientation transverse
Output:
??? Error using ==> newimage
Error running micreateimage to create file new.mnc
This is the reason I had removed the ValidRange parameter. Does anyone know how
to use newimage.m with the default parameter without changing the file? Why is
0-255 not valid for a byte type image?
Thank you.
Mathieu and Sean
More information about the MINC-users
mailing list