Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# By Julien Cohen-Adad (25) and Benjamin De Leener (5)
# Via Julien Cohen-Adad (5) and Benjamin De Leener (1)
* 'master' of https://github.com/neuropoly/spinalcordtoolbox: (30 commits)
  BUG: fixed really stupid thing
  BUG: fixed supid thing
  BUG: forgot debug mode
  DOC: minor improvement
  BUG: updated new name for msct_nurbs
  DOC: updated batch_processing
  DOC: add & to fslview line for PropSeg
  DOC: CHANGES updated
  BUG: fixed bug on default values for PropSeg
  TEST: fixed wrong flag
  BIG: fixed wrong flag
  OPT: removed padding of straight landmarks before estimating pairwise transformation
  BUG: fixed input parameters
  OPT: now importing libraries inside modules
  REF: cleaning
  OPT: changed name
  DOC: display useful info in sct_crop_image. Fixed #291
  OPT: added verification if all labels provided by the user are different before registration to template. Fixed #273
  TEST: updated tests
  OPT: fixed issue #294
  ...
  • Loading branch information
slevyrosetti committed Apr 2, 2015
2 parents 5098150 + 510c02d commit 2c57788
Show file tree
Hide file tree
Showing 22 changed files with 676 additions and 840 deletions.
5 changes: 3 additions & 2 deletions CHANGES.md
Expand Up @@ -5,8 +5,8 @@

- NEW: sct_fmri_compute_tsnr: new function to compute TSNR from fMRI data (performs moco before)
- OPT: sct_straighten_spinalcord: now MUCH faster and more accurate (issue #240)
- OPT: sct_register_to_template: more accurate, allows more flexibility regarding input parameters.
N.B. parameter "-m" has been replaced by "-s"
- OPT: sct_register_to_template: allows more flexibility by allowing multiple steps for registration (flag -p).
- N.B. flag "-m" has been replaced by "-s"
- OPT: sct_register_multimodal: allows more flexibility by imposing only one stage. Several stages can be run sequentially and then transformations can be concatenated.
- OPT: sct_extract_metric: new methods for extraction: maximum likelihood and maximum a posteriori, which take into account partial volume effect
- OPT: new WM atlas: added gray matter and CSF for computing partial volume
Expand All @@ -18,6 +18,7 @@
- OPT: straightening: improved smoothing and variable resolution
- OPT: sct_register_multimodal: simplification of registration between multimodal images, it is now possible to use regularized slice-wise registration (SliceReg)
- NEW: sct_get_ernst_angle: new script to compute and display Ernst angle depending on T1 and TR
- OPT: sct_process_segmentation: now allows to compute average CSA across vertebral levels (or slices)

##1.1.2_beta (2014-12-25)

Expand Down
9 changes: 4 additions & 5 deletions batch_processing.sh
Expand Up @@ -16,16 +16,15 @@ cd sct_example_data
# ===========================================================================================
cd t2
# spinal cord segmentation
# tips: we use "-max-deformation 3" otherwise the segmentation does not cover the whole spinal cord
# tips: we use "-max-deformation 4" otherwise the segmentation does not cover the whole spinal cord
# tips: we use "-init 130" to start propagation closer to a region which would otherwise give poor segmentation (try it with and without the parameter).
# tips: we use "-centerline-binary" to get the centerline, which can be used to initialize segmentation on other contrasts.
sct_propseg -i t2.nii.gz -t t2 -centerline-binary -mesh -max-deformation 4 -init 130
# tips: we use "-mesh" to get the mesh of the segmentation, which can be viewed using MITKWORKBENCH
sct_propseg -i t2.nii.gz -t t2 -mesh -max-deformation 4 -init 130
# check your results:
fslview t2 -b 0,800 t2_seg -l Red -t 0.5 &
# tips: You can also use MITKWORKBENCH to view the mesh.
# At this point you should make labels. Here we can use the file labels.nii.gz, which contains labels at C3 (value=3) and T4 (value=11).
# register to template
sct_register_to_template -i t2.nii.gz -l labels.nii.gz -m t2_seg.nii.gz -o 1 -s normal -r 0
sct_register_to_template -i t2.nii.gz -l labels.nii.gz -s t2_seg.nii.gz -r 0
# warp template and white matter atlas
sct_warp_template -d t2.nii.gz -w warp_template2anat.nii.gz
# compute cross-sectional area
Expand Down
Binary file modified bin/osx/sct_crop_image
Binary file not shown.
3 changes: 2 additions & 1 deletion dev/sct_crop_image/main.cpp
Expand Up @@ -381,8 +381,9 @@ int transform(string inputFilename, string outputFilename, string maskFilename,
}
}

cout << "Cropping the following region:" << endl;
for (int i=0; i<N; i++)
cout << startSlices[i] << " " << endSlices[i] << endl;
cout << "Dimension " << i << ": " << startSlices[i] << " " << endSlices[i] << endl;

typename ImageType::IndexType desiredStart1;
desiredStart1.Fill(0);
Expand Down
2 changes: 0 additions & 2 deletions scripts/sct_nurbs.py → scripts/msct_nurbs.py
Expand Up @@ -59,8 +59,6 @@
#
# License: see the LICENSE.TXT
#=======================================================================================================================
import sys
import math
# check if needed Python libraries are already installed or not
try:
from numpy import *
Expand Down
2 changes: 0 additions & 2 deletions scripts/msct_parser.py
Expand Up @@ -56,7 +56,6 @@
#########################################################################################

import sct_utils as sct
from msct_types import *

########################################################################################################################
####### OPTION
Expand Down Expand Up @@ -263,7 +262,6 @@ def parse(self, arguments):

# check if optional arguments with default values are all in the dictionary. If not, add them.
for option in [opt for opt in self.options if not self.options[opt].mandatory]:
print option
if option not in dictionary and self.options[option].default_value:
dictionary[option] = self.options[option].default_value

Expand Down

0 comments on commit 2c57788

Please sign in to comment.