Giter Club home page Giter Club logo

o3d-code's People

Contributors

andnp avatar ccaiafa avatar francopestilli avatar paolopost avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

o3d-code's Issues

Fix the naming of 'run' tag

The naming convention for filename is a collection of attribute-value pair.
The separator of pair is the character '_' the separator of attribute and value is '-' (dash).
Currently the naming is 'run01', it should be fixed in 'run-01'

Change reference anatomy

In all the scripts related to tractography:
init_tracking_dtidet_trk
init_tracking_csddet_trk
init_tracking_csdprob_trk
dissection_afq_trk
init_tracking_dtidet_tck
init_tracking_csddet_tck
init_tracking_csdprob_tck
dissection_afq_tck
the reference anatomy should be the dwi nifti image in [..]/derivative/preprocess folder.
It means that it will be not possible to call the script above before init_preprocessing.
I have already include this dependency in all_pipeline.sh

Redundant O3D_ prefix

Currently there is a redundant prepending of the O3D_ prefix to the dataset (for example O3D_O3D_STN or O3D_O3D_HCP3T). There is a clash between the hypothesis that the dataset name is simply the lower case code, and the mapping of dataset_root dictionary. Probably the issue is located in the getAnatomy function in the copy_template.py module.

init_dissection_afq_trk script limited to dtidet tractography

The init_dissection_afq_trk generate all the files related to the dissection of main tracts, one for each of them. This operation is currently applied only to one type of tractography: "dtidet". The other two types of tractography are missing: "csddet" and "csdprob".
We have two options: (i) replicate the scripts, as done for init_tracking or (ii) include two additional calls in the current script.

Change of tag 'subset' in filenames

The tag for the attribute '_subset-' should be renamed in '_set-'. The change occurs both for files to be generated and in the script of o3d_tree.py.

File naming mismatch between init_dissection_afq_trk and init_dissection_afq_trk

The init_dissection_afq_tck script gets the files generated by init_dissection_afq_trk and produces the correspondent file with the suffix ".tck" instead of ".trk".
The file currently generated by init_dissection_afq_trk is:
sub-0001_dwi_DTI_var_dtidetlife_run-01_tract_subset-ARCl_tract.trk
while the script init_dissection_afq_tck is looking for
sub-0001_dwi_DTI_var_dtidetlife_run-01_tract_var-afq_set-ATRl_track.trk
This second filename is the correct one. The script init_dissection_afq_trk should be fixed to generated the correct file name.

Manage exception for hcp7t in init_preprocess script

The files ".bvecs" and ".bvals" shouldn't be simply copied. The comma char has to be replaced by a whitespace. The replacement can be managed as follows:
sed 's/,/\ /g' input-file > output-file
This step is applied to hcp7t dataset only.

Add additional step in init_preprocessing and init_recon_models scripts

The scripts init_preprocessing and init_recon_models copy nifti (nii.gz) files.
The simple copy should be replaced by a call to change the orientation of images from 'neurological' to 'radiological'. This step applies only to STN and HCP3 (not HCHP7).
The change of orientation can be operated by the following call:
mri_convert -iid -1 0 0 <input_file> <output_file>
The init_tracking* and init_dissection* script should refer to these images in such a way also the tractograms will be in the radiological orientation.

Missing dataset mapping in init_tracking_* scripts

In all init_tracking_* scripts the call "getAnatomy" raises an issue because the key of dataset is not mapped to the proper name of the dataset, for example "stn" is converted to "STN" rather than "O3D_STN".

Fixing filenaming in init_dissection_afq script

The file naming convention is to separate the pair attribute/value by a "dash" like attribute-value. For example:
sub-0001_dwi_DTI_var_dtidetlife_run-01_tract_subset-ARCl_tract.trk (current)
sub-0001_dwi_DTI_var-dtidetlife_run-01_tract_subset-ARCl_tract.trk (correct)

Masking HCP7T recon_model images

The images of HCP7T in 'recon_model' pipeline folder should be masked:
sub-{108323, 109123, 131217, 910241}_b-2000_dwi.bvec
sub-{108323, 109123, 131217, 910241}_b-2000_dwi_FA.nii.gz
sub-{108323, 109123, 131217, 910241}_b-2000_dwi_DTI.nii.gz
sub-{108323, 109123, 131217, 910241}_b-2000_dwi_ODF.nii.gz

The command line to apply the mask is the following
fslmaths <input_file> -mas <mask_file> <output_file>

The masks for each subject are here
DIR: /N/dc2/projects/lifebid/HCP7/
FILES: {108323, 109123, 131217, 910241}/diffusion_data/nodif_brain_mask.nii.gz

Move files from 'recon_model' to 'preprocess' folder

Move the following files
sub-001_b-2000_dwi.nii.gz
sub-001_b-2000_dwi.bval
sub-001_b-2000_dwi.bvec
from this folder
O3D_{STN,HCP3T,HCP7T}/derivatives/recon_models/sub-/dwi
to the following folder
O3D_{STN,HCP3T,HCP7T}/derivatives/preprocess/sub-
/dwi

Change of tag 'trial' in filename

The tag for the attribute '_trial-' should be renamed in '_run-'. The change occurs both for files to be generated and in the script of o3d_tree.py.

Fixing input filename for hcp3t in init_dissection_afq_trk script

The input file for the "hcp3t" dataset in in the following folder
/N/dc2/projects/lifebid/code/ccaiafa/Caiafa_Pestilli_paper2015/Results/ETC_Dec2015/Single_TC/
with the following name
fe_structure_105115_STC_run01_500000_tensor__connNUM01_TRACTS.mat
while the current wrong name is
fe_structure_105115_stc_run01_500000_tensor__connNUM01_TRACTS.mat
The one report above is just an example for the pattern of file name.

Change of tag 'variant' in filenames

The tag for the attribute '_variant-' should be renamed in '_var-'. The change occurs both for files to be generated and in the script of o3d_tree.py.

Mismatch bval and bvec filename

the init_preprocess script use 'bvals' and 'bvecs' while o3d_tree.py uses 'bval' and 'bvec'. Revision of o3d_tree.py according to init_preprocess.

Wrong mask in init_preprocessing for hcp7T

The init_preprocessing doesn't work for hcp7t. The diagnostic message is not meaningful. Looking at the code it looks like there is a step of applying the mask to .bvecs and .bvals. These two kind of files should be simply copied. The mask should be applied only to the diffusion .nii.gz.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.