Category
Hi Tortoise community,
After applying DIFFPREP to process ex-vivo tissue blocks, my final EPI corrected diffusion images should be stored in the EPI_field.nii. While the file is created, it contents remain empty.. I don't get any error messages in my terminal. Any ideas? Possibly the pipeline is a bit different when using non whole-brain data?
Cheers,
Jeroen
Jeroen -
I think it would solve your problem to use a registration settings file that is customized for your DWIs, especially for their spatial dimensions.
Generally, the default settings for DIFFPREP assume your images are of an in-vivo human brain, but for pre-clinical or ex-vivo data we need to change the settings. The flag to use in the DIFFPREP command is --reg_settings and the field should be the name for a file that exists in your */DIFF_PREP_WORK directory with the extension *.dmc
I'll put an example below for you to start with, you can copy it into a text file and save as <>.dmc within your DIFF_PREP_WORK directory. It is important that you change the fields of this file (using any text editor) to suit your sample and registration. I usually spend some time at the beginning of a study optimizing this file and then use it consistently for all samples.
Here is the registration settings content I used recently for a tissue block:
<!-- DTI initialization file -->
<!-- do not remove the above comment line -->
<!--***********************************************************************-->
<!-- CORRECTION MODE -->
<!-- -->
<!-- Specifies which undesirable effects will be corrected. Predefined -->
<!-- motion & eddy distortion correction optimization settings (each -->
<!-- setting points to a file in the software settings folder: -->
<!-- off :No DWI registration. -->
<!-- rigid :Corrects only motion. -->
<!-- quadratic :Eddy currents are modeled with quadratic functions. -->
<!-- Quadratic -->
<!-- model is sufficient 99% of the time. -->
<!-- cubic :Eddy currents are modeled with cubic functions. -->
<!-- multistart :Eddy currents are modeled with quadratic functions. -->
<!-- The rigid search space is VERY LARGE. This can be used -->
<!-- to register sagittal images to axial for example. -->
<!-- You can also create a custom settings file in ~/DIFF_PREP_WORK and -->
<!-- put its name here. -->
<correction_mode>rigid</correction_mode>
<!--***********************************************************************-->
<!-- EPI CORRECTION -->
<!-- -->
<!-- Predefined EPI distortion correction optimization settings. Each -->
<!-- setting points to a file in the software settings folder. -->
<!-- -->
<!-- off :Do not perform EPI distortion correction. -->
<!-- ITKBSP :Perform BSplines transformation based correction with -->
<!-- ITK. Similar to previous version of DIFFPREP. -->
<!-- ITKBSPv4 :Perform BSplines transformation based correction with -->
<!-- itkv4. Multiresolution. More powerful than ITKBSP but -->
<!-- more sensitive. -->
<!-- ANTSSyN :Perform SyN transformation based correction with ANTs. -->
<!-- Most powerful but most sensitive too. -->
<!-- The parameters for each method is described in their corresponding -->
<!-- files. -->
<EPI_optimization_settings>off</EPI_optimization_settings>
<!--***********************************************************************-->
<!-- REFERENCE VOL INDEX -->
<!-- -->
<!-- Among possibly many b=0 s/mm2 images, the index of the b=0 image -->
<!-- (within only b=0 images) to be used as template. Starting index is -->
<!-- zero, so that b0_id=2 will select the 3rd b=0 image. Defaults to the -->
<!-- first b=0 image with id of 0. -->
<b0_id>0</b0_id>
<!--***********************************************************************-->
<!-- GIBBS RINGING CORRECTION -->
<!-- -->
<!-- For the original unprocessed DWIs. See Kellner, Dhital, Kiselev and -->
<!-- Resiert, MRM 2016, 76:1574-1581. -->
<!-- off :Do not perform Gibbs ringing correction. -->
<!-- on :Perform Gibbs ringing correction. -->
<gibbs_ringing_correction>off</gibbs_ringing_correction>
<!--***********************************************************************-->
<!-- DENOISING -->
<!-- -->
<!-- Methods for DWI images denoising based on J. Veraart, E. Fieremans, -->
<!-- and D.S. Novikov, `Diffusion MRI noise mapping using random matrix -->
<!-- theory' Magn Res. Med., early view (2016), doi: 10.1002/mrm.26059. -->
<!-- off :Still performs the denoising but only uses the output -->
<!-- noise image for noise computations. -->
<!-- for_reg :Uses the denoised DWIs for registration but outputs as -->
<!-- the final images the corrected original images. -->
<!-- for_final :Uses the denoised DWIs for both registration and as the -->
<!-- final corrected images. -->
<denoising>for_final</denoising>
<!--***********************************************************************-->
<!-- HUMANITY -->
<!-- -->
<!-- Is it a human brain? Specialized processing is performed if the -->
<!-- brain is human. -->
<!-- 0 :No, not human brain. -->
<!-- 1 :Yes, human brain. -->
<is_human_brain>0</is_human_brain>
<!--***********************************************************************-->
<!-- UPSAMPLING GEOMETRY -->
<!-- -->
<!-- Options. -->
<!-- off :No upsampling. -->
<!-- all :Upsampling in all directions. -->
<!-- slice :Upsampling in slice direction only. -->
<!-- If value entered does not match any of the above, it defaults to -->
<!-- "all". -->
<upsampling>slice</upsampling>
<!--***********************************************************************-->
<!-- UPSAMPLING AMOUNT -->
<!-- -->
<!-- Upsampling factor. By what factor each dimensions's resolution will -->
<!-- be reduced (improved) by. -->
<upsampling_factor>2.0000000</upsampling_factor>
<!--***********************************************************************-->
<!-- INTERPOLATION METHOD -->
<!-- -->
<!-- Determines the algorithm to use for upsampling. -->
<!-- -->
<!-- Will take effect only if <upsampling> is all or slice_only -->
<!-- NN :3D Nearest neighbor -->
<!-- Linear :Trilinear -->
<!-- BSPCubic :B-splines cubic. -->
<!-- Sync :Hamming sync -->
<upsampling_method>Linear</upsampling_method>
<!--***********************************************************************-->
<!-- HIGH B-VALUE REGISTRATION -->
<!-- -->
<!-- High b-value registration for HARDI data. Only use this option if -->
<!-- your data have very high b-values which result in low SNR, as this -->
<!-- option is slow. -->
<!-- Options for 'perform_high_bval_correction': -->
<!-- 0 :Standard correction (i.e., no extra correction; default).-->
<!-- 1 :Enable high b-value correction. -->
<!-- -->
<!-- If "1", then all volumes with bval <= 'high_b_dti_end_bval' will be -->
<!-- corrected with standard processing. For vols with -->
<!-- 'high_b_dti_end_bval' < bval <= 'high_b_mapmri_start_bval', -->
<!-- a noise- and distortion-free synthetic image will be synthesized from -->
<!-- the tensor model and will be used as the target. -->
<!-- For volumes with bval > 'high_b_mapmri_start_bval', a noise- and -->
<!-- distortion-free synthetic image will be synthesized from the MAPMRI -->
<!-- model and will be used as the target. -->
<perform_high_bval_correction>0</perform_high_bval_correction>
<high_b_dti_end_bval>1800</high_b_dti_end_bval>
<high_b_mapmri_start_bval>3000</high_b_mapmri_start_bval>
<!--***********************************************************************-->
<!-- PRE-SMOOTHING -->
<!-- -->
<!-- Smoothing of images prior to registration. Specify whether or not to -->
<!-- smooth the source and target images prior to registration (the final -->
<!-- output, however, will not be smoothed). Options are: -->
<!-- off : -->
<!-- gaussian : -->
<!-- PM :Perona-Malik. -->
<smoothing>off</smoothing>
<!--***************************************************************************-->
<!--Place the center of mass of the image to the center pixel in the working FoV?-->
<center_of_mass>1</center_of_mass>
<!--***************************************************************************-->
<!--Desired working FoV. Applied to template image during cropping (value in mm)-->
<!--Only for internal processing. Does not affect the output.-->
<FoVx>32.0000</FOVx>
<FoVy>40.00000</FOVy>
<FoVz>6.50000</FOVz>
<!--***********************************************************************-->
<!-- OUTPUT INTERMEDIATE, I -->
<!-- -->
<!-- Write intermediate motion & eddy corrected data (the transformation -->
<!-- file is written regardless). This should be written just for -->
<!-- troubleshoothing purposes. -->
<!-- 0 :No, don't write intermediate files out. -->
<!-- 1 :Yes, write intermediate files out. -->
<write_rpd>0</write_rpd>
<!--***********************************************************************-->
<!-- OUTPUT INTERMEDIATE, II -->
<!-- -->
<!-- Write intermediate motion & eddy & EPI distortion corrected data (the -->
<!-- transformation file is written regardless). This should be written -->
<!-- just for troubleshoothing purposes. -->
<!-- 0 :No, don't write intermediate files out. -->
<!-- 1 :Yes, write intermediate files out. -->
<write_rpd_epi>0</write_rpd_epi>
<!--***********************************************************************-->
<!-- OUTPUT INTERMEDIATE, III -->
<!-- -->
<!-- Keep intermediate files?: -->
<!-- 0 :No, don't keep the intermediate files. -->
<!-- 1 :Yes, keep the intermediate files. -->
<keep_intermediate_files>0</keep_intermediate_files>
<!--***********************************************************************-->
<!-- OUTPUT RESOLUTION -->
<!-- -->
<!-- Final diffusion weighted and structural image output resolution -->
<!-- (value in mm). -->
<res_x>0.25</res_x>
<res_y>0.25</res_y>
<res_z>0.25</res_z>