[MINC-development] MINC and ITK

Vladimir S. FONOV vladimir.fonov at gmail.com
Sun May 15 13:46:38 EDT 2011


Hello Everybody,

here is a test project:
https://github.com/downloads/vfonov/EZminc/minc_test_itk.zip

- inside there are two c++ programs: any_itk_any_3d and any_itk_any_4d
- both a just reading and writing file using ITK functions. It's
possible to compile both either with EZminc, or with Leila's MINC2 IO
library.

Here is what happens if you compile it with InsightToolkit-3.20.0 :
I think, we have already reported similar results about 2 years ago.

a. Using EZminc:

1. testing with MNI 152 2009a template :

$ ./minc_test_build_ezminc/any_itk_any_3d
mni_icbm152_t1_tal_nlin_sym_09a.mnc test_ezminc.mnc
Reading mni_icbm152_t1_tal_nlin_sym_09a.mnc...
Writing test_ezminc.mnc...


$ mincinfo   mni_icbm152_t1_tal_nlin_sym_09a.mnc
file: mni_icbm152_t1_tal_nlin_sym_09a.mnc
image: signed__ short -32768 to 32767
image dimensions: zspace yspace xspace
    dimension name         length         step        start
    --------------         ------         ----        -----
    zspace                    189            1          -72
    yspace                    233            1         -134
    xspace                    197            1          -98



$ mincinfo test_ezminc.mnc
file: test_ezminc.mnc
image: signed__ short -32768 to 32767
image dimensions: zspace yspace xspace
    dimension name         length         step        start
    --------------         ------         ----        -----
    zspace                    189            1          -72
    yspace                    233            1         -134
    xspace                    197            1          -98


$ mincstats -min -max mni_icbm152_t1_tal_nlin_sym_09a.mnc
*** mincstats - reported min (0.0677952) doesn't equal header (0.0677952)
Min:               0.06779524744
Max:               97.32924302

$ mincstats -min -max test_ezminc.mnc
Min:               0.06779524684
Max:               97.32924652


2. testing with 4D dti file:

$ mincinfo  ibis_289656_living_phantom_phi_sd_20090527_dti_001.mnc
file: ibis_289656_living_phantom_phi_sd_20090527_dti_001.mnc
image: unsigned short 0 to 4095
image dimensions: time zspace yspace xspace
    dimension name         length         step        start
    --------------         ------         ----        -----
    time                       26         13.3            0
    zspace                     81            2     -74.9735
    yspace                     96     -1.97917      107.812
    xspace                     96     -1.97917      98.2338

$ ./minc_test_build_ezminc/any_itk_any_4d
ibis_289656_living_phantom_phi_sd_20090527_dti_001.mnc
test_ezminc_4d.mnc
Reading ibis_289656_living_phantom_phi_sd_20090527_dti_001.mnc ...
Writing test_ezminc_4d.mnc ...
(from micreate_group_variable): Variable 'dicom_0x0008' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_0x0010' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_0x0018' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_0x0019' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_0x0020' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_0x0021' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_0x0023' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_0x0028' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_0x0029' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_0x0032' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_0x0040' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_0x0051' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicom_groups' is not a
standard MINC variable
micreate_group_variable: MINC package entry point
(from micreate_group_variable): Variable 'dicominfo' is not a standard
MINC variable
micreate_group_variable: MINC package entry point

$ mincinfo test_4d_ezminc.mnc
file: test_4d_ezminc.mnc
image: unsigned short 0 to 65535
image dimensions: zspace yspace xspace time
    dimension name         length         step        start
    --------------         ------         ----        -----
    zspace                     81            2     -74.9735
    yspace                     96      1.97917     -80.2086
    xspace                     96      1.97917      -89.787
    time                       26         13.3            0

$ mincstats -min -max ibis_289656_living_phantom_phi_sd_20090527_dti_001.mnc
Min:               0
Max:               4095

$ mincstats -min -max test_ezminc_4d.mnc
Min:               0
Max:               4095


b. using Leila's library:

1. testing with MNI 152 2009a template :

$ ./minc_test_build_leila/any_itk_any_3d
mni_icbm152_t1_tal_nlin_sym_09a.mnc test_leila.mnc
Reading mni_icbm152_t1_tal_nlin_sym_09a.mnc...
Writing test_leila.mnc...

$ mincinfo test_leila.mnc
file: test_leila.mnc
image: signed__ float -3.4028234663852885981e+38 to 3.4028234663852885981e+38
image dimensions: zspace yspace xspace
    dimension name         length         step        start
    --------------         ------         ----        -----
    zspace                    189            1          -72
    yspace                    233            1         -134
    xspace                    197            1          -98

$ mincstats -min -max test_leila.mnc
*** mincstats - reported min (-32768) doesn't equal header (0)
*** mincstats - reported max (32767) doesn't equal header (1)
Min:               -32768
Max:               32767

2. testing with 4D dti file:

$ ./minc_test_build_leila/any_itk_any_4d
ibis_289656_living_phantom_phi_sd_20090527_dti_001.mnc
test_4d_leila.mnc
Reading ibis_289656_living_phantom_phi_sd_20090527_dti_001.mnc ...
Writing test_4d_leila.mnc ...

HDF5-DIAG: Error detected in HDF5 (1.8.6) thread 0:
  #000: H5Dio.c line 153 in H5Dread(): selection+offset not within extent
    major: Dataspace
    minor: Out of range
HDF5-DIAG: Error detected in HDF5 (1.8.6) thread 0:
  #000: H5Dio.c line 153 in H5Dread(): selection+offset not within extent
    major: Dataspace

.... <cut>
44502 lines of errors


$ mincinfo test_4d_leila.mnc
file: test_4d_leila.mnc
image: signed__ float -3.4028234663852885981e+38 to 3.4028234663852885981e+38
image dimensions: zspace yspace xspace vector_dimension
    dimension name         length         step        start
    --------------         ------         ----        -----
    zspace                     96     -1.97917      107.812
    yspace                     96     -1.97917      98.2338
    xspace                     26         13.3            0
    vector_dimension           26            0            0

$ mincstats -min -max test_4d_leila.mnc
*** mincstats - reported max (41049) doesn't equal header (1)
Min:               0
Max:               41049



On Sun, May 15, 2011 at 9:38 AM, Jason Lerch <jason at phenogenomics.ca> wrote:
> Hi Andrew et al.,
>
>> We also probably shouldn't kid ourselves regarding "MINC" having a
>> grand poo-bar or any formal structure...  Certainly the original ITK
>> interface that Leila implemented and is now maintaining again was a
>> big step forward at the time when there was no ITK reader (beyond
>> mincextract/minctoraw....).
>
> Agreed on both points - nobody can enforce what another person should or should not work on. But still, some coordination can be useful so that there is not too much unnecessary duplication of work.
>
>>
>> My understanding of the birth of EZMINC (by Vlad) was out of his own
>> frustrations of getting his own ITK code to work with MINC1 files.
>> Still I take your point about it being good if we had one 'sanctioned'
>> interface.  I take it you lot (by you lot, I mean the minc-ITK users
>> in jason-toronto-leila land) still use the the ITK MINC:IO libraries
>> on a daily basis?
>
> That's my understanding as well - we (us Toronto folks, that is), seem to be the happiest in the MINC community to discard MINC1 compatibility, which others have never felt comfortable with. By now I'm sure there are many other design differences between EZMINC and ITK MINC:IO libs, but since I've programmed in neither (though used both in end-user tools) I can't comment on what they are. And yes, we do use the ITK MINC:IO libs in existing code and for occasional development. I have no idea if anybody else does.
>
>>
>> I was of the impression that Vlad was volunteering to perhaps
>> integrate his code or ideas into the current ITK MINC reader so that
>> MINC 1 file input was possible?  or has this already been done? I
>> haven't followed the ITK + MINC thing much as of late, been too busy
>> working on other things. I was about to suggest to Vlad that he
>> contacts Leila first to get up to speed with what the current status
>> of the "real" ITK MINC IO stuff was, but you beat me to it.  (Darn
>> time-zones).
>
> My suspicion is that there's a lot of duplication between the two, so it'll likely end up more as a choice of which one is the more reasonable to go forward with. But again, I've programmed in neither, but would be keen to hear such a discussion on minv-dev!
>
> Jason
>
>>
>>
>> a
>>
>> PS: It's freeeeezing here in Brisbane, 13deg C at 23:51, inhumane and
>> here I am doing MINC email in between putting coats of paint on the
>> hall cupboard.
>>
>> On Sat, May 14, 2011 at 23:38, Jason Lerch <jason at phenogenomics.ca> wrote:
>>> While a discussion on which itk interface to support could be a worthwhile one, I'm rather surprised that it could hinge on the fact that Leila, one of the two main developers behind MINC 2, is somehow not deemed a "core MINC developer." So let's argue on technical merit rather than the suggestion that the ITK interface could not be supported by Leila or the rest of our group in Toronto.
>>>
>>> Jason
>> _______________________________________________
>> MINC-development mailing list
>> MINC-development at bic.mni.mcgill.ca
>> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development
>
> _______________________________________________
> MINC-development mailing list
> MINC-development at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development
>



-- 
Best regards,

 Vladimir S. Fonov ~ vladimir <dot> fonov <at> gmail <dot> com


More information about the MINC-development mailing list