BIC-MNI / minc-toolkit-v2

Version 2 of the minc-toolkit, uses tools based on ITK version 4.x
GNU General Public License v3.0
49 stars 21 forks source link

bic-mni-models missing pre-generated files for mritotal #133

Open SamPare opened 3 years ago

SamPare commented 3 years ago

Hi,

I am working on macOS Catalina 10.15.7 and I have downloaded the minc-toolkit-v2 (1.9.18) and all the models from http://bic-mni.github.io/. When I run the mritotal command, I keep getting these codes:

$ mritotal /Users/samuelpare/Documents/MRI/rr_tar_DICOM/g124r/anonymized_19890323_183722/anonymized_19890323_183722_7d1_mri.mnc c1.mnc
Loading configuration file /opt/minc/1.9.18/bin/../etc/mritotal.cfg
Loading protocol default (protocol file = /opt/minc/1.9.18/bin/../etc/mritotal.default.cfg)
/opt/minc/1.9.18/bin/../share/mni-models/average305_t1_tal_lin_16_blur.mnc does not exist
/opt/minc/1.9.18/bin/../share/mni-models/average305_t1_tal_lin_8_blur.mnc does not exist
/opt/minc/1.9.18/bin/../share/mni-models/average305_t1_tal_lin_8_dxyz.mnc does not exist
/opt/minc/1.9.18/bin/../share/mni-models/average305_t1_tal_lin_16_mask.mnc does not exist
/opt/minc/1.9.18/bin/../share/mni-models/average305_t1_tal_lin_8_mask.mnc does not exist
/opt/minc/1.9.18/bin/../share/mni-models/average305_t1_tal_lin_headmask.mnc does not exist
Died at /opt/minc/1.9.18/bin/mritotal line 728.

I have also tried to direct the command with the icbm models offered in http://bic-mni.github.io/ using the option -modeldir and -model and I have the same problem:

$ mritotal /Users/samuelpare/Documents/MRI/rr_tar_DICOM/g124r/anonymized_19890323_183722/anonymized_19890323_183722_5d1_mri.mnc c1.mnc -modeldir /opt/minc/share/icbm152_model_09a -model mni_icbm152_csf_tal_nlin_sym_09a      
Loading configuration file /opt/minc/1.9.18/bin/../etc/mritotal.cfg
Loading protocol default (protocol file = /opt/minc/1.9.18/bin/../etc/mritotal.default.cfg)
/opt/minc/share/icbm152_model_09a/mni_icbm152_csf_tal_nlin_sym_09a_16_blur.mnc does not exist
/opt/minc/share/icbm152_model_09a/mni_icbm152_csf_tal_nlin_sym_09a_8_blur.mnc does not exist
/opt/minc/share/icbm152_model_09a/mni_icbm152_csf_tal_nlin_sym_09a_8_dxyz.mnc does not exist
/opt/minc/share/icbm152_model_09a/mni_icbm152_csf_tal_nlin_sym_09a_16_mask.mnc does not exist
/opt/minc/share/icbm152_model_09a/mni_icbm152_csf_tal_nlin_sym_09a_8_mask.mnc does not exist
/opt/minc/share/icbm152_model_09a/mni_icbm152_csf_tal_nlin_sym_09a_headmask.mnc does not exist
Died at /opt/minc/1.9.18/bin/mritotal line 728.

Anyone know what I am missing?

Thank you very much, Samuel

vfonov commented 3 years ago

you are missing data package with models (i.e http://packages.bic.mni.mcgill.ca/minc-toolkit/MacOSX/bic-mni-models-0.1.1-20120421.dmg )

SamPare commented 3 years ago

I had already downloaded this package and I even tried to delete/re-download them and the issue persists. However, it seems that the command is trying to find models with names that do not match the models I get from the package.

For instance, the package with models gives me the model : mni_icbm152_t1_tal_nlin_sym_09a_mask.mnc but the command is looking for mni_icbm152_csf_tal_nlin_sym_09a_8_mask.mnc.

It always adds a 8 or 16 the file names they are trying to find. Moreover, the _blur files seems to be missing from the package models.

Any clue?

Thank you

vfonov commented 3 years ago

I see, sorry, looks like we forgot to include autogenerated files for mritotal it's looking for downsampled (by 8x8x8 mm version of original file) you can use a different script instead of mritotal , that produces needed files on the fly : bestlinreg.pl

vfonov commented 3 years ago

try bestlinreg.pl /Users/samuelpare/Documents/MRI/rr_tar_DICOM/g124r/anonymized_19890323_183722/anonymized_19890323_183722_5d1_mri.mnc /opt/minc/share/icbm152_model_09a/mni_icbm152_t1_tal_nlin_sym_09a.mnc c1.xfm c1.mnc

SamPare commented 3 years ago

It worked! Thank you so much!

gdevenyi commented 3 years ago

I'm going to reopen this to document the missing pre-gened files.

vfonov commented 3 years ago

one need to run make_model script, it will generate downsampled files. However , almost nobody is using mritotal these days.

gdevenyi commented 3 years ago

I agree bestlinreg is better, things should work at least :)