[Insight-users] MINC2ImageIO loses scaling information

Geoff Topping g_topping at hotmail.com
Thu May 14 14:40:23 EDT 2009


Hi again,

I can understand that MINC2 is different from MINC with regard to slice vs. global scaling, but the problem remains that the MINC2ImageIO doesn't seem to be calculating or outputting the scaling correctly for valid MINC2 format input.

In my case, the input image and the output image from an MINC2ImageIO program, both in MINC2 format, loaded into MNI register, have different voxel values displayed.

Geoff

> Geoff ,
>
> I am afraid what you are reporting is irrelevant to ITK!!
>
> Please go to MNI website and try to understand the concept of
> slice scaling versus global scaling. The original MINC format was
> designed with the slice scaling concept mainly to save space. This issue
> is no longer the case and as a result we designed MINC2.0 with global
> scaling.
>
> The ITK MINC2 writer simply writes the image with global scaling even
> though you input image has slice scaling.
>
> HTH
>
> Leila
>
> On Thu, 2009-05-14 at 11:28 -0400, Geoff Topping wrote:
>> Hi all,
>>
>>
>> I've been trying to get the MINC2ImageIO code working, and after help from Leila Baghdadi, I've gotten a test program built and running. However, with this program, I'm having some strange problems with output image scaling.
>>
>> The program loads a MINC2 format image and outputs it back
>> without modification. The input I'm using to test is a file from the
>> MNI:
>>
>>
>>
>> http://packages.bic.mni.mcgill.ca/tgz/mni-models_icbm152-lin-1.0.tar.gz
>>
>>
>>
>> This is actually a MINC1 format image, but I've converted it to MINC2
>> using MINC2's mincconvert with the -2 option, since the MINC2ImageIO
>> code only works with MINC2 format images.
>>
>>
>>
>> The attached code, ImageReadWrite.cxx, is built with the attached
>> CMakeLists.txt, the FindMINC2.cmake that comes with ITK and having
>> netcdf, hdf5 and the minc2 libraries set up in cmake.
>>
>> The code and input files and other relevant files are available here:
>>
>> http://www.pet.ubc.ca/gtopping/ITK/
>>
>>
>> To run the program, one specifies the input and output file names on the command line, in that order.
>>
>>
>>
>> The program runs and outputs an image. When this output image and the
>> original (converted to minc2) image are examined using mincheader, the
>> header files have some differences. The image-min and image-max fields
>> are notably significantly reduced, and many of the other fields are
>> smaller and changed. When the two images are loaded in minc's register
>> program, which shows them side-by-side, the rewritten image has
>> different scaling values by default, and setting the two images to use
>> the same range for the display results in rather different visible
>> results.
>>
>> Screenshots of register initially when the images are loaded and after adjusting the scales of both images to be the same, along with all the other relevant files can be seen on the webspace linked above.
>>
>> In those screenshots, the scaling range is set in the
>> black text on white background above the pink bar near the bottom below
>> the two sets of images.
>>
>>
>>
>> Looking at the image data directly, with mincdump, the first few image
>> data numbers are also different. In the same scale case,
>> both the original (left) and read-written versions of the test input
>> are scaled 0 to 500000. In the original / default case, they have
>> different scaling ranges when initially loaded into register, probably
>> in part due to the differences in scaling information in the headers of
>> the mnc files themselves.
>>
>>
>>
>> Does something in particular need to be done after loading the image
>> using MINC2ImageIO to get the scaling in the output image to be
>> consistent? Or am I missing an important step of some other kind?
>>
>>
>>
>> Thanks,
>>
>> Geoff Topping
_________________________________________________________________
Create a cool, new character for your Windows Live™ Messenger. 
http://go.microsoft.com/?linkid=9656621


More information about the Insight-users mailing list