Skip to content

Commit

Permalink
pushing elastix files
Browse files Browse the repository at this point in the history
  • Loading branch information
ad12 committed Oct 1, 2018
1 parent 167b2b8 commit 541f89f
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#dicoms
**/dicoms

**/elastix_params

# test data files
**/temp
**/ex_patient
Expand Down
69 changes: 69 additions & 0 deletions elastix_params/parameters-affine.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// *********************
// * affine
// *********************

// *********************
// * ImageTypes
// *********************
(FixedInternalImagePixelType "float")
(MovingInternalImagePixelType "float")
(UseDirectionCosines "true")

// *********************
// * Components
// *********************
(FixedImagePyramid "FixedSmoothingImagePyramid")
(MovingImagePyramid "MovingSmoothingImagePyramid")
(Registration "MultiResolutionRegistration")
(Interpolator "BSplineInterpolator")
(ResampleInterpolator "FinalBSplineInterpolator")
(Metric "AdvancedMattesMutualInformation")
(BSplineInterpolationOrder 1)
(Resampler "DefaultResampler")
(Optimizer "AdaptiveStochasticGradientDescent")
(Transform "AffineTransform")

// *********************
// * Mask settings
// *********************
(ErodeMask "false")
(ErodeFixedMask "false")

// *********************
// * Optimizer settings
// *********************
(NumberOfResolutions 1)
(MaximumNumberOfIterations 1000)
(ASGDParameterEstimationMethod "Original")
(AutomaticParameterEstimation "true")
(AutomaticTransformInitialization "true")
(AutomaticScalesEstimation "true")

// *********************
// * Transform settings
// *********************
(HowToCombineTransforms "Compose")

// *********************
// * Pyramid settings
// *********************
(NumberOfHistogramBins 32)


// *********************
// * Sampler parameters
// *********************
(NumberOfSpatialSamples 2000)
(ImageSampler "RandomCoordinate")
(CheckNumberOfSamples "true")
(NewSamplesEveryIteration "true")
(FinalBSplineInterpolationOrder 3)

// *********************
// * Output settings
// *********************
(DefaultPixelValue 0)
(WriteTransformParametersEachIteration "false")
(WriteResultImage "true")
(ResultImageFormat "nii.gz")
(ResultImagePixelType "float")
71 changes: 71 additions & 0 deletions elastix_params/parameters-bspline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// *********************
// * bspline
// *********************

// *********************
// * ImageTypes
// *********************
(FixedInternalImagePixelType "float")
(MovingInternalImagePixelType "float")
(UseDirectionCosines "true")

// *********************
// * Components
// *********************
(FixedImagePyramid "FixedSmoothingImagePyramid")
(MovingImagePyramid "MovingSmoothingImagePyramid")
(Registration "MultiResolutionRegistration")
(Interpolator "BSplineInterpolator")
(ResampleInterpolator "FinalBSplineInterpolator")
(Metric "AdvancedMattesMutualInformation")
(BSplineInterpolationOrder 1)
(Resampler "DefaultResampler")
(Optimizer "AdaptiveStochasticGradientDescent")
(Transform "BSplineTransform")
(FinalGridSpacingInPhysicalUnits 30 30 30)
(MovingImageDerivativeScales 1 1 1)

// *********************
// * Mask settings
// *********************
(ErodeMask "false")
(ErodeFixedMask "false")

// *********************
// * Optimizer settings
// *********************
(NumberOfResolutions 3)
(MaximumNumberOfIterations 1000)
(ASGDParameterEstimationMethod "Original")
(AutomaticParameterEstimation "true")
(AutomaticTransformInitialization "true")
(AutomaticScalesEstimation "true")

// *********************
// * Transform settings
// *********************
(HowToCombineTransforms "Compose")

// *********************
// * Pyramid settings
// *********************
(NumberOfHistogramBins 32)


// *********************
// * Sampler parameters
// *********************
(NumberOfSpatialSamples 2000)
(ImageSampler "RandomCoordinate")
(CheckNumberOfSamples "true")
(NewSamplesEveryIteration "true")
(FinalBSplineInterpolationOrder 3)

// *********************
// * Output settings
// *********************
(DefaultPixelValue 0)
(WriteTransformParametersEachIteration "false")
(WriteResultImage "true")
(ResultImageFormat "nii.gz")
(ResultImagePixelType "float")
69 changes: 69 additions & 0 deletions elastix_params/parameters-rigid.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// *********************
// * rigid
// *********************

// *********************
// * ImageTypes
// *********************
(FixedInternalImagePixelType "float")
(MovingInternalImagePixelType "float")
(UseDirectionCosines "true")

// *********************
// * Components
// *********************
(FixedImagePyramid "FixedSmoothingImagePyramid")
(MovingImagePyramid "MovingSmoothingImagePyramid")
(Registration "MultiResolutionRegistration")
(Interpolator "BSplineInterpolator")
(ResampleInterpolator "FinalBSplineInterpolator")
(Metric "AdvancedMattesMutualInformation")
(BSplineInterpolationOrder 1)
(Resampler "DefaultResampler")
(Optimizer "AdaptiveStochasticGradientDescent")
(Transform "EulerTransform")

// *********************
// * Mask settings
// *********************
(ErodeMask "false")
(ErodeFixedMask "false")

// *********************
// * Optimizer settings
// *********************
(NumberOfResolutions 3)
(MaximumNumberOfIterations 1000)
(ASGDParameterEstimationMethod "Original")
(AutomaticParameterEstimation "true")
(AutomaticTransformInitialization "true")
(AutomaticScalesEstimation "true")

// *********************
// * Transform settings
// *********************
(HowToCombineTransforms "Compose")

// *********************
// * Pyramid settings
// *********************
(NumberOfHistogramBins 32)


// *********************
// * Sampler parameters
// *********************
(NumberOfSpatialSamples 2000)
(ImageSampler "RandomCoordinate")
(CheckNumberOfSamples "true")
(NewSamplesEveryIteration "true")
(FinalBSplineInterpolationOrder 3)

// *********************
// * Output settings
// *********************
(DefaultPixelValue 0)
(WriteTransformParametersEachIteration "false")
(WriteResultImage "true")
(ResultImageFormat "nii.gz")
(ResultImagePixelType "float")
4 changes: 2 additions & 2 deletions scripts/test-script
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
WEIGHTS_DIRECTORY="/Users/arjundesai/Documents/stanford/research/msk_pipeline_raw/weights"
WEIGHTS_DIRECTORY=""
if [ -z "$WEIGHTS_DIRECTORY" ]; then
echo "Please define WEIGHTS_DIRECTORY in script. Use the absolute path"
exit 125
Expand Down Expand Up @@ -63,5 +63,5 @@ for i in $FILES; do
fi

# analyze femoral cartilage
python -m pipeline -l $SAVE_DIRNAME knee -fc -t2 -t1_rho
python -m pipeline -l $SAVE_DIRNAME knee -fc -t2 -t1_rho -t2_star
done

0 comments on commit 541f89f

Please sign in to comment.