├── .clang-format ├── .dockerignore ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── build_errors.md │ ├── config.yml │ ├── feature_request.md │ └── other_questions.md ├── pull_request_template.md ├── stale.yml └── workflows │ ├── ci-docker.yml │ ├── github-repo-stats.yml │ ├── release-binaries.yml │ ├── release-docker-binaries.yml │ └── release-win-binaries.yml ├── .gitignore ├── .htaccess ├── .mailmap ├── .travis.yml ├── ANTS.cmake ├── ANTSCopyright.txt ├── ANTSnightly.sh ├── ANTsVersionConfig.h.in ├── CITATION.bib ├── CMake ├── ANTSExternalData.cmake ├── CCache.cmake ├── ExternalData_config.cmake.in ├── GetGitRevisionDescription.cmake ├── ITKSetStandardCompilerFlags.cmake ├── ITK_CheckCCompilerFlag.cmake ├── ITK_CheckCXXCompilerFlag.cmake ├── PreventInBuildInstalls.cmake ├── PreventInSourceBuilds.cmake ├── ProjectSourceVersion.cmake ├── SlicerMacroCheckExternalProjectDependency.cmake ├── SlicerMacroEmptyExternalProject.cmake ├── itkCheckSourceTree.cmake └── pre-commit ├── CMakeLists.txt ├── CONTRIBUTING.md ├── COPYING.txt ├── CTestConfig.cmake ├── CTestCustom.cmake ├── Common.cmake ├── Dockerfile ├── Examples ├── ANTS.cxx ├── ANTSConformalMapping.cxx ├── ANTSIntegrateVectorField.cxx ├── ANTSIntegrateVelocityField.cxx ├── ANTSJacobian.cxx ├── ANTSUseDeformationFieldToGetAffineTransform.cxx ├── ANTSUseLandmarkImagesToGetAffineTransform.cxx ├── ANTSUseLandmarkImagesToGetBSplineDisplacementField.cxx ├── ANTsVersion.cxx ├── ANTsVersion.h ├── AddNoiseToImage.cxx ├── Atropos.cxx ├── AverageAffineTransform.cxx ├── AverageAffineTransformNoRigid.cxx ├── AverageImages.cxx ├── AverageTensorImages.cxx ├── CMakeLists.txt ├── CheckTopology.cxx ├── ClusterImageStatistics.cxx ├── ComposeMultiTransform.cxx ├── CompositeTransformUtil.cxx ├── ComputeSimilarityMetric.cxx ├── ConformalMapping.cxx ├── ConvertImage.cxx ├── ConvertImagePixelType.cxx ├── ConvertInputImagePixelTypeToFloat.cxx ├── ConvertScalarImageToRGB.cxx ├── ConvertToJpg.cxx ├── ConvertTransformFile.cxx ├── ConvertVectorFieldToVTK.cxx ├── CopyImageHeaderInformation.cxx ├── CreateDTICohort.cxx ├── CreateDisplacementField.cxx ├── CreateImage.cxx ├── CreateJacobianDeterminantImage.cxx ├── CreateTiledMosaic.cxx ├── CreateWarpedGridImage.cxx ├── CustomColormaps │ ├── bone.txt │ ├── christmas.txt │ ├── christmas2.txt │ ├── colorcube.txt │ ├── cool.txt │ ├── flag.txt │ ├── itkSnap.txt │ ├── itkSnap255.txt │ ├── itkSnap_BRATS.txt │ ├── lines.txt │ ├── pink.txt │ ├── prism.txt │ └── vga.txt ├── DeNrrd.cxx ├── DenoiseImage.cxx ├── ExtractRegionFromImage.cxx ├── ExtractRegionFromImageByMask.cxx ├── ExtractSliceFromImage.cxx ├── FitBSplineToPoints.cxx ├── GetConnectedComponentsFeatureImages.cxx ├── GetMeshAndTopology.cxx ├── ImageCompare.cxx ├── ImageIntensityStatistics.cxx ├── ImageMath.cxx ├── ImageMathHelper2D.cxx ├── ImageMathHelper3D.cxx ├── ImageMathHelper4D.cxx ├── ImageMath_Templates.hxx ├── ImageSetStatistics.cxx ├── KellyKapowski.cxx ├── KellySlater.cxx ├── LabelClustersUniquely.cxx ├── LabelGeometryMeasures.cxx ├── LabelOverlapMeasures.cxx ├── LaplacianThickness.cxx ├── LesionFilling.cxx ├── MeasureImageSimilarity.cxx ├── MeasureMinMaxMean.cxx ├── MemoryTest.cxx ├── MultiplyImages.cxx ├── N3BiasFieldCorrection.cxx ├── N4BiasFieldCorrection.cxx ├── NonLocalSuperResolution.cxx ├── PasteImageIntoImage.cxx ├── PermuteFlipImageOrientationAxes.cxx ├── PrintHeader.cxx ├── RebaseTensorImage.cxx ├── ReorientTensorImage.cxx ├── ResampleImage.cxx ├── ResampleImageBySpacing.cxx ├── ResetDirection.cxx ├── SetDirectionByMatrix.cxx ├── SetOrigin.cxx ├── SetSpacing.cxx ├── SimulateDisplacementField.cxx ├── SmoothDisplacementField.cxx ├── SmoothImage.cxx ├── StackSlices.cxx ├── StudentsTestOnImages.cxx ├── SuperResolution.cxx ├── SurfaceBasedSmoothing.cxx ├── SurfaceCurvature.cxx ├── TensorDerivedImage.cxx ├── TestSuite │ ├── ANTS_CC_1_test.cmake │ ├── ANTS_CC_2_test.cmake │ ├── ANTS_CC_3_test.cmake │ ├── ANTS_ELASTIC_test.cmake │ ├── ANTS_EXP_test.cmake │ ├── ANTS_GSYN_test.cmake │ ├── ANTS_MI_1_test.cmake │ ├── ANTS_MI_2_test.cmake │ ├── ANTS_MSQ_test.cmake │ ├── ANTS_PSE_MSQ_IMG_test.cmake │ ├── ANTS_PSE_MSQ_TXT_test.cmake │ ├── ANTS_PSE_MSQ_VTK_test.cmake │ ├── ANTS_ROT_EXP_test.cmake │ ├── ANTS_ROT_GSYN_test.cmake │ ├── ANTS_SYN_WITH_TIME_test.cmake │ ├── ANTS_SYN_test.cmake │ ├── APOC_OTSU_INIT_test.cmake │ ├── CMakeLists.txt │ └── template_for_executableTestWrapper.cxx.in ├── Testing │ └── Temporary │ │ ├── CTestCostData.txt │ │ └── LastTest.log ├── TextureCooccurrenceFeatures.cxx ├── TextureRunLengthFeatures.cxx ├── ThresholdImage.cxx ├── TileImages.cxx ├── TimeSCCAN.cxx ├── WarpImageMultiTransform.cxx ├── WarpTensorImageMultiTransform.cxx ├── WarpTimeSeriesImageMultiTransform.cxx ├── WarpVTKPolyDataMultiTransform.cxx ├── antsAI.cxx ├── antsAffineInitializer.cxx ├── antsAlignOrigin.cxx ├── antsApplyTransforms.cxx ├── antsApplyTransformsToPoints.cxx ├── antsCommandIterationUpdate.h ├── antsDisplacementAndVelocityFieldRegistrationCommandIterationUpdate.h ├── antsJointFusion.cxx ├── antsJointTensorFusion.cxx ├── antsLandmarkBasedTransformInitializer.cxx ├── antsMotionCorr.cxx ├── antsMotionCorrDiffusionDirection.cxx ├── antsMotionCorrStats.cxx ├── antsRegistration.cxx ├── antsRegistration2DDouble.cxx ├── antsRegistration2DFloat.cxx ├── antsRegistration3DDouble.cxx ├── antsRegistration3DFloat.cxx ├── antsRegistration4DDouble.cxx ├── antsRegistration4DFloat.cxx ├── antsRegistrationCommandIterationUpdate.h ├── antsRegistrationOptimizerCommandIterationUpdate.h ├── antsRegistrationTemplateHeader.cxx ├── antsRegistrationTemplateHeader.h ├── antsSliceRegularizedRegistration.cxx ├── antsSurf.cxx ├── antsTransformInfo.cxx ├── antsUtilities.cxx ├── antsUtilities.h ├── antsUtilitiesTesting.cxx ├── antsVol.cxx ├── compareTwoTransforms.cxx ├── iMath.cxx ├── iMathFunctions.h ├── iMathFunctions.hxx ├── iMathFunctions1.h ├── iMathFunctions1.hxx ├── iMathFunctions2.h ├── iMathFunctions2.hxx ├── include │ ├── ANTSConformalMapping.h │ ├── ANTSIntegrateVectorField.h │ ├── ANTSIntegrateVelocityField.h │ ├── ANTSJacobian.h │ ├── ANTSUseDeformationFieldToGetAffineTransform.h │ ├── ANTSUseLandmarkImagesToGetAffineTransform.h │ ├── ANTSUseLandmarkImagesToGetBSplineDisplacementField.h │ ├── ANTS_.h │ ├── AddNoiseToImage.h │ ├── Atropos.h │ ├── AverageAffineTransform.h │ ├── AverageAffineTransformNoRigid.h │ ├── AverageImages.h │ ├── AverageTensorImages.h │ ├── CheckTopology.h │ ├── ClusterImageStatistics.h │ ├── ComposeMultiTransform.h │ ├── CompositeTransformUtil.h │ ├── ComputeSimilarityMetric.h │ ├── ConformalMapping.h │ ├── ConvertImage.h │ ├── ConvertImagePixelType.h │ ├── ConvertInputImagePixelTypeToFloat.h │ ├── ConvertScalarImageToRGB.h │ ├── ConvertToJpg.h │ ├── ConvertTransformFile.h │ ├── ConvertVectorFieldToVTK.h │ ├── CopyImageHeaderInformation.h │ ├── CreateDTICohort.h │ ├── CreateDisplacementField.h │ ├── CreateImage.h │ ├── CreateJacobianDeterminantImage.h │ ├── CreateTiledMosaic.h │ ├── CreateWarpedGridImage.h │ ├── DeNrrd.h │ ├── DenoiseImage.h │ ├── ExtractRegionFromImage.h │ ├── ExtractRegionFromImageByMask.h │ ├── ExtractSliceFromImage.h │ ├── FitBSplineToPoints.h │ ├── GetConnectedComponentsFeatureImages.h │ ├── GetMeshAndTopology.h │ ├── ImageCompare.h │ ├── ImageIntensityStatistics.h │ ├── ImageMath.h │ ├── ImageSetStatistics.h │ ├── KellyKapowski.h │ ├── KellySlater.h │ ├── LabelClustersUniquely.h │ ├── LabelGeometryMeasures.h │ ├── LabelOverlapMeasures.h │ ├── LaplacianThickness.h │ ├── LesionFilling.h │ ├── MeasureImageSimilarity.h │ ├── MeasureMinMaxMean.h │ ├── MemoryTest.h │ ├── MultiplyImages.h │ ├── N3BiasFieldCorrection.h │ ├── N4BiasFieldCorrection.h │ ├── NonLocalSuperResolution.h │ ├── PasteImageIntoImage.h │ ├── PermuteFlipImageOrientationAxes.h │ ├── PrintHeader.h │ ├── RebaseTensorImage.h │ ├── ReorientTensorImage.h │ ├── ResampleImage.h │ ├── ResampleImageBySpacing.h │ ├── ResetDirection.h │ ├── SetDirectionByMatrix.h │ ├── SetOrigin.h │ ├── SetSpacing.h │ ├── SimulateDisplacementField.h │ ├── SmoothDisplacementField.h │ ├── SmoothImage.h │ ├── StackSlices.h │ ├── StudentsTestOnImages.h │ ├── SuperResolution.h │ ├── SurfaceBasedSmoothing.h │ ├── SurfaceCurvature.h │ ├── TensorDerivedImage.h │ ├── TextureCooccurrenceFeatures.h │ ├── TextureRunLengthFeatures.h │ ├── ThresholdImage.h │ ├── TileImages.h │ ├── TimeSCCAN.h │ ├── WarpImageMultiTransform.h │ ├── WarpTensorImageMultiTransform.h │ ├── WarpTimeSeriesImageMultiTransform.h │ ├── WarpVTKPolyDataMultiTransform.h │ ├── ants.h │ ├── antsAI.h │ ├── antsAffineInitializer.h │ ├── antsAlignOrigin.h │ ├── antsApplyTransforms.h │ ├── antsApplyTransformsToPoints.h │ ├── antsImageRead.h │ ├── antsImageWrite.h │ ├── antsJointFusion.h │ ├── antsJointTensorFusion.h │ ├── antsLandmarkBasedTransformInitializer.h │ ├── antsMotionCorr.h │ ├── antsMotionCorrDiffusionDirection.h │ ├── antsMotionCorrStats.h │ ├── antsRegistration.h │ ├── antsSliceRegularizedRegistration.h │ ├── antsSurf.h │ ├── antsTransformInfo.h │ ├── antsUtilitiesTesting.h │ ├── antsVol.h │ ├── ants_moco.h │ ├── compareTwoTransforms.h │ ├── iMath.h │ ├── itkCommandLineParserTest.h │ ├── sccan.h │ └── simpleSynRegistration.h ├── itkCommandLineParserTest.cxx ├── itkTestMain.h ├── itkantsRegistrationHelper.h ├── itkantsRegistrationHelper.hxx ├── make_interpolator_snip.tmpl ├── sccan.cxx ├── simpleSynRegistration.cxx └── template_for_executables.cxx.in ├── ImageRegistration ├── ANTS_affine_registration.h ├── ANTS_affine_registration2.h ├── itkANTSAffine3DTransform.h ├── itkANTSAffine3DTransform.hxx ├── itkANTSCenteredAffine2DTransform.h ├── itkANTSCenteredAffine2DTransform.hxx ├── itkANTSImageRegistrationOptimizer.cxx ├── itkANTSImageRegistrationOptimizer.h ├── itkANTSImageTransformation.cxx ├── itkANTSImageTransformation.h ├── itkANTSLabeledPointSet.h ├── itkANTSSimilarityMetric.h ├── itkAvantsMutualInformationRegistrationFunction.cxx ├── itkAvantsMutualInformationRegistrationFunction.h ├── itkAvantsPDEDeformableRegistrationFunction.h ├── itkCrossCorrelationRegistrationFunction.cxx ├── itkCrossCorrelationRegistrationFunction.h ├── itkExpectationBasedPointSetRegistrationFunction.h ├── itkExpectationBasedPointSetRegistrationFunction.hxx ├── itkJensenHavrdaCharvatTsallisLabeledPointSetMetric.h ├── itkJensenHavrdaCharvatTsallisLabeledPointSetMetric.hxx ├── itkJensenHavrdaCharvatTsallisPointSetMetric.h ├── itkJensenHavrdaCharvatTsallisPointSetMetric.hxx ├── itkJensenTsallisBSplineRegistrationFunction.h ├── itkJensenTsallisBSplineRegistrationFunction.hxx ├── itkPICSLAdvancedNormalizationToolKit.h ├── itkPICSLAdvancedNormalizationToolKit.hxx ├── itkProbabilisticRegistrationFunction.cxx ├── itkProbabilisticRegistrationFunction.h ├── itkSpatialMutualInformationRegistrationFunction.cxx ├── itkSpatialMutualInformationRegistrationFunction.h ├── itkSyNDemonsRegistrationFunction.cxx ├── itkSyNDemonsRegistrationFunction.h ├── itkVectorParameterizedNeighborhoodOperatorImageFilter.h └── itkVectorParameterizedNeighborhoodOperatorImageFilter.hxx ├── ImageSegmentation ├── antsAtroposSegmentationImageFilter.h ├── antsAtroposSegmentationImageFilter.hxx ├── antsBoxPlotQuantileListSampleFilter.h ├── antsBoxPlotQuantileListSampleFilter.hxx ├── antsGaussianListSampleFunction.h ├── antsGaussianListSampleFunction.hxx ├── antsGrubbsRosnerListSampleFilter.h ├── antsGrubbsRosnerListSampleFilter.hxx ├── antsHistogramParzenWindowsListSampleFunction.h ├── antsHistogramParzenWindowsListSampleFunction.hxx ├── antsJointHistogramParzenShapeAndOrientationListSampleFunction.h ├── antsJointHistogramParzenShapeAndOrientationListSampleFunction.hxx ├── antsJointHistogramParzenWindowsListSampleFunction.h ├── antsJointHistogramParzenWindowsListSampleFunction.hxx ├── antsListSampleFunction.h ├── antsListSampleFunction.hxx ├── antsListSampleToListSampleFilter.h ├── antsListSampleToListSampleFilter.hxx ├── antsLogEuclideanGaussianListSampleFunction.h ├── antsLogEuclideanGaussianListSampleFunction.hxx ├── antsManifoldParzenWindowsListSampleFunction.h ├── antsManifoldParzenWindowsListSampleFunction.hxx ├── antsPartialVolumeGaussianListSampleFunction.h ├── antsPartialVolumeGaussianListSampleFunction.hxx ├── antsPassThroughListSampleFilter.h ├── antsPassThroughListSampleFilter.hxx ├── itkWeightedVotingFusionImageFilter.h └── itkWeightedVotingFusionImageFilter.hxx ├── README.md ├── Scripts ├── ANTSAverage2DAffine.sh ├── ANTSAverage3DAffine.sh ├── ANTSpexec.sh ├── ants.sh ├── antsASLProcessing.R ├── antsASLProcessing.sh ├── antsAtroposN4.sh ├── antsBOLDNetworkAnalysis.R ├── antsBrainExtraction.sh ├── antsCookTemplatePriors.sh ├── antsCorticalThickness.sh ├── antsIntermodalityIntrasubject.sh ├── antsIntroduction.sh ├── antsJointLabelFusion.sh ├── antsJointLabelFusion2.sh ├── antsLaplacianBoundaryCondition.R ├── antsLongitudinalCorticalThickness.sh ├── antsLongitudinalJointLabelFusion.sh ├── antsMotionCorrExample ├── antsMultivariateTemplateConstruction.sh ├── antsMultivariateTemplateConstruction2.sh ├── antsNetworkAnalysis.R ├── antsNeuroimagingBattery ├── antsRegistrationSpaceTime.sh ├── antsRegistrationSyN.sh ├── antsRegistrationSyNQuick.sh ├── antsaffine.sh ├── antsbashstats.sh ├── antsdeformationmag.sh ├── antsqsub.sh ├── antswithdt.sh ├── asymmetry.sh ├── basic_ants_example.sh ├── buildtemplateparallel.sh ├── cbf_pasl_robust_batch.R ├── cbf_pcasl_robust_batch.R ├── directlabels.sh ├── geodesicinterpolation.sh ├── guidedregistration.sh ├── landmarkmatch.sh ├── lohmann.sh ├── multi_template_script.sh ├── newAntsExample.sh ├── optimalsmooth.sh ├── phantomstudy.sh ├── registerimages.pl ├── runprogramonimageset.pl ├── sccan_tests ├── shapeupdatetotemplate.sh ├── skel.sh ├── sliceBySliceOperation.sh ├── submitexperimentalbuild.sh ├── sygnccavg.sh ├── thickstudy.sh ├── unbiased_longitudinal_map ├── unbiased_pairwise_registration.sh ├── unbiased_pairwise_registration_with_aux_images.sh ├── waitForPBSQJobs.pl ├── waitForSGEQJobs.pl ├── waitForSlurmJobs.pl ├── waitForXGridJobs.pl ├── warpimages.pl ├── weightedaverage.pl └── weightedaverage.sh ├── SuperBuild.cmake ├── SuperBuild ├── External_Cppcheck.cmake ├── External_ITKv5.cmake ├── External_KWStyle.cmake ├── External_SlicerExecutionModel.cmake ├── External_Uncrustify.cmake ├── External_VTK.cmake ├── External_VTK_build_step.cmake.in └── External_VTK_patch.cmake ├── Temporary ├── antsFastMarchingImageFilter.h ├── antsFastMarchingImageFilter.hxx ├── deprecate_itkFEMElement3DC0LinearTriangular.cxx ├── deprecate_itkFEMElement3DC0LinearTriangular.h ├── deprecate_itkFEMElement3DC0LinearTriangularLaplaceBeltrami.cxx ├── deprecate_itkFEMElement3DC0LinearTriangularLaplaceBeltrami.h ├── deprecate_itkFEMElement3DC0LinearTriangularMembrane.cxx ├── deprecate_itkFEMElement3DC0LinearTriangularMembrane.h ├── itkAddConstantToImageFilter.h ├── itkDijkstrasAlgorithm.cxx ├── itkDijkstrasAlgorithm.h ├── itkFEMConformalMap.cxx ├── itkFEMConformalMap.h ├── itkFEMDiscConformalMap.cxx ├── itkFEMDiscConformalMap.h ├── itkFEMElement3DMembrane1DOF.h ├── itkFEMElement3DMembrane1DOF.hxx ├── itkManifoldIntegrationAlgorithm.cxx ├── itkManifoldIntegrationAlgorithm.h ├── itkMeanSquaresPointSetToPointSetIntensityMetricv4.h ├── itkMeanSquaresPointSetToPointSetIntensityMetricv4.hxx ├── itkMultiplyByConstantImageFilter.h └── topological_numbers.h ├── Tensor ├── TensorFunctions.h ├── itkDecomposeTensorFunction2.h ├── itkDecomposeTensorFunction2.hxx ├── itkExpTensorImageFilter.h ├── itkExpTensorImageFilter.hxx ├── itkLogTensorImageFilter.h ├── itkLogTensorImageFilter.hxx ├── itkPreservationOfPrincipalDirectionTensorReorientationImageFilter.cxx ├── itkPreservationOfPrincipalDirectionTensorReorientationImageFilter.h ├── itkRotationMatrixFromVectors.h ├── itkWarpTensorImageMultiTransformFilter.h └── itkWarpTensorImageMultiTransformFilter.hxx ├── TestData ├── ANON0006_20_T1_dbg_splayed.nii.gz.sha512 ├── ANON0006_20_T1_sag_twisted.nii.gz.sha512 ├── CompositeTransformUtilTest.result.h5.sha512 ├── CompositeTransformUtilTest_AffineTransform.mat.sha512 ├── CompositeTransformUtilTest_RigidTransform.mat.sha512 ├── CompositeTransformUtilTest_SyNTransform.nii.gz.sha512 ├── Data │ ├── B1.tiff.md5 │ ├── B2.tiff.md5 │ ├── B3.tiff.md5 │ ├── B4.tiff.md5 │ ├── B5.tiff.md5 │ ├── Frown.nii.sha512 │ ├── Frown.txt.sha512 │ ├── Frown.vtk.sha512 │ ├── README.md5 │ ├── Smile.nii.sha512 │ ├── Smile.txt.sha512 │ ├── Smile.vtk.sha512 │ ├── beetlerot.jpg.md5 │ ├── c.nii.gz.sha512 │ ├── ch2brainmask.nii.gz.md5 │ ├── chalf.nii.gz.sha512 │ ├── ford.jpg.md5 │ ├── functional.nii.md5 │ ├── listPriorWolk_nirepDemo.txt.md5 │ ├── mov2.nii.gz.md5 │ ├── myview1.csv.md5 │ ├── myview2.csv.md5 │ ├── myview3.csv.md5 │ ├── myview4.csv.md5 │ ├── myview_mismatch.csv.md5 │ ├── phantomAwmgm.jpg.md5 │ ├── phantomBwmgm.jpg.md5 │ ├── phantomCwmgm.jpg.md5 │ ├── phantomDwmgm.jpg.md5 │ ├── phantomEwmgm.jpg.md5 │ ├── phantomFwmgm.jpg.md5 │ ├── phantomGwmgm.jpg.md5 │ ├── phantomHwmgm.jpg.md5 │ ├── phantomtemplate.jpg.md5 │ ├── priorScaleListWolk_nirep0p1Demo.csv.md5 │ ├── r16mask.nii.gz.md5 │ ├── r16priors.nii.gz.md5 │ ├── r16roth.nii.gz.sha512 │ ├── r16slice.nii.gz.sha512 │ ├── r27slice.nii.gz.md5 │ ├── r30slice.nii.gz.md5 │ ├── r62slice.nii.gz.md5 │ ├── r64roth.nii.gz.sha512 │ ├── r64slice.nii.gz.sha512 │ ├── r85slice.nii.gz.md5 │ ├── ref2.nii.gz.md5 │ ├── test_DiReCT.sh.md5 │ ├── test_image_ground_truth.nii.gz.md5 │ ├── test_image_seg.nii.gz.md5 │ ├── wolk_dataMCINormalDemo.mhd.md5 │ ├── wolk_dataMCINormalDemo.raw.md5 │ └── wolk_mask.nii.gz.md5 ├── Initializer_0.05_antsRegistrationTest_AffineRotationMasks.mat.sha512 ├── Initializer_0.05_antsRegistrationTest_AffineRotationNoMasks.mat.sha512 ├── Initializer_0.05_antsRegistrationTest_AffineScaleMasks.mat.sha512 ├── Initializer_0.05_antsRegistrationTest_AffineScaleMasks_Float.mat.sha512 ├── Initializer_0.05_antsRegistrationTest_RigidRotationHeadMasks.mat.sha512 ├── Initializer_0.05_antsRegistrationTest_RigidRotationNoMasks.mat.sha512 ├── Initializer_0.05_antsRegistrationTest_RigidRotationNoMasks_Float.mat.sha512 ├── Initializer_0.05_antsRegistrationTest_SimilarityRotationNoMasks.mat.sha512 ├── Initializer_0.05_antsRegistrationTest_SimilarityScaleNoMasks.mat.sha512 ├── Initializer_antsRegistrationTest_AffineTranslationMasks.mat.sha512 ├── Initializer_antsRegistrationTest_RigidAnisotropicMasks.mat.sha512 ├── Initializer_antsRegistrationTest_RigidRotGeomNoMasks.mat.sha512 ├── Initializer_antsRegistrationTest_ScaleRotationRescaleHeadMasks.mat.sha512 ├── Initializer_antsRegistrationTest_ScaleRotationRescaleHeadMasks_Float.mat.sha512 ├── Initializer_antsRegistrationTest_TranslationRescaleHeadMasks.mat.sha512 ├── Initializer_antsRegistrationTest_TranslationRescaleHeadMasks_Float.mat.sha512 ├── antsApplyTransformsTesting.result.nii.gz.sha512 ├── antsApplyTransformsTesting_InputWarpTransform.nii.gz.sha512 ├── antsRegistrationTest_AffineRotationMasks.result.nii.gz.sha512 ├── antsRegistrationTest_AffineRotationNoMasks.result.nii.gz.sha512 ├── antsRegistrationTest_AffineScaleMasks.result.nii.gz.sha512 ├── antsRegistrationTest_AffineScaleNoMasks.result.nii.gz.sha512 ├── antsRegistrationTest_AffineTranslationMasks.result.nii.gz.sha512 ├── antsRegistrationTest_AffineTranslationNoMasks.result.nii.gz.sha512 ├── antsRegistrationTest_CCSimilarityRotationMasks.result.nii.gz.sha512 ├── antsRegistrationTest_MSEAffineRotationMasks.result.nii.gz.sha512 ├── antsRegistrationTest_MSESimilarityRotationMasks.result.nii.gz.sha512 ├── antsRegistrationTest_MSESimilarityRotationMasks_Float.result.nii.gz.sha512 ├── antsRegistrationTest_RigidAnisotropicMasks.result.nii.gz.sha512 ├── antsRegistrationTest_RigidRotGeomNoMasks.result.nii.gz.sha512 ├── antsRegistrationTest_RigidRotaRotaRotNoMasks.result.nii.gz.sha512 ├── antsRegistrationTest_RigidRotaRotaRotNoMasks_Float.result.nii.gz.sha512 ├── antsRegistrationTest_RigidRotationHeadMasks.result.nii.gz.sha512 ├── antsRegistrationTest_RigidRotationMasks.result.nii.gz.sha512 ├── antsRegistrationTest_RigidRotationNoMasks.result.nii.gz.sha512 ├── antsRegistrationTest_ScaleRotationRescaleHeadMasks.result.nii.gz.sha512 ├── antsRegistrationTest_ScaleRotationRescaleHeadMasks_Float.result.nii.gz.sha512 ├── antsRegistrationTest_ScaleTranslationRescaleHeadMasks.result.nii.gz.sha512 ├── antsRegistrationTest_SimilarityRotationMasks.result.nii.gz.sha512 ├── antsRegistrationTest_SimilarityRotationNoMasks.result.nii.gz.sha512 ├── antsRegistrationTest_SimilarityScaleMasks.result.nii.gz.sha512 ├── antsRegistrationTest_SimilarityScaleNoMasks.result.nii.gz.sha512 ├── antsRegistrationTest_SimilarityTranslationRescaleNoMasks.result.nii.gz.sha512 ├── antsRegistrationTest_SimilarityTranslationRescaleNoMasks_Float.result.nii.gz.sha512 ├── antsRegistrationTest_SyNScaleNoMasks.result.nii.gz.sha512 ├── antsRegistrationTest_SyNScaleNoMasks_Float.result.nii.gz.sha512 ├── antsRegistrationTest_initialize_transforms_per_stageComposite.result.h5.sha512 ├── rotation.geom.test.nii.gz.sha512 ├── rotation.rescale.test.nii.gz.sha512 ├── rotation.test.nii.gz.sha512 ├── rotation.test_mask.nii.gz.sha512 ├── scale.test.nii.gz.sha512 ├── scale.test_mask.nii.gz.sha512 ├── test.nii.gz.sha512 ├── test_mask.nii.gz.sha512 ├── translation.rescale.test.nii.gz.sha512 ├── translation.test.nii.gz.sha512 └── translation.test_mask.nii.gz.sha512 ├── Utilities ├── ANTSMakeMD5SigFileAndMoveData.py ├── BinaryImageToMeshFilter.h ├── DevelopmentSetupScripts │ └── SetupHooks.sh ├── Hooks │ ├── commit-msg │ ├── pre-commit │ ├── pre-commit-style │ └── prepare-commit-msg ├── ReadWriteData.cxx ├── ReadWriteData.h ├── SetupForDevelopment.sh ├── antsAllocImage.h ├── antsCommandLineOption.cxx ├── antsCommandLineOption.h ├── antsCommandLineParser.cxx ├── antsCommandLineParser.h ├── antsMatrixUtilities.h ├── antsMatrixUtilities.hxx ├── antsSCCANObject.h ├── antsSCCANObject.hxx ├── itkAlternatingValueDifferenceImageFilter.h ├── itkAlternatingValueDifferenceImageFilter.hxx ├── itkAlternatingValueSimpleSubtractionImageFilter.h ├── itkAlternatingValueSimpleSubtractionImageFilter.hxx ├── itkAverageAffineTransformFunction.h ├── itkAverageAffineTransformFunction.hxx ├── itkAverageOverDimensionImageFilter.h ├── itkAverageOverDimensionImageFilter.hxx ├── itkComposeDiffeomorphismsImageFilter.h ├── itkComposeDiffeomorphismsImageFilter.hxx ├── itkDecomposeTensorFunction.h ├── itkDecomposeTensorFunction.hxx ├── itkDeformationFieldGradientTensorImageFilter.h ├── itkDeformationFieldGradientTensorImageFilter.hxx ├── itkDeterminantTensorImageFilter.h ├── itkDeterminantTensorImageFilter.hxx ├── itkDiReCTImageFilter.h ├── itkDiReCTImageFilter.hxx ├── itkDisplacementFieldFromMultiTransformFilter.h ├── itkGeneralToBSplineDisplacementFieldFilter.h ├── itkGeneralToBSplineDisplacementFieldFilter.hxx ├── itkGeometricJacobianDeterminantImageFilter.h ├── itkGeometricJacobianDeterminantImageFilter.hxx ├── itkImageIntensityAndGradientToPointSetFilter.h ├── itkImageIntensityAndGradientToPointSetFilter.hxx ├── itkLabeledPointSetFileReader.h ├── itkLabeledPointSetFileReader.hxx ├── itkLabeledPointSetFileWriter.h ├── itkLabeledPointSetFileWriter.hxx ├── itkManifoldParzenWindowsPointSetFunction.h ├── itkManifoldParzenWindowsPointSetFunction.hxx ├── itkMaskedSmoothingImageFilter.h ├── itkMaskedSmoothingImageFilter.hxx ├── itkMultiScaleLaplacianBlobDetectorImageFilter.h ├── itkMultiScaleLaplacianBlobDetectorImageFilter.hxx ├── itkMultiplyByConstantVectorImageFilter.h ├── itkN3BiasFieldCorrectionImageFilter.h ├── itkN3BiasFieldCorrectionImageFilter.hxx ├── itkN3MRIBiasFieldCorrectionImageFilter.h ├── itkN3MRIBiasFieldCorrectionImageFilter.hxx ├── itkNeighborhoodFirstOrderStatisticsImageFilter.h ├── itkNonLocalSuperresolutionImageFilter.h ├── itkNonLocalSuperresolutionImageFilter.hxx ├── itkOptimalSharpeningImageFilter.h ├── itkOptimalSharpeningImageFilter.hxx ├── itkPointSetFunction.h ├── itkPointSetFunction.hxx ├── itkPseudoContinuousArterialSpinLabeledCerebralBloodFlowImageFilter.h ├── itkPseudoContinuousArterialSpinLabeledCerebralBloodFlowImageFilter.hxx ├── itkPulsedArterialSpinLabeledCerebralBloodFlowImageFilter.h ├── itkPulsedArterialSpinLabeledCerebralBloodFlowImageFilter.hxx ├── itkSimulatedBSplineDisplacementFieldSource.h ├── itkSimulatedBSplineDisplacementFieldSource.hxx ├── itkSimulatedDisplacementFieldSource.h ├── itkSimulatedDisplacementFieldSource.hxx ├── itkSimulatedExponentialDisplacementFieldSource.h ├── itkSimulatedExponentialDisplacementFieldSource.hxx ├── itkSliceTimingCorrectionImageFilter.h ├── itkSliceTimingCorrectionImageFilter.hxx ├── itkSplitAlternatingTimeSeriesImageFilter.h ├── itkSplitAlternatingTimeSeriesImageFilter.hxx ├── itkSurfaceCurvatureBase.h ├── itkSurfaceCurvatureBase.hxx ├── itkSurfaceImageCurvature.h ├── itkSurfaceImageCurvature.hxx ├── itkSurfaceMeshCurvature.h ├── itkTextureHistogram.h ├── itkVectorFieldGradientImageFunction.h ├── itkVectorFieldGradientImageFunction.hxx ├── itkVectorGaussianInterpolateImageFunction.h ├── itkVectorImageFileReader.h ├── itkVectorImageFileReader.hxx ├── itkVectorImageFileWriter.h ├── itkVectorImageFileWriter.hxx ├── itkWarpImageMultiTransformFilter.h ├── itkWarpImageMultiTransformFilter.hxx ├── itkWarpImageWAffineFilter.h ├── itkWarpImageWAffineFilter.hxx ├── itkWarpTensorImageMultiTransformFilter.h ├── itkWarpTensorImageMultiTransformFilter.hxx ├── itkantsReadWriteTransform.h └── tagRelease.pl ├── Version.cmake ├── _config.yml ├── antsRegistrationCLP ├── CMakeLists.txt ├── antsRegistrationCLP.cxx └── antsRegistrationCLP.xml ├── appveyor.yml ├── buildscripts └── travis-command-wrapper.py ├── code_of_conduct.md ├── forhtml ├── README ├── ants.bib ├── ants_progress_report.Rmd ├── nazca-1.jpg └── push-website ├── index.html └── index.md /.dockerignore: -------------------------------------------------------------------------------- 1 | *.sample 2 | *~ 3 | *.[oa] 4 | .DS_Store 5 | ._* 6 | .nfs* 7 | *.nii.gz 8 | *.nrrd 9 | *.nhdr 10 | *.raw 11 | CMakeCache.txt 12 | CMakeFiles/* 13 | .RData 14 | .Rhistory 15 | .RDataTmp 16 | .ExternalData_SHA512* 17 | *.pyc 18 | crash* 19 | .*.swp 20 | bin 21 | build 22 | *.orig 23 | *.bak 24 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | patreon: antsx 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/build_errors.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Build problems 3 | about: Report a problem compiling or installing ANTs from source 4 | --- 5 | 6 | 21 | 22 | **When did the error occur?** 23 | 24 | [ ] CMake configuration (cmake / ccmake) 25 | [ ] Compilation (make) 26 | [ ] Installation (make install) 27 | 28 | **Build environment** 29 | - OS: [e.g. Mac OS] 30 | - OS version: [e.g. 10.15.1] 31 | - Type of system: [Desktop, laptop, HPC cluster, cloud instance, 32 | other] 33 | 34 | 39 | 40 | **ANTs version** 41 | 46 | 47 | **Build configuration and logs** 48 | 56 | 57 | **Additional context** 58 | 59 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: ANTsX Issues (ANTsPy, ANTsR, ANTs*Net) 4 | url: https://github.com/ANTsX 5 | about: If you are not working with base ANTs (ie, the command line tools), please go to the main ANTsX page and open an issue in the repository you are using. 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | --- 5 | 6 | 10 | 11 | **Is your feature request related to a problem?** 12 | 13 | 14 | **Proposed new features** 15 | 19 | 20 | **Alternatives you've considered** 21 | 22 | 23 | **Additional context** 24 | 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/other_questions.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Other questions 3 | about: General questions about ANTs. 4 | --- 5 | 6 | 20 | 21 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 17 | 18 | # Description 19 | 20 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 60 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | # Label to use when marking an issue as stale 10 | staleLabel: stale 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /.github/workflows/ci-docker.yml: -------------------------------------------------------------------------------- 1 | name: ci-docker 2 | on: 3 | push: 4 | branches: 5 | - 'master' 6 | tags: 7 | - 'v*' 8 | pull_request: 9 | branches: 10 | - 'master' 11 | types: 12 | - opened 13 | - reopened 14 | - synchronize 15 | - ready_for_review 16 | 17 | concurrency: 18 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 19 | cancel-in-progress: ${{ !(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) }} 20 | 21 | jobs: 22 | docker: 23 | runs-on: ubuntu-latest 24 | if: ${{ !github.event.pull_request.draft }} 25 | steps: 26 | - 27 | name: Checkout 28 | uses: actions/checkout@v4 29 | - 30 | name: Docker meta 31 | id: meta 32 | uses: docker/metadata-action@v5 33 | with: 34 | images: antsx/ants 35 | - 36 | name: Login to DockerHub 37 | if: github.event_name != 'pull_request' 38 | uses: docker/login-action@v3 39 | with: 40 | username: ${{ secrets.DOCKERHUB_USERNAME }} 41 | password: ${{ secrets.DOCKERHUB_TOKEN }} 42 | - 43 | name: Edit tag for releases 44 | if: ${{ startsWith(github.ref, 'refs/tags/') }} 45 | run: | 46 | GIT_TAG="${{ github.ref }}" 47 | STRIPPED_TAG="${GIT_TAG#refs/tags/v}" 48 | echo "DOCKER_TAG=antsx/ants:${STRIPPED_TAG}" >> $GITHUB_ENV 49 | - 50 | name: Build and load (PR) or push (commit/tag) 51 | uses: docker/build-push-action@v5 52 | with: 53 | context: . 54 | push: ${{ github.event_name != 'pull_request' }} 55 | load: ${{ github.event_name == 'pull_request' }} 56 | tags: ${{ env.DOCKER_TAG }},${{ steps.meta.outputs.tags }} 57 | labels: ${{ steps.meta.outputs.labels }} 58 | - 59 | name: Export Docker image for PR 60 | if: github.event_name == 'pull_request' 61 | run: | 62 | docker save antsx/ants:${{ steps.meta.outputs.version }} > ants_image.tar 63 | - 64 | name: Upload PR Docker image as artifact 65 | if: github.event_name == 'pull_request' 66 | uses: actions/upload-artifact@v4 67 | with: 68 | name: ants-docker-image 69 | path: ants_image.tar 70 | retention-days: 7 71 | -------------------------------------------------------------------------------- /.github/workflows/github-repo-stats.yml: -------------------------------------------------------------------------------- 1 | name: github-repo-stats 2 | 3 | on: 4 | schedule: 5 | # Run this once per day, towards the end of the day for keeping the most 6 | # recent data point most meaningful (hours are interpreted in UTC). 7 | - cron: "0 23 * * *" 8 | workflow_dispatch: # Allow for running this manually. 9 | 10 | jobs: 11 | j1: 12 | name: github-repo-stats 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: run-ghrs 16 | # Use latest release. 17 | uses: jgehrcke/github-repo-stats@RELEASE 18 | with: 19 | ghtoken: ${{ secrets.ghrs_github_api_token }} 20 | 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.sample 2 | *~ 3 | *.[oa] 4 | .DS_Store 5 | ._* 6 | .nfs* 7 | *.nii.gz 8 | *.nrrd 9 | *.nhdr 10 | *.raw 11 | CMakeCache.txt 12 | CMakeFiles/* 13 | .RData 14 | .Rhistory 15 | .RDataTmp 16 | .ExternalData_SHA512* 17 | *.pyc 18 | crash* 19 | .*.swp 20 | bin 21 | build 22 | *.orig 23 | *.bak 24 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | ErrorDocument 404 /index.php 2 | 3 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Brian Avants 2 | Brian Avants brian avants 3 | Brian Avants BBAvants 4 | Brian Avants stnava 5 | Brian Avants b avants 6 | Nick Tustison 7 | Nick Tustison ntustison 8 | Nick Tustison ntustison 9 | Hans J. Johnson 10 | Hans J. Johnson Hans Johnson 11 | Hans J. Johnson hjmjohnson 12 | Jeffrey Duda 13 | Jeffrey Duda Jeff Duda 14 | Jeffrey Duda Jeff Duda 15 | Ben Kandel 16 | Ben Kandel bkandel 17 | Ben Kandel bkandel 18 | Gang Song 19 | Paramveer Dhillon 20 | Paramveer Dhillon paramveerdhillon 21 | Kent Williams 22 | Kent Williams chaircrusher 23 | Philip Cook 24 | Philip Cook Phil Cook 25 | Yaroslav Halchenko 26 | Baohua Wu 27 | Michael Stauffer 28 | Ali Ghayoor 29 | Craig Stark 30 | adrienkaiser 31 | hwang3 32 | Chris Filo Gorgolewski 33 | Niels van Strian 34 | Andrey Fedorov 35 | Paul Yushkevich 36 | -------------------------------------------------------------------------------- /ANTSCopyright.txt: -------------------------------------------------------------------------------- 1 | Copyright {2009-2023} {ConsortiumOfANTS} 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | -------------------------------------------------------------------------------- /ANTsVersionConfig.h.in: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | * 3 | * Copyright Insight Software Consortium 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0.txt 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | *=========================================================================*/ 18 | 19 | #define ANTS_VERSION_MAJOR @ANTS_VERSION_MAJOR@ 20 | #define ANTS_VERSION_MINOR @ANTS_VERSION_MINOR@ 21 | #define ANTS_VERSION_PATCH @ANTS_VERSION_PATCH@ 22 | #define ANTS_VERSION_TWEAK @ANTS_VERSION_TWEAK@ 23 | #define ANTS_VERSION "@ANTS_VERSION@" 24 | -------------------------------------------------------------------------------- /CITATION.bib: -------------------------------------------------------------------------------- 1 | % Please cite this article if using ANTs in published research 2 | % See the project README for additional citations for specific tools 3 | @article{tustison_antsx_2021, 4 | title = {The {ANTsX} ecosystem for quantitative biological and medical imaging}, 5 | volume = {11}, 6 | issn = {2045-2322}, 7 | url = {https://doi.org/10.1038/s41598-021-87564-6}, 8 | doi = {10.1038/s41598-021-87564-6}, 9 | abstract = {The Advanced Normalizations Tools ecosystem, known as ANTsX, consists of multiple open-source software libraries which house top-performing algorithms used worldwide by scientific and research communities for processing and analyzing biological and medical imaging data. The base software library, ANTs, is built upon, and contributes to, the NIH-sponsored Insight Toolkit. Founded in 2008 with the highly regarded Symmetric Normalization image registration framework, the ANTs library has since grown to include additional functionality. Recent enhancements include statistical, visualization, and deep learning capabilities through interfacing with both the R statistical project (ANTsR) and Python (ANTsPy). Additionally, the corresponding deep learning extensions ANTsRNet and ANTsPyNet (built on the popular TensorFlow/Keras libraries) contain several popular network architectures and trained models for specific applications. One such comprehensive application is a deep learning analog for generating cortical thickness data from structural T1-weighted brain MRI, both cross-sectionally and longitudinally. These pipelines significantly improve computational efficiency and provide comparable-to-superior accuracy over multiple criteria relative to the existing ANTs workflows and simultaneously illustrate the importance of the comprehensive ANTsX approach as a framework for medical image analysis.}, 10 | number = {1}, 11 | journal = {Scientific Reports}, 12 | author = {Tustison, Nicholas J. and Cook, Philip A. and Holbrook, Andrew J. and Johnson, Hans J. and Muschelli, John and Devenyi, Gabriel A. and Duda, Jeffrey T. and Das, Sandhitsu R. and Cullen, Nicholas C. and Gillen, Daniel L. and Yassa, Michael A. and Stone, James R. and Gee, James C. and Avants, Brian B.}, 13 | month = apr, 14 | year = {2021}, 15 | pages = {9068}, 16 | } 17 | -------------------------------------------------------------------------------- /CMake/ANTSExternalData.cmake: -------------------------------------------------------------------------------- 1 | include(ExternalData) 2 | 3 | ## The user can specify an environmental variable for shared locations of 4 | ## of object files to prevent continous downloading of common objects. 5 | if(NOT ExternalData_OBJECT_STORES) 6 | # Use ExternalData_OBJECT_STORES from environment as default. 7 | set(ExternalData_OBJECT_STORES_DEFAULT "") 8 | if(DEFINED "ENV{ExternalData_OBJECT_STORES}") 9 | file(TO_CMAKE_PATH "$ENV{ExternalData_OBJECT_STORES}" ExternalData_OBJECT_STORES_DEFAULT) 10 | endif() 11 | endif() 12 | 13 | set(ExternalData_OBJECT_STORES "${ExternalData_OBJECT_STORES_DEFAULT}" CACHE STRING 14 | "Semicolon-separated list of local directories holding data objects in the layout %(algo)/%(hash).") 15 | mark_as_advanced(ExternalData_OBJECT_STORES) 16 | if(NOT ExternalData_OBJECT_STORES) 17 | set(ExternalData_OBJECT_STORES "${CMAKE_BINARY_DIR}/ExternalData/Objects") 18 | file(MAKE_DIRECTORY "${ExternalData_OBJECT_STORES}") 19 | endif() 20 | list(APPEND ExternalData_OBJECT_STORES 21 | # Local data store populated by the ITK pre-commit hook 22 | "${CMAKE_SOURCE_DIR}/.ExternalData" 23 | ) 24 | 25 | set(ExternalData_BINARY_ROOT ${CMAKE_BINARY_DIR}/ExternalData) 26 | 27 | set(ExternalData_URL_TEMPLATES "" CACHE STRING 28 | "Additional URL templates for the ExternalData CMake script to look for testing data. E.g. 29 | file:///var/bigharddrive/%(algo)/%(hash)") 30 | mark_as_advanced(ExternalData_URL_TEMPLATES) 31 | list(APPEND ExternalData_URL_TEMPLATES 32 | # Local data store populated by the ITK pre-commit hook 33 | "file:///${${PROJECT_NAME}_SOURCE_DIR}/.ExternalData/%(algo)/%(hash)" 34 | # Data published by Iowa Psychiatry web interface 35 | ## The primary home for data 36 | "http://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=%(hash)" 37 | # Data published on Girder 38 | "https://data.kitware.com:443/api/v1/file/hashsum/%(algo)/%(hash)/download" 39 | # Data published by developers using git-gerrit-push. 40 | "http://www.itk.org/files/ExternalData/%(algo)/%(hash)" 41 | ) 42 | 43 | # Tell ExternalData commands to transform raw files to content links. 44 | # TODO: Condition this feature on presence of our pre-commit hook. 45 | set(ExternalData_LINK_CONTENT SHA512) 46 | -------------------------------------------------------------------------------- /CMake/ExternalData_config.cmake.in: -------------------------------------------------------------------------------- 1 | set(ExternalData_OBJECT_STORES "@ExternalData_OBJECT_STORES@") 2 | set(ExternalData_URL_TEMPLATES "@ExternalData_URL_TEMPLATES@") 3 | set(ExternalData_TIMEOUT_INACTIVITY "@ExternalData_TIMEOUT_INACTIVITY@") 4 | set(ExternalData_TIMEOUT_ABSOLUTE "@ExternalData_TIMEOUT_ABSOLUTE@") 5 | -------------------------------------------------------------------------------- /CMake/ITK_CheckCCompilerFlag.cmake: -------------------------------------------------------------------------------- 1 | # - Check whether the C compiler supports a given flag. 2 | # CHECK_C_COMPILER_FLAG( ) 3 | # - the compiler flag 4 | # - variable to store the result 5 | # This internally calls the check_c_source_compiles macro. 6 | # See help for CheckCSourceCompiles for a listing of variables 7 | # that can modify the build. 8 | 9 | #============================================================================= 10 | # Copyright 2006-2010 Kitware, Inc. 11 | # Copyright 2006 Alexander Neundorf 12 | # 13 | # Distributed under the OSI-approved BSD License (the "License"); 14 | # see accompanying file Copyright.txt for details. 15 | # 16 | # This software is distributed WITHOUT ANY WARRANTY; without even the 17 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | # See the License for more information. 19 | #============================================================================= 20 | # (To distribute this file outside of CMake, substitute the full 21 | # License text for the above reference.) 22 | 23 | include(CheckCSourceCompiles) 24 | 25 | macro (ITK_CHECK_C_COMPILER_FLAG _FLAG _RESULT) 26 | set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") 27 | set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") 28 | CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT} 29 | # Some compilers do not fail with a bad flag 30 | FAIL_REGEX "warning: command line option .* is valid for .* but not for C" 31 | # Apple gcc 32 | FAIL_REGEX "unrecognized .*option" # GNU 33 | FAIL_REGEX "unknown .*option" # Clang 34 | FAIL_REGEX "ignoring unknown option" # MSVC 35 | FAIL_REGEX "warning D9002" # MSVC, any lang 36 | FAIL_REGEX "[Uu]nknown option" # HP 37 | FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro 38 | FAIL_REGEX "command option .* is not recognized" # XL 39 | FAIL_REGEX "warning #10156: ignoring option" # INTEL compilers 40 | ) 41 | set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") 42 | endmacro () 43 | -------------------------------------------------------------------------------- /CMake/ITK_CheckCXXCompilerFlag.cmake: -------------------------------------------------------------------------------- 1 | # - Check whether the CXX compiler supports a given flag. 2 | # CHECK_CXX_COMPILER_FLAG( ) 3 | # - the compiler flag 4 | # - variable to store the result 5 | # This internally calls the check_cxx_source_compiles macro. See help 6 | # for CheckCXXSourceCompiles for a listing of variables that can 7 | # modify the build. 8 | 9 | #============================================================================= 10 | # Copyright 2006-2010 Kitware, Inc. 11 | # Copyright 2006 Alexander Neundorf 12 | # 13 | # Distributed under the OSI-approved BSD License (the "License"); 14 | # see accompanying file Copyright.txt for details. 15 | # 16 | # This software is distributed WITHOUT ANY WARRANTY; without even the 17 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | # See the License for more information. 19 | #============================================================================= 20 | # (To distribute this file outside of CMake, substitute the full 21 | # License text for the above reference.) 22 | 23 | include(CheckCXXSourceCompiles) 24 | 25 | macro (ITK_CHECK_CXX_COMPILER_FLAG _FLAG _RESULT) 26 | set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") 27 | set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") 28 | CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT} 29 | # Some compilers do not fail with a bad flag 30 | FAIL_REGEX "unrecognized .*option" # GNU 31 | FAIL_REGEX "unknown .*option" # Clang 32 | FAIL_REGEX "ignoring unknown option" # MSVC 33 | FAIL_REGEX "warning D9002" # MSVC, any lang 34 | FAIL_REGEX "[Uu]nknown option" # HP 35 | FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro 36 | FAIL_REGEX "command option .* is not recognized" # XL 37 | FAIL_REGEX "not supported in this configuration; ignored" # AIX 38 | FAIL_REGEX "File with unknown suffix passed to linker" # PGI 39 | FAIL_REGEX "warning #10156: ignoring option" # INTEL compilers 40 | ) 41 | set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") 42 | endmacro () 43 | -------------------------------------------------------------------------------- /CMake/PreventInBuildInstalls.cmake: -------------------------------------------------------------------------------- 1 | # Adapated from ITKv4/CMake/PreventInBuildInstalls.cmake 2 | string(TOLOWER "${CMAKE_INSTALL_PREFIX}" _PREFIX) 3 | string(TOLOWER "${${CMAKE_PROJECT_NAME}_BINARY_DIR}" _BUILD) 4 | if("${_PREFIX}" STREQUAL "${_BUILD}") 5 | message(FATAL_ERROR 6 | "The current CMAKE_INSTALL_PREFIX points at the build tree:\n" 7 | " ${CMAKE_INSTALL_PREFIX}\n" 8 | "This is not supported." 9 | ) 10 | endif() 11 | -------------------------------------------------------------------------------- /CMake/SlicerMacroEmptyExternalProject.cmake: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # 3 | # Library: CTK 4 | # 5 | # Copyright (c) Kitware Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.commontk.org/LICENSE 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | ########################################################################### 20 | 21 | # See http://github.com/commontk/CTK/blob/master/CMake/ctkMacroEmptyExternalProject.cmake 22 | 23 | # 24 | # Convenient macro allowing to define a "empty" project in case an external one is provided 25 | # using for example _DIR. 26 | # Doing so allows to keep the external project dependency system happy. 27 | # 28 | macro(SlicerMacroEmptyExternalProject proj dependencies) 29 | 30 | ExternalProject_Add(${proj} 31 | SOURCE_DIR ${CMAKE_BINARY_DIR}/EMPTY_${proj} 32 | BINARY_DIR EMPTY_${proj}-build 33 | DOWNLOAD_COMMAND "" 34 | CONFIGURE_COMMAND "" 35 | BUILD_COMMAND "" 36 | INSTALL_COMMAND "" 37 | DEPENDS 38 | ${dependencies} 39 | ) 40 | endmacro() 41 | -------------------------------------------------------------------------------- /CMake/itkCheckSourceTree.cmake: -------------------------------------------------------------------------------- 1 | # Install a pre-commit hook to bootstrap commit hooks. 2 | if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/config" AND 3 | NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit") 4 | # Silently ignore the error if the hooks directory is read-only. 5 | execute_process( 6 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/CMake/pre-commit 7 | ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit 8 | OUTPUT_VARIABLE _output 9 | ERROR_VARIABLE _output 10 | RESULT_VARIABLE _result 11 | ) 12 | if(_result AND NOT "${_output}" MATCHES "Error copying file") 13 | message("${_output}") 14 | endif() 15 | endif() 16 | -------------------------------------------------------------------------------- /CMake/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo 'Your work tree has not been configured for development. 3 | Paste the following commands into a shell: 4 | 5 | ./Utilities/SetupForDevelopment.sh 6 | 7 | See http://www.itk.org/Wiki/ITK/Git/Develop for more details.' 8 | exit 1 9 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to ANTs 2 | 3 | Contributions to ANTs are welcome. The developers are grateful to the many contributors to ANTs, both those who have [contributed to the ANTs source code](https://github.com/ANTsX/ANTs/graphs/contributors) and those who have contributed documentation, testing, feedback and ideas. 4 | 5 | ## Contributing code 6 | 7 | ### 1. Plan contribution with ANTs team 8 | 9 | Before doing a lot of work, we recommend that you open an issue or start a discussion thread to discuss your ideas. If fixing a bug, please identify the bug in an issue first, following the bug report template. 10 | 11 | ### 2. Make changes and test locally 12 | 13 | Once your code compiles without error and runs satisfactorily, you can open a pull request. You can mention issues by their number, eg `See issue #1234`. If you're confident that you're completing an open issue, you can say `Fixes #1234`, this will close the associated issue when the PR is merged. 14 | 15 | ### 3. Open a pull request 16 | 17 | All contributions must be made via pull request on a fork of the ANTs repository. The developers will review and give feedback. 18 | 19 | Write your commit messages using the standard prefixes for ITK commit messages: 20 | 21 | * BUG: Fix for runtime crash or incorrect result 22 | * COMP: Compiler error or warning fix 23 | * DOC: Documentation change 24 | * ENH: New functionality 25 | * PERF: Performance improvement 26 | * STYLE: No logic impact (indentation, comments) 27 | * WIP: Work In Progress not ready for merge (used before PR is ready, or if a draft PR needs feedback or assistance) 28 | 29 | A Github continuous integration test will be run on the PR, confirming that it compiles on Linux and doesn't break basic functionality. This is a minimal test, please test new functionality and if at all possible do so on open data, so that the developers can reproduce results. 30 | 31 | 32 | ### Licensing of contributions 33 | 34 | All accepted contributions will be incorporated into the ANTs source code and distributed according to the terms of the ANTs license. 35 | -------------------------------------------------------------------------------- /CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | ## This file should be placed in the root directory of your project. 2 | ## Then modify the CMakeLists.txt file in the root directory of your 3 | ## project to incorporate the testing dashboard. 4 | ## # The following are required to uses Dart and the Cdash dashboard 5 | ## enable_testing() 6 | ## include(CTest) 7 | set(CTEST_PROJECT_NAME "ANTS") 8 | set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") 9 | 10 | set(CTEST_DROP_METHOD "http") 11 | set(CTEST_DROP_SITE "my.cdash.org") 12 | set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ANTS") 13 | set(CTEST_DROP_SITE_CDASH TRUE) 14 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/library/debian:bookworm-slim AS base 2 | FROM base AS builder 3 | 4 | RUN \ 5 | --mount=type=cache,sharing=private,target=/var/cache/apt \ 6 | apt-get update && apt-get install -y g++-11 cmake make ninja-build git 7 | 8 | RUN git config --global url.'https://'.insteadOf 'git://' 9 | 10 | COPY . /usr/local/src/ants 11 | WORKDIR /build 12 | 13 | ARG CC=gcc-11 CXX=g++-11 BUILD_SHARED_LIBS=ON 14 | 15 | RUN cmake \ 16 | -GNinja \ 17 | -DBUILD_TESTING=ON \ 18 | -DRUN_LONG_TESTS=OFF \ 19 | -DRUN_SHORT_TESTS=ON \ 20 | -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \ 21 | -DCMAKE_INSTALL_PREFIX=/opt/ants \ 22 | /usr/local/src/ants 23 | RUN cmake --build . --parallel 24 | WORKDIR /build/ANTS-build 25 | RUN cmake --install . 26 | 27 | ENV PATH="/opt/ants/bin:$PATH" \ 28 | LD_LIBRARY_PATH="/opt/ants/lib:$LD_LIBRARY_PATH" 29 | 30 | RUN cmake --build . --target test 31 | 32 | FROM base 33 | 34 | RUN apt-get update \ 35 | && apt-get install -y --no-install-recommends bc \ 36 | && apt-get clean \ 37 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 38 | 39 | ENV PATH="/opt/ants/bin:$PATH" \ 40 | LD_LIBRARY_PATH="/opt/ants/lib:$LD_LIBRARY_PATH" 41 | 42 | COPY --from=builder /opt/ants /opt/ants 43 | 44 | LABEL org.opencontainers.image.authors="ANTsX team" \ 45 | org.opencontainers.image.url="https://stnava.github.io/ANTs/" \ 46 | org.opencontainers.image.source="https://github.com/ANTsX/ANTs" \ 47 | org.opencontainers.image.licenses="Apache License 2.0" \ 48 | org.opencontainers.image.title="Advanced Normalization Tools" \ 49 | org.opencontainers.image.description="ANTs is part of the ANTsX ecosystem (https://github.com/ANTsX). \ 50 | ANTs Citation: https://pubmed.ncbi.nlm.nih.gov/24879923" 51 | 52 | -------------------------------------------------------------------------------- /Examples/ANTsVersion.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | * Modified from ANTs reference 3 | * Copyright Insight Software Consortium 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0.txt 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | *=========================================================================*/ 18 | #include "ANTsVersion.h" 19 | #include "ANTsVersionConfig.h" 20 | 21 | #include // std::cout, std::ios 22 | #include // std::ostringstream 23 | 24 | namespace 25 | { 26 | 27 | std::string 28 | MakeExtendedVersionString() 29 | { 30 | std::ostringstream v; 31 | v << "ANTs Version: " << ANTs::Version::VersionString() << std::endl 32 | << "Compiled: " << ANTs::Version::BuildDate() << std::endl; 33 | return v.str(); 34 | } 35 | 36 | static const std::string extendedVersionString = MakeExtendedVersionString(); 37 | 38 | } // namespace 39 | 40 | namespace ANTs 41 | { 42 | unsigned int 43 | Version::MajorVersion() 44 | { 45 | return ANTS_VERSION_MAJOR; 46 | } 47 | unsigned int 48 | Version::MinorVersion() 49 | { 50 | return ANTS_VERSION_MINOR; 51 | } 52 | unsigned int 53 | Version::PatchVersion() 54 | { 55 | return ANTS_VERSION_PATCH; 56 | } 57 | unsigned int 58 | Version::TweakVersion() 59 | { 60 | return 0; 61 | } 62 | const std::string & 63 | Version::VersionString() 64 | { 65 | static const std::string v(ANTS_VERSION); 66 | return v; 67 | } 68 | const std::string & 69 | Version::BuildDate() 70 | { 71 | static const std::string v(__DATE__ " " __TIME__); 72 | return v; 73 | } 74 | const std::string & 75 | Version::ExtendedVersionString() 76 | { 77 | return extendedVersionString; 78 | } 79 | } // namespace ANTs 80 | -------------------------------------------------------------------------------- /Examples/ANTsVersion.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | * 3 | * Copyright Insight Software Consortium 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0.txt 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | *=========================================================================*/ 18 | #ifndef ANTsVersion_h 19 | #define ANTsVersion_h 20 | 21 | // NOTE: Windows magic needed here 22 | #define ANTsCommon_EXPORT 23 | 24 | #include 25 | 26 | namespace ANTs 27 | { 28 | 29 | /** \class Version 30 | * \brief Version info for ANTs 31 | */ 32 | class ANTsCommon_EXPORT Version 33 | { 34 | public: 35 | static unsigned int 36 | MajorVersion(); 37 | static unsigned int 38 | MinorVersion(); 39 | static unsigned int 40 | PatchVersion(); 41 | static unsigned int 42 | TweakVersion(); 43 | static const std::string & 44 | VersionString(); 45 | static const std::string & 46 | BuildDate(); 47 | 48 | static const std::string & 49 | ExtendedVersionString(); 50 | std::string 51 | ToString() 52 | { 53 | return Version::ExtendedVersionString(); 54 | } 55 | }; 56 | } // namespace ANTs 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /Examples/CustomColormaps/bone.txt: -------------------------------------------------------------------------------- 1 | 0.000000 0.013889 0.027778 0.041667 0.055556 0.069444 0.083333 0.097222 0.111111 0.125000 0.138889 0.152778 0.166667 0.180556 0.194444 0.208333 0.222222 0.236111 0.250000 0.263889 0.277778 0.291667 0.305556 0.319444 0.333333 0.347222 0.361111 0.375000 0.388889 0.402778 0.416667 0.430556 0.444444 0.458333 0.472222 0.486111 0.500000 0.513889 0.527778 0.541667 0.555556 0.569444 0.583333 0.597222 0.611111 0.625000 0.638889 0.652778 0.674479 0.696181 0.717882 0.739583 0.761285 0.782986 0.804688 0.826389 0.848090 0.869792 0.891493 0.913194 0.934896 0.956597 0.978299 1.000000 2 | 0.000000 0.013889 0.027778 0.041667 0.055556 0.069444 0.083333 0.097222 0.111111 0.125000 0.138889 0.152778 0.166667 0.180556 0.194444 0.208333 0.222222 0.236111 0.250000 0.263889 0.277778 0.291667 0.305556 0.319444 0.338542 0.357639 0.376736 0.395833 0.414931 0.434028 0.453125 0.472222 0.491319 0.510417 0.529514 0.548611 0.567708 0.586806 0.605903 0.625000 0.644097 0.663194 0.682292 0.701389 0.720486 0.739583 0.758681 0.777778 0.791667 0.805556 0.819444 0.833333 0.847222 0.861111 0.875000 0.888889 0.902778 0.916667 0.930556 0.944444 0.958333 0.972222 0.986111 1.000000 3 | 0.005208 0.024306 0.043403 0.062500 0.081597 0.100694 0.119792 0.138889 0.157986 0.177083 0.196181 0.215278 0.234375 0.253472 0.272569 0.291667 0.310764 0.329861 0.348958 0.368056 0.387153 0.406250 0.425347 0.444444 0.458333 0.472222 0.486111 0.500000 0.513889 0.527778 0.541667 0.555556 0.569444 0.583333 0.597222 0.611111 0.625000 0.638889 0.652778 0.666667 0.680556 0.694444 0.708333 0.722222 0.736111 0.750000 0.763889 0.777778 0.791667 0.805556 0.819444 0.833333 0.847222 0.861111 0.875000 0.888889 0.902778 0.916667 0.930556 0.944444 0.958333 0.972222 0.986111 1.000000 4 | -------------------------------------------------------------------------------- /Examples/CustomColormaps/christmas.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.03333333 0.06666667 0.10000000 0.13333333 0.16666667 0.20000000 0.23333333 0.26666667 0.30000000 0.33333333 0.36666667 0.40000000 0.43333333 0.46666667 0.50000000 0.53333333 0.56666667 0.60000000 0.63333333 0.66666667 0.70000000 0.73333333 0.76666667 0.80000000 0.83333333 0.86666667 0.90000000 0.93333333 0.96666667 1.00000000 2 | 1.00000000 0.96666667 0.93333333 0.90000000 0.86666667 0.83333333 0.80000000 0.76666667 0.73333333 0.70000000 0.66666667 0.63333333 0.60000000 0.56666667 0.53333333 0.50000000 0.46666667 0.43333333 0.40000000 0.36666667 0.33333333 0.30000000 0.26666667 0.23333333 0.20000000 0.16666667 0.13333333 0.10000000 0.06666667 0.03333333 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 3 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 | -------------------------------------------------------------------------------- /Examples/CustomColormaps/christmas2.txt: -------------------------------------------------------------------------------- 1 | 1.00000000 0.96666667 0.93333333 0.90000000 0.86666667 0.83333333 0.80000000 0.76666667 0.73333333 0.70000000 0.66666667 0.63333333 0.60000000 0.56666667 0.53333333 0.50000000 0.46666667 0.43333333 0.40000000 0.36666667 0.33333333 0.30000000 0.26666667 0.23333333 0.20000000 0.16666667 0.13333333 0.10000000 0.06666667 0.03333333 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 2 | 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.03333333 0.06666667 0.10000000 0.13333333 0.16666667 0.20000000 0.23333333 0.26666667 0.30000000 0.33333333 0.36666667 0.40000000 0.43333333 0.46666667 0.50000000 0.53333333 0.56666667 0.60000000 0.63333333 0.66666667 0.70000000 0.73333333 0.76666667 0.80000000 0.83333333 0.86666667 0.90000000 0.93333333 0.96666667 1.00000000 3 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 | -------------------------------------------------------------------------------- /Examples/CustomColormaps/colorcube.txt: -------------------------------------------------------------------------------- 1 | 0.333333 0.333333 0.333333 0.666667 0.666667 0.666667 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.333333 0.333333 0.333333 0.333333 0.666667 0.666667 0.666667 0.666667 1.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.333333 0.333333 0.333333 0.333333 0.666667 0.666667 0.666667 0.666667 1.000000 1.000000 1.000000 0.166667 0.333333 0.500000 0.666667 0.833333 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.142857 0.285714 0.428571 0.571429 0.714286 0.857143 1.000000 2 | 0.333333 0.666667 1.000000 0.333333 0.666667 1.000000 0.333333 0.666667 1.000000 0.333333 0.666667 1.000000 0.000000 0.333333 0.666667 1.000000 0.000000 0.333333 0.666667 1.000000 0.000000 0.333333 0.666667 1.000000 0.333333 0.666667 1.000000 0.000000 0.333333 0.666667 1.000000 0.000000 0.333333 0.666667 1.000000 0.000000 0.333333 0.666667 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.166667 0.333333 0.500000 0.666667 0.833333 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.142857 0.285714 0.428571 0.571429 0.714286 0.857143 1.000000 3 | 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.500000 0.500000 0.500000 0.500000 0.500000 0.500000 0.500000 0.500000 0.500000 0.500000 0.500000 0.500000 0.500000 0.500000 0.500000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.166667 0.333333 0.500000 0.666667 0.833333 1.000000 0.000000 0.142857 0.285714 0.428571 0.571429 0.714286 0.857143 1.000000 4 | -------------------------------------------------------------------------------- /Examples/CustomColormaps/cool.txt: -------------------------------------------------------------------------------- 1 | 0 1 2 | 1 0 3 | 1 -------------------------------------------------------------------------------- /Examples/CustomColormaps/flag.txt: -------------------------------------------------------------------------------- 1 | 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 2 | 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 3 | 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 4 | -------------------------------------------------------------------------------- /Examples/CustomColormaps/itkSnap.txt: -------------------------------------------------------------------------------- 1 | 0 1 0 0 1 0 1 1 0 0.8039216 0.8235294 0.4 0 0 2 | 0 0 1 0 1 1 0 0.9372549 0 0.5215686 0.7058824 0.8039216 0 0.545098 3 | 0 0 0 1 0 1 1 0.8352941 0.2470588 0.5490196 0.6666667 0.5019608 0.545098 0.3411765 4 | -------------------------------------------------------------------------------- /Examples/CustomColormaps/itkSnap_BRATS.txt: -------------------------------------------------------------------------------- 1 | 0 1 0 0 1 2 | 0 0 1 0 1 3 | 0 0 0 1 0 -------------------------------------------------------------------------------- /Examples/CustomColormaps/lines.txt: -------------------------------------------------------------------------------- 1 | 0.000000 0.000000 1.000000 0.000000 0.750000 0.750000 0.250000 0.000000 0.000000 1.000000 0.000000 0.750000 0.750000 0.250000 0.000000 0.000000 1.000000 0.000000 0.750000 0.750000 0.250000 0.000000 0.000000 1.000000 0.000000 0.750000 0.750000 0.250000 0.000000 0.000000 1.000000 0.000000 0.750000 0.750000 0.250000 0.000000 0.000000 1.000000 0.000000 0.750000 0.750000 0.250000 0.000000 0.000000 1.000000 0.000000 0.750000 0.750000 0.250000 0.000000 0.000000 1.000000 0.000000 0.750000 0.750000 0.250000 0.000000 0.000000 1.000000 0.000000 0.750000 0.750000 0.250000 0.000000 2 | 0.000000 0.500000 0.000000 0.750000 0.000000 0.750000 0.250000 0.000000 0.500000 0.000000 0.750000 0.000000 0.750000 0.250000 0.000000 0.500000 0.000000 0.750000 0.000000 0.750000 0.250000 0.000000 0.500000 0.000000 0.750000 0.000000 0.750000 0.250000 0.000000 0.500000 0.000000 0.750000 0.000000 0.750000 0.250000 0.000000 0.500000 0.000000 0.750000 0.000000 0.750000 0.250000 0.000000 0.500000 0.000000 0.750000 0.000000 0.750000 0.250000 0.000000 0.500000 0.000000 0.750000 0.000000 0.750000 0.250000 0.000000 0.500000 0.000000 0.750000 0.000000 0.750000 0.250000 0.000000 3 | 1.000000 0.000000 0.000000 0.750000 0.750000 0.000000 0.250000 1.000000 0.000000 0.000000 0.750000 0.750000 0.000000 0.250000 1.000000 0.000000 0.000000 0.750000 0.750000 0.000000 0.250000 1.000000 0.000000 0.000000 0.750000 0.750000 0.000000 0.250000 1.000000 0.000000 0.000000 0.750000 0.750000 0.000000 0.250000 1.000000 0.000000 0.000000 0.750000 0.750000 0.000000 0.250000 1.000000 0.000000 0.000000 0.750000 0.750000 0.000000 0.250000 1.000000 0.000000 0.000000 0.750000 0.750000 0.000000 0.250000 1.000000 0.000000 0.000000 0.750000 0.750000 0.000000 0.250000 1.000000 4 | -------------------------------------------------------------------------------- /Examples/CustomColormaps/pink.txt: -------------------------------------------------------------------------------- 1 | 0.117851 0.195857 0.250661 0.295468 0.334324 0.369112 0.400892 0.430331 0.457882 0.483867 0.508525 0.532042 0.554563 0.576204 0.597061 0.617213 0.636729 0.655663 0.674066 0.691980 0.709441 0.726483 0.743134 0.759421 0.766356 0.773229 0.780042 0.786796 0.793492 0.800132 0.806718 0.813250 0.819730 0.826160 0.832539 0.838870 0.845154 0.851392 0.857584 0.863731 0.869835 0.875897 0.881917 0.887896 0.893835 0.899735 0.905597 0.911421 0.917208 0.922958 0.928673 0.934353 0.939999 0.945611 0.951190 0.956736 0.962250 0.967733 0.973185 0.978607 0.983999 0.989361 0.994695 1.000000 2 | 0.000000 0.102869 0.145479 0.178174 0.205738 0.230022 0.251976 0.272166 0.290957 0.308607 0.325300 0.341178 0.356348 0.370899 0.384900 0.398410 0.411476 0.424139 0.436436 0.448395 0.460044 0.471405 0.482498 0.493342 0.517549 0.540674 0.562849 0.584183 0.604765 0.624669 0.643958 0.662687 0.680900 0.698638 0.715937 0.732828 0.749338 0.765493 0.781313 0.796819 0.812029 0.826960 0.841625 0.856040 0.870216 0.884164 0.897896 0.911421 0.917208 0.922958 0.928673 0.934353 0.939999 0.945611 0.951190 0.956736 0.962250 0.967733 0.973185 0.978607 0.983999 0.989361 0.994695 1.000000 3 | 0.000000 0.102869 0.145479 0.178174 0.205738 0.230022 0.251976 0.272166 0.290957 0.308607 0.325300 0.341178 0.356348 0.370899 0.384900 0.398410 0.411476 0.424139 0.436436 0.448395 0.460044 0.471405 0.482498 0.493342 0.503953 0.514344 0.524531 0.534522 0.544331 0.553966 0.563436 0.572750 0.581914 0.590937 0.599824 0.608581 0.617213 0.625727 0.634126 0.642416 0.650600 0.658682 0.666667 0.674556 0.682355 0.690066 0.697691 0.705234 0.727166 0.748455 0.769156 0.789314 0.808969 0.828159 0.846913 0.865261 0.883229 0.900837 0.918109 0.935061 0.951711 0.968075 0.984167 1.000000 4 | -------------------------------------------------------------------------------- /Examples/CustomColormaps/prism.txt: -------------------------------------------------------------------------------- 1 | 1.000000 1.000000 1.000000 0.000000 0.000000 0.666667 1.000000 1.000000 1.000000 0.000000 0.000000 0.666667 1.000000 1.000000 1.000000 0.000000 0.000000 0.666667 1.000000 1.000000 1.000000 0.000000 0.000000 0.666667 1.000000 1.000000 1.000000 0.000000 0.000000 0.666667 1.000000 1.000000 1.000000 0.000000 0.000000 0.666667 1.000000 1.000000 1.000000 0.000000 0.000000 0.666667 1.000000 1.000000 1.000000 0.000000 0.000000 0.666667 1.000000 1.000000 1.000000 0.000000 0.000000 0.666667 1.000000 1.000000 1.000000 0.000000 0.000000 0.666667 1.000000 1.000000 1.000000 0.000000 2 | 0.000000 0.500000 1.000000 1.000000 0.000000 0.000000 0.000000 0.500000 1.000000 1.000000 0.000000 0.000000 0.000000 0.500000 1.000000 1.000000 0.000000 0.000000 0.000000 0.500000 1.000000 1.000000 0.000000 0.000000 0.000000 0.500000 1.000000 1.000000 0.000000 0.000000 0.000000 0.500000 1.000000 1.000000 0.000000 0.000000 0.000000 0.500000 1.000000 1.000000 0.000000 0.000000 0.000000 0.500000 1.000000 1.000000 0.000000 0.000000 0.000000 0.500000 1.000000 1.000000 0.000000 0.000000 0.000000 0.500000 1.000000 1.000000 0.000000 0.000000 0.000000 0.500000 1.000000 1.000000 3 | 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 4 | -------------------------------------------------------------------------------- /Examples/CustomColormaps/vga.txt: -------------------------------------------------------------------------------- 1 | 1 0.75 1 1 0 0 0 1 0 0.5 0.5 0.5 0 0 0 0.5 2 | 1 0.75 0 1 1 1 0 0 0 0.5 0 0.5 0.5 0.5 0 0 3 | 1 0.75 0 0 0 1 1 1 0 0.5 0 0 0 0.5 0.5 0.5 4 | -------------------------------------------------------------------------------- /Examples/ImageMathHelper2D.cxx: -------------------------------------------------------------------------------- 1 | #include "ImageMath_Templates.hxx" 2 | 3 | namespace ants 4 | { 5 | 6 | int 7 | ImageMathHelper2D(int argc, char ** argv) 8 | { 9 | int returnval = ImageMathHelperAll<2>(argc, argv); 10 | if (returnval == EXIT_FAILURE) 11 | { 12 | returnval = ImageMathHelper2DOnly<2>(argc, argv); 13 | } 14 | if (returnval == EXIT_FAILURE) 15 | { 16 | returnval = ImageMathHelper2DOr3D<2>(argc, argv); 17 | } 18 | return returnval; 19 | } 20 | 21 | } // namespace ants 22 | -------------------------------------------------------------------------------- /Examples/ImageMathHelper3D.cxx: -------------------------------------------------------------------------------- 1 | #include "ImageMath_Templates.hxx" 2 | 3 | namespace ants 4 | { 5 | 6 | int 7 | ImageMathHelper3D(int argc, char ** argv) 8 | { 9 | int returnval = ImageMathHelperAll<3>(argc, argv); 10 | if (returnval == EXIT_FAILURE) 11 | { 12 | returnval = ImageMathHelper3DOnly<3>(argc, argv); 13 | } 14 | if (returnval == EXIT_FAILURE) 15 | { 16 | returnval = ImageMathHelper2DOr3D<3>(argc, argv); 17 | } 18 | if (returnval == EXIT_FAILURE) 19 | { 20 | returnval = ImageMathHelper3DOr4D<3>(argc, argv); 21 | } 22 | return returnval; 23 | } 24 | 25 | } // namespace ants 26 | -------------------------------------------------------------------------------- /Examples/ImageMathHelper4D.cxx: -------------------------------------------------------------------------------- 1 | #include "ImageMath_Templates.hxx" 2 | 3 | namespace ants 4 | { 5 | 6 | int 7 | ImageMathHelper4D(int argc, char ** argv) 8 | { 9 | int returnval = ImageMathHelperAll<4>(argc, argv); 10 | if (returnval == EXIT_FAILURE) 11 | { 12 | returnval = ImageMathHelper4DOnly<4>(argc, argv); 13 | } 14 | if (returnval == EXIT_FAILURE) 15 | { 16 | returnval = ImageMathHelper3DOr4D<4>(argc, argv); 17 | } 18 | return returnval; 19 | } 20 | 21 | 22 | } // namespace ants 23 | -------------------------------------------------------------------------------- /Examples/TestSuite/ANTS_ELASTIC_test.cmake: -------------------------------------------------------------------------------- 1 | ##################################################################################### 2 | ##################################################################################### 3 | set(THIS_TEST_NAME ANTS_ELASTIC) 4 | set(OUTPUT_PREFIX ${CMAKE_BINARY_DIR}/TEST_${THIS_TEST_NAME} ) 5 | set(WARP ${OUTPUT_PREFIX}Warp.nii.gz ${OUTPUT_PREFIX}Affine.txt ) 6 | set(INVERSEWARP -i ${OUTPUT_PREFIX}Affine.txt ${OUTPUT_PREFIX}InverseWarp.nii.gz ) 7 | set(WARP_IMAGE ${CMAKE_BINARY_DIR}/${THIS_TEST_NAME}_warped.nii.gz) 8 | set(INVERSEWARP_IMAGE ${CMAKE_BINARY_DIR}/${THIS_TEST_NAME}_inversewarped.nii.gz) 9 | 10 | 11 | add_test(NAME ${THIS_TEST_NAME} COMMAND ANTS 2 12 | -m PR[ ${R16_IMAGE}, ${R64_IMAGE}, 1, 2] -r Gauss[ 0, 1 ] 13 | -t Elast[1] -i 50x50x50 -o ${OUTPUT_PREFIX}.nii.gz 14 | ) 15 | 16 | add_test(NAME ${THIS_TEST_NAME}_WARP COMMAND WarpImageMultiTransform 2 17 | ${R64_IMAGE} ${WARP_IMAGE} ${WARP} -R ${R16_IMAGE} ) 18 | set_property(TEST ${THIS_TEST_NAME}_WARP APPEND PROPERTY DEPENDS ${THIS_TEST_NAME}) 19 | 20 | add_test(NAME ${THIS_TEST_NAME}_JPG COMMAND ConvertToJpg ${WARP_IMAGE} ${THIS_TEST_NAME}.jpg) 21 | set_property(TEST ${THIS_TEST_NAME}_JPG APPEND PROPERTY DEPENDS ${THIS_TEST_NAME}_WARP) 22 | 23 | # add_test(NAME ${THIS_TEST_NAME}_WARP_METRIC_0 COMMAND MeasureImageSimilarity 2 0 24 | # ${R16_IMAGE} ${WARP_IMAGE} 25 | # ${OUTPUT_PREFIX}log.txt ${OUTPUT_PREFIX}metric.nii.gz 26 | # 14.6829 0.05) 27 | # set_property(TEST ${THIS_TEST_NAME}_WARP_METRIC_0 APPEND PROPERTY DEPENDS ${THIS_TEST_NAME}_WARP) 28 | # 29 | # add_test(NAME ${THIS_TEST_NAME}_WARP_METRIC_1 COMMAND MeasureImageSimilarity 2 1 30 | # ${R16_IMAGE} ${WARP_IMAGE} ${OUTPUT_PREFIX}log.txt 31 | # ${OUTPUT_PREFIX}metric.nii.gz 32 | # 0.989737 0.05) 33 | # set_property(TEST ${THIS_TEST_NAME}_WARP_METRIC_1 APPEND PROPERTY DEPENDS ${THIS_TEST_NAME}_WARP) 34 | # 35 | # add_test(NAME ${THIS_TEST_NAME}_WARP_METRIC_2 COMMAND MeasureImageSimilarity 2 2 36 | # ${R16_IMAGE} ${WARP_IMAGE} ${OUTPUT_PREFIX}log.txt 37 | # ${OUTPUT_PREFIX}metric.nii.gz 38 | # -1.01828 0.05) 39 | # set_property(TEST ${THIS_TEST_NAME}_WARP_METRIC_2 APPEND PROPERTY DEPENDS ${THIS_TEST_NAME}_WARP) 40 | -------------------------------------------------------------------------------- /Examples/TestSuite/ANTS_PSE_MSQ_TXT_test.cmake: -------------------------------------------------------------------------------- 1 | ##################################################################################### 2 | ##################################################################################### 3 | set(THIS_TEST_NAME ANTS_PSE_MSQ_TXT) 4 | set(OUTPUT_PREFIX ${CMAKE_BINARY_DIR}/TEST_${THIS_TEST_NAME} ) 5 | set(WARP ${OUTPUT_PREFIX}Warp.nii.gz ${OUTPUT_PREFIX}Affine.txt ) 6 | set(INVERSEWARP -i ${OUTPUT_PREFIX}Affine.txt ${OUTPUT_PREFIX}InverseWarp.nii.gz ) 7 | set(WARP_IMAGE ${CMAKE_BINARY_DIR}/${THIS_TEST_NAME}_warped.nii.gz) 8 | set(INVERSEWARP_IMAGE ${CMAKE_BINARY_DIR}/${THIS_TEST_NAME}_inversewarped.nii.gz) 9 | 10 | 11 | add_test(NAME ${THIS_TEST_NAME} COMMAND ANTS 2 12 | -i 191x170x155x40x30 -r Gauss[3,0] 13 | -t SyN[0.2] 14 | -m MSQ[${DEVIL_IMAGE},${ANGEL_IMAGE},1,0] 15 | -m PSE[${DEVIL_IMAGE},${ANGEL_IMAGE},${DEVIL_IMAGE_TXT},${ANGEL_IMAGE_TXT},1,0.1,11,1,1] 16 | --continue-affine 0 --number-of-affine-iterations 0 17 | -o ${OUTPUT_PREFIX}.nii.gz --use-all-metrics-for-convergence 1 ) 18 | -------------------------------------------------------------------------------- /Examples/TestSuite/ANTS_PSE_MSQ_VTK_test.cmake: -------------------------------------------------------------------------------- 1 | ##################################################################################### 2 | ##################################################################################### 3 | set(THIS_TEST_NAME ANTSPSE_MSQ_VTK) 4 | set(OUTPUT_PREFIX ${CMAKE_BINARY_DIR}/TEST_${THIS_TEST_NAME} ) 5 | set(WARP ${OUTPUT_PREFIX}Warp.nii.gz ${OUTPUT_PREFIX}Affine.txt ) 6 | set(INVERSEWARP -i ${OUTPUT_PREFIX}Affine.txt ${OUTPUT_PREFIX}InverseWarp.nii.gz ) 7 | set(WARP_IMAGE ${CMAKE_BINARY_DIR}/${THIS_TEST_NAME}_warped.nii.gz) 8 | set(INVERSEWARP_IMAGE ${CMAKE_BINARY_DIR}/${THIS_TEST_NAME}_inversewarped.nii.gz) 9 | 10 | 11 | add_test(NAME ${THIS_TEST_NAME} COMMAND ANTS 2 12 | -i 91x70x55x40x30 -r Gauss[3,0.,32] -t SyN[0.25] 13 | -m MSQ[${DEVIL_IMAGE},${ANGEL_IMAGE},1,0] 14 | -m PSE[${DEVIL_IMAGE},${ANGEL_IMAGE},${DEVIL_IMAGE_VTK},${ANGEL_IMAGE_VTK},1,0.33,11,1,25] 15 | --continue-affine 0 --number-of-affine-iterations 0 16 | -o ${OUTPUT_PREFIX}.nii.gz) 17 | -------------------------------------------------------------------------------- /Examples/TestSuite/ANTS_ROT_GSYN_test.cmake: -------------------------------------------------------------------------------- 1 | ##################################################################################### 2 | ##################################################################################### 3 | set(THIS_TEST_NAME ANTS_ROT_GSYN) 4 | set(OUTPUT_PREFIX ${CMAKE_BINARY_DIR}/TEST_${THIS_TEST_NAME} ) 5 | set(WARP ${OUTPUT_PREFIX}Warp.nii.gz ${OUTPUT_PREFIX}Affine.txt ) 6 | set(INVERSEWARP -i ${OUTPUT_PREFIX}Affine.txt ${OUTPUT_PREFIX}InverseWarp.nii.gz ) 7 | set(WARP_IMAGE ${CMAKE_BINARY_DIR}/${THIS_TEST_NAME}_warped.nii.gz) 8 | set(INVERSEWARP_IMAGE ${CMAKE_BINARY_DIR}/${THIS_TEST_NAME}_inversewarped.nii.gz) 9 | 10 | add_test(NAME ${THIS_TEST_NAME} COMMAND ANTS 3 11 | -m MSQ[${ROT_REF_IMAGE},${ROT_MOV_IMAGE},1,0] 12 | -t SyN[0.25] -i 50x5x0 -r Gauss[3,0.0,32] 13 | -o ${OUTPUT_PREFIX}.nii.gz) 14 | 15 | add_test(NAME ${THIS_TEST_NAME}_WARP COMMAND WarpImageMultiTransform 3 16 | ${ROT_MOV_IMAGE} ${WARP_IMAGE} -R ${ROT_REF_IMAGE} ${WARP} ) 17 | set_property(TEST ${THIS_TEST_NAME}_WARP APPEND PROPERTY DEPENDS ${THIS_TEST_NAME}) 18 | 19 | # add_test(NAME ${THIS_TEST_NAME}_WARP_METRIC_0 COMMAND MeasureImageSimilarity 3 0 20 | # ${ROT_REF_IMAGE} ${WARP_IMAGE} 21 | # ${OUTPUT_PREFIX}log.txt ${OUTPUT_PREFIX}metric.nii.gz 22 | # 35.4473 0.5) 23 | # set_property(TEST ${THIS_TEST_NAME}_WARP_METRIC_0 APPEND PROPERTY DEPENDS ${THIS_TEST_NAME}_WARP) 24 | 25 | add_test(NAME ${THIS_TEST_NAME}_INVERSEWARP COMMAND WarpImageMultiTransform 3 26 | ${ROT_REF_IMAGE} ${INVERSEWARP_IMAGE} -R ${ROT_MOV_IMAGE} ${INVERSEWARP}) 27 | set_property(TEST ${THIS_TEST_NAME}_INVERSEWARP APPEND PROPERTY DEPENDS ${THIS_TEST_NAME}) 28 | 29 | # add_test(NAME ${THIS_TEST_NAME}_INVERSEWARP_METRIC_0 COMMAND MeasureImageSimilarity 3 0 30 | # ${ROT_MOV_IMAGE} ${INVERSEWARP_IMAGE} 31 | # ${OUTPUT_PREFIX}log.txt ${OUTPUT_PREFIX}metric.nii.gz 32 | # 35.5439 0.5) 33 | # set_property(TEST ${THIS_TEST_NAME}_INVERSEWARP_METRIC_0 APPEND PROPERTY DEPENDS ${THIS_TEST_NAME}_INVERSEWARP) 34 | -------------------------------------------------------------------------------- /Examples/TestSuite/ANTS_SYN_WITH_TIME_test.cmake: -------------------------------------------------------------------------------- 1 | ##################################################################################### 2 | ##################################################################################### 3 | set(THIS_TEST_NAME ANTS_SYN_WITH_TIME) 4 | set(OUTPUT_PREFIX ${CMAKE_BINARY_DIR}/TEST_${THIS_TEST_NAME} ) 5 | set(WARP ${OUTPUT_PREFIX}Warp.nii.gz ${OUTPUT_PREFIX}Affine.txt ) 6 | set(INVERSEWARP -i ${OUTPUT_PREFIX}Affine.txt ${OUTPUT_PREFIX}InverseWarp.nii.gz ) 7 | set(WARP_IMAGE ${CMAKE_BINARY_DIR}/${THIS_TEST_NAME}_warped.nii.gz) 8 | set(INVERSEWARP_IMAGE ${CMAKE_BINARY_DIR}/${THIS_TEST_NAME}_inversewarped.nii.gz) 9 | 10 | 11 | add_test(NAME ${THIS_TEST_NAME} COMMAND ANTS 2 12 | -m MSQ[${CHALF_IMAGE},${C_IMAGE},1,0] -r Gauss[0.5,0.1] 13 | -t SyN[1,10,0.05] -i 150x100x2x2 -o ${OUTPUT_PREFIX} 14 | --geodesic 1 --number-of-affine-iterations 0) 15 | 16 | add_test(NAME ${THIS_TEST_NAME}_WARP COMMAND WarpImageMultiTransform 2 17 | ${C_IMAGE} ${OUTPUT_PREFIX}.nii.gz ${OUTPUT_PREFIX}Warp.nii.gz -R ${CHALF_IMAGE} ) 18 | set_property(TEST ${THIS_TEST_NAME}_WARP APPEND PROPERTY DEPENDS ${THIS_TEST_NAME}) 19 | 20 | # add_test(NAME ${THIS_TEST_NAME}_WARP_METRIC_0 COMMAND MeasureImageSimilarity 2 0 21 | # ${CHALF_IMAGE} ${OUTPUT_PREFIX}.nii.gz 22 | # ${OUTPUT_PREFIX}log.txt ${OUTPUT_PREFIX}metric.nii.gz 23 | # 0.0943736 0.1) 24 | # set_property(TEST ${THIS_TEST_NAME}_WARP_METRIC_0 APPEND PROPERTY DEPENDS ${THIS_TEST_NAME}_WARP) 25 | -------------------------------------------------------------------------------- /Examples/TestSuite/APOC_OTSU_INIT_test.cmake: -------------------------------------------------------------------------------- 1 | 2 | ## 3 | # Apocrita tests 4 | ## 5 | 6 | ExternalData_expand_arguments(${PROJECT_NAME}FetchData R16_MASK DATA{${SMALL_DATA_DIR}/r16mask.nii.gz) 7 | ExternalData_expand_arguments(${PROJECT_NAME}FetchData R16_PRIORS DATA{${SMALL_DATA_DIR}/r16priors.nii.gz) 8 | 9 | #add_test(NAME APOC_OTSU_INIT COMMAND Apocrita 2 -i otsu[${R16_IMAGE},3] -x ${R16_MASK} -n 10 -m [0.3,1x1,0.2,0.1] -o ${OUTPUT_PREFIX}.nii.gz ) 10 | #add_test(NAME APOC_OTSU_INIT_RADIUS_2x2 COMMAND Apocrita 2 -i otsu[${R16_IMAGE},3] -x ${R16_MASK} -n 10 -m [0.3,2,0.2,0.1] -o ${OUTPUT_PREFIX}.nii.gz ) 11 | #add_test(NAME APOC_KMEANS_INIT COMMAND Apocrita 2 -i kmeans[${R16_IMAGE},3] -x ${R16_MASK} -n 10 -m [0.3,1x1,0.2,0.1] -o [${OUTPUT_PREFIX}.nii.gz,${OUTPUT_PREFIX}_posteriors%d.nii.gz]) 12 | #add_test(NAME APOC_PRIORLABELIMAGE_INIT COMMAND Apocrita 2 -i priorlabelimage[${R16_IMAGE},5,${R16_PRIORS},0.5] -x ${R16_MASK} -n 10 -m [0.3,1x1,0.2,0.1] -o [${OUTPUT_PREFIX}.nii.gz,${OUTPUT_PREFIX}_posteriors%d.nii.gz] -l 1[1,0.75] -l 2[1,1.0] -l 3[0.5,0.5] -l 4[1,1]) 13 | -------------------------------------------------------------------------------- /Examples/TestSuite/template_for_executableTestWrapper.cxx.in: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "include/ants.h" 5 | 6 | int @ANTS_FUNCTION_NAME@Test(int argc, char* argv[]) 7 | { 8 | const char * const * const ptr = &argv[1]; 9 | 10 | const std::vector command_line_args( ptr, ptr + argc - 1 ); 11 | const bool return_value = ants::@ANTS_FUNCTION_NAME@( command_line_args, &std::cout ); 12 | return return_value; 13 | } 14 | -------------------------------------------------------------------------------- /Examples/Testing/Temporary/CTestCostData.txt: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /Examples/Testing/Temporary/LastTest.log: -------------------------------------------------------------------------------- 1 | Start testing: Nov 12 21:41 PST 2 | ---------------------------------------------------------- 3 | End testing: Nov 12 21:41 PST 4 | -------------------------------------------------------------------------------- /Examples/antsRegistration2DDouble.cxx: -------------------------------------------------------------------------------- 1 | #include "antsRegistrationTemplateHeader.h" 2 | 3 | namespace ants 4 | { 5 | 6 | // Instantiate the 2DDouble version 7 | int 8 | antsRegistration2DDouble(ParserType::Pointer & parser) 9 | { 10 | return DoRegistration(parser); 11 | } 12 | 13 | } // end namespace ants 14 | -------------------------------------------------------------------------------- /Examples/antsRegistration2DFloat.cxx: -------------------------------------------------------------------------------- 1 | #include "antsRegistrationTemplateHeader.h" 2 | 3 | namespace ants 4 | { 5 | 6 | // Instantiate the 2DFloat version 7 | int 8 | antsRegistration2DFloat(ParserType::Pointer & parser) 9 | { 10 | return DoRegistration(parser); 11 | } 12 | 13 | } // end namespace ants 14 | -------------------------------------------------------------------------------- /Examples/antsRegistration3DDouble.cxx: -------------------------------------------------------------------------------- 1 | #include "antsRegistrationTemplateHeader.h" 2 | 3 | namespace ants 4 | { 5 | 6 | // Instantiate the 3DDouble version 7 | int 8 | antsRegistration3DDouble(ParserType::Pointer & parser) 9 | { 10 | return DoRegistration(parser); 11 | } 12 | 13 | } // end namespace ants 14 | -------------------------------------------------------------------------------- /Examples/antsRegistration3DFloat.cxx: -------------------------------------------------------------------------------- 1 | #include "antsRegistrationTemplateHeader.h" 2 | 3 | namespace ants 4 | { 5 | 6 | // Instantiate the 3DFloat version 7 | int 8 | antsRegistration3DFloat(ParserType::Pointer & parser) 9 | { 10 | return DoRegistration(parser); 11 | } 12 | 13 | } // end namespace ants 14 | -------------------------------------------------------------------------------- /Examples/antsRegistration4DDouble.cxx: -------------------------------------------------------------------------------- 1 | #include "antsRegistrationTemplateHeader.h" 2 | 3 | namespace ants 4 | { 5 | 6 | // Instantiate the 4DDouble version 7 | int 8 | antsRegistration4DDouble(ParserType::Pointer & parser) 9 | { 10 | return DoRegistration(parser); 11 | } 12 | 13 | } // end namespace ants 14 | -------------------------------------------------------------------------------- /Examples/antsRegistration4DFloat.cxx: -------------------------------------------------------------------------------- 1 | #include "antsRegistrationTemplateHeader.h" 2 | 3 | namespace ants 4 | { 5 | 6 | // Instantiate the 4DFloat version 7 | int 8 | antsRegistration4DFloat(ParserType::Pointer & parser) 9 | { 10 | return DoRegistration(parser); 11 | } 12 | 13 | } // end namespace ants 14 | -------------------------------------------------------------------------------- /Examples/iMathFunctions.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Advanced Normalization Tools 4 | 5 | Copyright (c) ConsortiumOfANTS. All rights reserved. 6 | See accompanying COPYING.txt or 7 | https://github.com/stnava/ANTs/blob/master/ANTSCopyright.txt for details. 8 | 9 | This software is distributed WITHOUT ANY WARRANTY; without even 10 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 11 | PURPOSE. See the above copyright notices for more information. 12 | 13 | =========================================================================*/ 14 | #ifndef __iMathFunctions_h 15 | #define __iMathFunctions_h 16 | 17 | #include "antsUtilities.h" 18 | 19 | namespace ants 20 | { 21 | // Templated functions that perform the work for 22 | // iMath.cxx and iMath.cpp (in ANTSR) 23 | // after each function, suggested default parameters are defined 24 | 25 | unsigned int 26 | morph_shape_flag(const char * shape); 27 | 28 | template 29 | typename ImageType::Pointer 30 | iMathBlobDetector(typename ImageType::Pointer image, unsigned int nBlobs); /*???*/ 31 | 32 | // Canny Edge Filter 33 | template 34 | typename ImageType::Pointer 35 | iMathCanny(typename ImageType::Pointer image, /*0*/ 36 | double sigma, 37 | double lowerThreshold, 38 | double upperThreshold); 39 | 40 | // Distance Map 41 | template 42 | typename ImageType::Pointer 43 | iMathDistanceMap(typename ImageType::Pointer image, bool useSpacing); /*0*/ 44 | #define iMathDistanceMapUseSpacing true; 45 | 46 | // Fill Holes in objects 47 | template 48 | typename ImageType::Pointer 49 | iMathFillHoles(typename ImageType::Pointer image, double holeParam); /*0*/ 50 | #define iMathFillHolesHoleParam 2; 51 | 52 | 53 | #define iMathGetLargestComponentMinSize 50; 54 | 55 | // Grayscale morphological closing 56 | template 57 | typename ImageType::Pointer 58 | iMathGC(typename ImageType::Pointer image, unsigned long radius); /*0*/ 59 | #define iMathGCRadius 1; 60 | #define iMathGCValue 1; 61 | 62 | 63 | } // namespace ants 64 | #include "iMathFunctions.hxx" 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /Examples/include/ANTSConformalMapping.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSCONFORMALMAPPING_H 3 | #define ANTSCONFORMALMAPPING_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ANTSConformalMapping(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSCONFORMALMAPPING_H 14 | -------------------------------------------------------------------------------- /Examples/include/ANTSIntegrateVectorField.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSINTEGRATEVECTORFIELD_H 3 | #define ANTSINTEGRATEVECTORFIELD_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ANTSIntegrateVectorField(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSINTEGRATEVECTORFIELD_H 14 | -------------------------------------------------------------------------------- /Examples/include/ANTSIntegrateVelocityField.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSINTEGRATEVELOCITYFIELD_H 3 | #define ANTSINTEGRATEVELOCITYFIELD_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ANTSIntegrateVelocityField(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSINTEGRATEVELOCITYFIELD_H 14 | -------------------------------------------------------------------------------- /Examples/include/ANTSJacobian.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSJACOBIAN_H 3 | #define ANTSJACOBIAN_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ANTSJacobian(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSJACOBIAN_H 14 | -------------------------------------------------------------------------------- /Examples/include/ANTSUseDeformationFieldToGetAffineTransform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSUSEDEFORMATIONFIELDTOGETAFFINETRANSFORM_H 3 | #define ANTSUSEDEFORMATIONFIELDTOGETAFFINETRANSFORM_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ANTSUseDeformationFieldToGetAffineTransform(std::vector, // equivalent to argv of command line 9 | // parameters to main() 10 | std::ostream * out_stream // [optional] output stream to write 11 | ); 12 | } // namespace ants 13 | 14 | #endif // ANTSUSEDEFORMATIONFIELDTOGETAFFINETRANSFORM_H 15 | -------------------------------------------------------------------------------- /Examples/include/ANTSUseLandmarkImagesToGetAffineTransform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSUSELANDMARKIMAGESTOGETAFFINETRANSFORM_H 3 | #define ANTSUSELANDMARKIMAGESTOGETAFFINETRANSFORM_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ANTSUseLandmarkImagesToGetAffineTransform(std::vector, // equivalent to argv of command line 9 | // parameters to main() 10 | std::ostream * out_stream // [optional] output stream to write 11 | ); 12 | } // namespace ants 13 | 14 | #endif // ANTSUSELANDMARKIMAGESTOGETAFFINETRANSFORM_H 15 | -------------------------------------------------------------------------------- /Examples/include/ANTSUseLandmarkImagesToGetBSplineDisplacementField.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSUSELANDMARKIMAGESTOGETBSPLINEDISPLACEMENTFIELD_H 3 | #define ANTSUSELANDMARKIMAGESTOGETBSPLINEDISPLACEMENTFIELD_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ANTSUseLandmarkImagesToGetBSplineDisplacementField(std::vector, // equivalent to argv of command line 9 | // parameters to main() 10 | std::ostream * out_stream // [optional] output stream to write 11 | ); 12 | } // namespace ants 13 | 14 | #endif // ANTSUSELANDMARKIMAGESTOGETBSPLINEDISPLACEMENTFIELD_H 15 | -------------------------------------------------------------------------------- /Examples/include/ANTS_.h: -------------------------------------------------------------------------------- 1 | #ifndef ANTS_H 2 | #define ANTS_H 3 | 4 | namespace ants 5 | { 6 | extern int 7 | ANTS(std::vector, // equivalent to argv of command line parameters to main() 8 | std::ostream * out_stream // [optional] output stream to write 9 | ); 10 | } // namespace ants 11 | 12 | #endif // ANTS_H 13 | -------------------------------------------------------------------------------- /Examples/include/AddNoiseToImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ADDNOISETOIMAGE_H 3 | #define ADDNOISETOIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | AddNoiseToImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ADDNOISETOIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/Atropos.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ATROPOS_H 3 | #define ATROPOS_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | Atropos(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ATROPOS_H 14 | -------------------------------------------------------------------------------- /Examples/include/AverageAffineTransform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef AVERAGEAFFINETRANSFORM_H 3 | #define AVERAGEAFFINETRANSFORM_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | AverageAffineTransform(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // AVERAGEAFFINETRANSFORM_H 14 | -------------------------------------------------------------------------------- /Examples/include/AverageAffineTransformNoRigid.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef AVERAGEAFFINETRANSFORMNORIGID_H 3 | #define AVERAGEAFFINETRANSFORMNORIGID_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | AverageAffineTransformNoRigid(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // AVERAGEAFFINETRANSFORMNORIGID_H 14 | -------------------------------------------------------------------------------- /Examples/include/AverageImages.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef AVERAGEIMAGES_H 3 | #define AVERAGEIMAGES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | AverageImages(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // AVERAGEIMAGES_H 14 | -------------------------------------------------------------------------------- /Examples/include/AverageTensorImages.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef AVERAGETENSORIMAGES_H 3 | #define AVERAGETENSORIMAGES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | AverageTensorImages(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // AVERAGETENSORIMAGES_H 14 | -------------------------------------------------------------------------------- /Examples/include/CheckTopology.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CHECKTOPOLOGY_H 3 | #define CHECKTOPOLOGY_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | CheckTopology(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CHECKTOPOLOGY_H 14 | -------------------------------------------------------------------------------- /Examples/include/ClusterImageStatistics.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CLUSTERIMAGESTATISTICS_H 3 | #define CLUSTERIMAGESTATISTICS_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ClusterImageStatistics(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CLUSTERIMAGESTATISTICS_H 14 | -------------------------------------------------------------------------------- /Examples/include/ComposeMultiTransform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef COMPOSEMULTITRANSFORM_H 3 | #define COMPOSEMULTITRANSFORM_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ComposeMultiTransform(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // COMPOSEMULTITRANSFORM_H 14 | -------------------------------------------------------------------------------- /Examples/include/CompositeTransformUtil.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef COMPOSITETRANSFORMUTIL_H 3 | #define COMPOSITETRANSFORMUTIL_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | CompositeTransformUtil(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // COMPOSITETRANSFORMUTIL_H 14 | -------------------------------------------------------------------------------- /Examples/include/ComputeSimilarityMetric.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef COMPUTESIMILARITYMETRIC_H 3 | #define COMPUTESIMILARITYMETRIC_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ComputeSimilarityMetric(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // COMPUTESIMILARITYMETRIC_H 14 | -------------------------------------------------------------------------------- /Examples/include/ConformalMapping.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CONFORMALMAPPING_H 3 | #define CONFORMALMAPPING_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ConformalMapping(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CONFORMALMAPPING_H 14 | -------------------------------------------------------------------------------- /Examples/include/ConvertImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CONVERTIMAGE_H 3 | #define CONVERTIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ConvertImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // TILEIMAGES_H 14 | -------------------------------------------------------------------------------- /Examples/include/ConvertImagePixelType.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CONVERTIMAGEPIXELTYPE_H 3 | #define CONVERTIMAGEPIXELTYPE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ConvertImagePixelType(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CONVERTIMAGEPIXELTYPE_H 14 | -------------------------------------------------------------------------------- /Examples/include/ConvertInputImagePixelTypeToFloat.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CONVERTINPUTIMAGEPIXELTYPETOFLOAT_H 3 | #define CONVERTINPUTIMAGEPIXELTYPETOFLOAT_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ConvertInputImagePixelTypeToFloat(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CONVERTINPUTIMAGEPIXELTYPETOFLOAT_H 14 | -------------------------------------------------------------------------------- /Examples/include/ConvertScalarImageToRGB.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CONVERTSCALARIMAGETORGB_H 3 | #define CONVERTSCALARIMAGETORGB_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ConvertScalarImageToRGB(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CONVERTSCALARIMAGETORGB_H 14 | -------------------------------------------------------------------------------- /Examples/include/ConvertToJpg.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CONVERTTOJPG_H 3 | #define CONVERTTOJPG_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ConvertToJpg(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CONVERTTOJPG_H 14 | -------------------------------------------------------------------------------- /Examples/include/ConvertTransformFile.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CONVERTTRANSFORMFILE_H 3 | #define CONVERTTRANSFORMFILE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ConvertTransformFile(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // PRINTHEADER_H 14 | -------------------------------------------------------------------------------- /Examples/include/ConvertVectorFieldToVTK.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CONVERTVECTORFIELDTOVTK_H 3 | #define CONVERTVECTORFIELDTOVTK_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ConvertVectorFieldToVTK(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CONVERTVECTORFIELDTOVTK_H 14 | -------------------------------------------------------------------------------- /Examples/include/CopyImageHeaderInformation.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef COPYIMAGEHEADERINFORMATION_H 3 | #define COPYIMAGEHEADERINFORMATION_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | CopyImageHeaderInformation(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // COPYIMAGEHEADERINFORMATION_H 14 | -------------------------------------------------------------------------------- /Examples/include/CreateDTICohort.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CREATEDTICOHORT_H 3 | #define CREATEDTICOHORT_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | CreateDTICohort(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CREATEDTICOHORT_H 14 | -------------------------------------------------------------------------------- /Examples/include/CreateDisplacementField.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CREATEDISPLACEMENTFIELD_H 3 | #define CREATEDISPLACEMENTFIELD_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | CreateDisplacementField(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CREATEDISPLACEMENTFIELD_H 14 | -------------------------------------------------------------------------------- /Examples/include/CreateImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CREATEIMAGE_H 3 | #define CREATEIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | CreateImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CREATEIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/CreateJacobianDeterminantImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CREATEJACOBIANDETERMINANTIMAGE_H 3 | #define CREATEJACOBIANDETERMINANTIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | CreateJacobianDeterminantImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CREATEJACOBIANDETERMINANTIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/CreateTiledMosaic.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CREATETILEDMOSAIC_H 3 | #define CREATETILEDMOSAIC_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | CreateTiledMosaic(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CREATETILEDMOSAIC_H 14 | -------------------------------------------------------------------------------- /Examples/include/CreateWarpedGridImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CREATEWARPEDGRIDIMAGE_H 3 | #define CREATEWARPEDGRIDIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | CreateWarpedGridImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // CREATEWARPEDGRIDIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/DeNrrd.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DENRRD_H 3 | #define DENRRD_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | DeNrrd(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // DENRRD_H 14 | -------------------------------------------------------------------------------- /Examples/include/DenoiseImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DENOISEIMAGE_H 3 | #define DENOISEIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | DenoiseImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // DENOISEIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/ExtractRegionFromImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef EXTRACTREGIONFROMIMAGE_H 3 | #define EXTRACTREGIONFROMIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ExtractRegionFromImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // EXTRACTREGIONFROMIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/ExtractRegionFromImageByMask.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef EXTRACTREGIONFROMIMAGEBYMASK_H 3 | #define EXTRACTREGIONFROMIMAGEBYMASK_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ExtractRegionFromImageByMask(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // EXTRACTREGIONFROMIMAGEBYMASK_H 14 | -------------------------------------------------------------------------------- /Examples/include/ExtractSliceFromImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef EXTRACTSLICEFROMIMAGE_H 3 | #define EXTRACTSLICEFROMIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ExtractSliceFromImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // EXTRACTSLICEFROMIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/FitBSplineToPoints.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef FITBSPLINECURVETOPOINTS_H 3 | #define FITBSPLINECURVETOPOINTS_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | FitBSplineToPoints(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // FITBSPLINECURVETOPOINTS_H 14 | -------------------------------------------------------------------------------- /Examples/include/GetConnectedComponentsFeatureImages.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef GETCONNECTEDCOMPONENTSFEATUREIMAGES_H 3 | #define GETCONNECTEDCOMPONENTSFEATUREIMAGES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | GetConnectedComponentsFeatureImages(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // GETCONNECTEDCOMPONENTSFEATUREIMAGES_H 14 | -------------------------------------------------------------------------------- /Examples/include/GetMeshAndTopology.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef GETMESHANDTOPOLOGY_H 3 | #define GETMESHANDTOPOLOGY_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | GetMeshAndTopology(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // GETMESHANDTOPOLOGY_H 14 | -------------------------------------------------------------------------------- /Examples/include/ImageCompare.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef IMAGECOMPARE_H 3 | #define IMAGECOMPARE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ImageCompare(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // IMAGECOMPARE_H 14 | -------------------------------------------------------------------------------- /Examples/include/ImageIntensityStatistics.h: -------------------------------------------------------------------------------- 1 | #ifndef IMAGEINTENSITYSTATISTICS_H 2 | #define IMAGEINTENSITYSTATISTICS_H 3 | 4 | namespace ants 5 | { 6 | extern int 7 | ImageIntensityStatistics(std::vector, // equivalent to argv of command line parameters to main() 8 | std::ostream * out_stream // [optional] output stream to write 9 | ); 10 | } // namespace ants 11 | 12 | #endif // IMAGEINTENSITYSTATISTICS_H 13 | -------------------------------------------------------------------------------- /Examples/include/ImageMath.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef IMAGEMATH_H 3 | #define IMAGEMATH_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ImageMath(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // IMAGEMATH_H 14 | -------------------------------------------------------------------------------- /Examples/include/ImageSetStatistics.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef IMAGESETSTATISTICS_H 3 | #define IMAGESETSTATISTICS_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ImageSetStatistics(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // IMAGESETSTATISTICS_H 14 | -------------------------------------------------------------------------------- /Examples/include/KellyKapowski.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef KELLYKAPOWSKI_H 3 | #define KELLYKAPOWSKI_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | KellyKapowski(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // KELLYKAPOWSKI_H 14 | -------------------------------------------------------------------------------- /Examples/include/KellySlater.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef KELLYSLATER_H 3 | #define KELLYSLATER_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | KellySlater(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // KELLYSLATER_H 14 | -------------------------------------------------------------------------------- /Examples/include/LabelClustersUniquely.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LABELCLUSTERSUNIQUELY_H 3 | #define LABELCLUSTERSUNIQUELY_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | LabelClustersUniquely(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // LABELCLUSTERSUNIQUELY_H 14 | -------------------------------------------------------------------------------- /Examples/include/LabelGeometryMeasures.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LABELGEOMETRYMEASURES_H 3 | #define LABELGEOMETRYMEASURES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | LabelGeometryMeasures(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // LABELGEOMETRYMEASURES_H 14 | -------------------------------------------------------------------------------- /Examples/include/LabelOverlapMeasures.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LABELOVERLAPMEASURES_H 3 | #define LABELOVERLAPMEASURES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | LabelOverlapMeasures(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // LABELOVERLAPMEASURES_H 14 | -------------------------------------------------------------------------------- /Examples/include/LaplacianThickness.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LAPLACIANTHICKNESS_H 3 | #define LAPLACIANTHICKNESS_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | LaplacianThickness(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // LAPLACIANTHICKNESS_H 14 | -------------------------------------------------------------------------------- /Examples/include/LesionFilling.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LESIONFILLING_H 3 | #define LESIONFILLING_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | LesionFilling(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // LESIONFILLING_H 14 | -------------------------------------------------------------------------------- /Examples/include/MeasureImageSimilarity.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef MEASUREIMAGESIMILARITY_H 3 | #define MEASUREIMAGESIMILARITY_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | MeasureImageSimilarity(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // MEASUREIMAGESIMILARITY_H 14 | -------------------------------------------------------------------------------- /Examples/include/MeasureMinMaxMean.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef MEASUREMINMAXMEAN_H 3 | #define MEASUREMINMAXMEAN_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | MeasureMinMaxMean(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // MEASUREMINMAXMEAN_H 14 | -------------------------------------------------------------------------------- /Examples/include/MemoryTest.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef MEMORYTEST_H 3 | #define MEMORYTEST_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | MemoryTest(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // MEMORYTEST_H 14 | -------------------------------------------------------------------------------- /Examples/include/MultiplyImages.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef MULTIPLYIMAGES_H 3 | #define MULTIPLYIMAGES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | MultiplyImages(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // MULTIPLYIMAGES_H 14 | -------------------------------------------------------------------------------- /Examples/include/N3BiasFieldCorrection.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef N3BIASFIELDCORRECTION_H 3 | #define N3BIASFIELDCORRECTION_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | N3BiasFieldCorrection(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // N3BIASFIELDCORRECTION_H 14 | -------------------------------------------------------------------------------- /Examples/include/N4BiasFieldCorrection.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef N4BIASFIELDCORRECTION_H 3 | #define N4BIASFIELDCORRECTION_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | N4BiasFieldCorrection(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // N4BIASFIELDCORRECTION_H 14 | -------------------------------------------------------------------------------- /Examples/include/NonLocalSuperResolution.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef NONLOCALSUPERRESOLUTION_H 3 | #define NONLOCALSUPERRESOLUTION_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | NonLocalSuperResolution(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // NONLOCALSUPERRESOLUTION_H 14 | -------------------------------------------------------------------------------- /Examples/include/PasteImageIntoImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef PASTEIMAGEINTOIMAGE_H 3 | #define PASTEIMAGEINTOIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | PasteImageIntoImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // PASTEIMAGEINTOIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/PermuteFlipImageOrientationAxes.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef PERMUTEFLIPIMAGEORIENTATIONAXES_H 3 | #define PERMUTEFLIPIMAGEORIENTATIONAXES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | PermuteFlipImageOrientationAxes(std::vector, // equivalent to argv of command line parameters to 9 | // main() 10 | std::ostream * out_stream // [optional] output stream to write 11 | ); 12 | } // namespace ants 13 | 14 | #endif // PERMUTEFLIPIMAGEORIENTATIONAXES_H 15 | -------------------------------------------------------------------------------- /Examples/include/PrintHeader.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef PRINTHEADER_H 3 | #define PRINTHEADER_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | PrintHeader(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // PRINTHEADER_H 14 | -------------------------------------------------------------------------------- /Examples/include/RebaseTensorImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef REBASETENSORIMAGE_H 3 | #define REBASETENSORIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | RebaseTensorImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // REBASETENSORIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/ReorientTensorImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef REORIENTTENSORIMAGE_H 3 | #define REORIENTTENSORIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ReorientTensorImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // REORIENTTENSORIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/ResampleImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef RESAMPLEIMAGE_H 3 | #define RESAMPLEIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ResampleImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // RESAMPLEIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/ResampleImageBySpacing.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef RESAMPLEIMAGEBYSPACING_H 3 | #define RESAMPLEIMAGEBYSPACING_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ResampleImageBySpacing(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // RESAMPLEIMAGEBYSPACING_H 14 | -------------------------------------------------------------------------------- /Examples/include/ResetDirection.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef RESETDIRECTION_H 3 | #define RESETDIRECTION_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ResetDirection(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // RESETDIRECTION_H 14 | -------------------------------------------------------------------------------- /Examples/include/SetDirectionByMatrix.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SETDIRECTIONBYMATRIX_H 3 | #define SETDIRECTIONBYMATRIX_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | SetDirectionByMatrix(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // SETDIRECTIONBYMATRIX_H 14 | -------------------------------------------------------------------------------- /Examples/include/SetOrigin.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SETORIGIN_H 3 | #define SETORIGIN_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | SetOrigin(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // SETORIGIN_H 14 | -------------------------------------------------------------------------------- /Examples/include/SetSpacing.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SETSPACING_H 3 | #define SETSPACING_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | SetSpacing(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // SETSPACING_H 14 | -------------------------------------------------------------------------------- /Examples/include/SimulateDisplacementField.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMULATEDISPLACEMENTFIELD_H 2 | #define SIMULATEDISPLACEMENTFIELD_H 3 | 4 | namespace ants 5 | { 6 | extern int 7 | SimulateDisplacementField(std::vector, // equivalent to argv of command line parameters to main() 8 | std::ostream * out_stream // [optional] output stream to write 9 | ); 10 | } // namespace ants 11 | 12 | #endif // SIMULATEIMAGE_H 13 | -------------------------------------------------------------------------------- /Examples/include/SmoothDisplacementField.h: -------------------------------------------------------------------------------- 1 | #ifndef SMOOTHDISPLACEMENTFIELD_H 2 | #define SMOOTHDISPLACEMENTFIELD_H 3 | 4 | namespace ants 5 | { 6 | extern int 7 | SmoothDisplacementField(std::vector, // equivalent to argv of command line parameters to main() 8 | std::ostream * out_stream // [optional] output stream to write 9 | ); 10 | } // namespace ants 11 | 12 | #endif // SMOOTHIMAGE_H 13 | -------------------------------------------------------------------------------- /Examples/include/SmoothImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SMOOTHIMAGE_H 3 | #define SMOOTHIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | SmoothImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // SMOOTHIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/StackSlices.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef STACKSLICES_H 3 | #define STACKSLICES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | StackSlices(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // STACKSLICES_H 14 | -------------------------------------------------------------------------------- /Examples/include/StudentsTestOnImages.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef STUDENTSTESTONIMAGES_H 3 | #define STUDENTSTESTONIMAGES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | StudentsTestOnImages(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // STUDENTSTESTONIMAGES_H 14 | -------------------------------------------------------------------------------- /Examples/include/SuperResolution.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SUPERRESOLUTION_H 3 | #define SUPERRESOLUTION_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | SuperResolution(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // SUPERRESOLUTION_H 14 | -------------------------------------------------------------------------------- /Examples/include/SurfaceBasedSmoothing.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SURFACEBASEDSMOOTHING_H 3 | #define SURFACEBASEDSMOOTHING_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | SurfaceBasedSmoothing(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // SURFACEBASEDSMOOTHING_H 14 | -------------------------------------------------------------------------------- /Examples/include/SurfaceCurvature.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SURFACECURVATURE_H 3 | #define SURFACECURVATURE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | SurfaceCurvature(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // SURFACECURVATURE_H 14 | -------------------------------------------------------------------------------- /Examples/include/TensorDerivedImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TENSORDERIVEDIMAGE_H 3 | #define TENSORDERIVEDIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | TensorDerivedImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // TENSORDERIVEDIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/TextureCooccurrenceFeatures.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TEXTURECOOCCURRENCEFEATURES_H 3 | #define TEXTURECOOCCURRENCEFEATURES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | TextureCooccurrenceFeatures(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // THRESHOLDIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/TextureRunLengthFeatures.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TEXTURERUNLENGTHFEATURES_H 3 | #define TEXTURERUNLENGTHFEATURES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | TextureRunLengthFeatures(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // THRESHOLDIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/ThresholdImage.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef THRESHOLDIMAGE_H 3 | #define THRESHOLDIMAGE_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ThresholdImage(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // THRESHOLDIMAGE_H 14 | -------------------------------------------------------------------------------- /Examples/include/TileImages.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TILEIMAGES_H 3 | #define TILEIMAGES_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | TileImages(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // TILEIMAGES_H 14 | -------------------------------------------------------------------------------- /Examples/include/TimeSCCAN.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TIMESCCAN_H 3 | #define TIMESCCAN_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | TimeSCCAN(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // TIMESCCAN_H 14 | -------------------------------------------------------------------------------- /Examples/include/WarpImageMultiTransform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef WARPIMAGEMULTITRANSFORM_H 3 | #define WARPIMAGEMULTITRANSFORM_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | WarpImageMultiTransform(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // WARPIMAGEMULTITRANSFORM_H 14 | -------------------------------------------------------------------------------- /Examples/include/WarpTensorImageMultiTransform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef WARPTENSORIMAGEMULTITRANSFORM_H 3 | #define WARPTENSORIMAGEMULTITRANSFORM_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | WarpTensorImageMultiTransform(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // WARPTENSORIMAGEMULTITRANSFORM_H 14 | -------------------------------------------------------------------------------- /Examples/include/WarpTimeSeriesImageMultiTransform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef WARPTIMESERIESIMAGEMULTITRANSFORM_H 3 | #define WARPTIMESERIESIMAGEMULTITRANSFORM_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | WarpTimeSeriesImageMultiTransform(std::vector, // equivalent to argv of command line parameters to 9 | // main() 10 | std::ostream * out_stream // [optional] output stream to write 11 | ); 12 | } // namespace ants 13 | 14 | #endif // WARPTIMESERIESIMAGEMULTITRANSFORM_H 15 | -------------------------------------------------------------------------------- /Examples/include/WarpVTKPolyDataMultiTransform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef WARPVTKPOLYDATAMULTITRANSFORM_H 3 | #define WARPVTKPOLYDATAMULTITRANSFORM_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | WarpVTKPolyDataMultiTransform(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // WARPVTKPOLYDATAMULTITRANSFORM_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsAI.h: -------------------------------------------------------------------------------- 1 | #ifndef ANTSAI_H 2 | #define ANTSAI_H 3 | 4 | namespace ants 5 | { 6 | extern int 7 | antsAI(std::vector, // equivalent to argv of command line parameters to main() 8 | std::ostream * out_stream // [optional] output stream to write 9 | ); 10 | } // namespace ants 11 | 12 | #endif // ANTSAI_H 13 | -------------------------------------------------------------------------------- /Examples/include/antsAffineInitializer.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSAFFINEINITIALIZER_H 3 | #define ANTSAFFINEINITIALIZER_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsAffineInitializer(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSAFFINEINITIALIZER_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsAlignOrigin.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSALIGNORIGIN_H 3 | #define ANTSALIGNORIGIN_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsAlignOrigin(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSLIGNORIGIN_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsApplyTransforms.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSAPPLYTRANSFORMS_H 3 | #define ANTSAPPLYTRANSFORMS_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsApplyTransforms(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSAPPLYTRANSFORMS_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsApplyTransformsToPoints.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSAPPLYTRANSFORMSTOPOINTS_H 3 | #define ANTSAPPLYTRANSFORMSTOPOINTS_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsApplyTransformsToPoints(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSAPPLYTRANSFORMSTOPOINTS_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsImageRead.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSIMAGEREAD_H 3 | #define ANTSIMAGEREAD_H 4 | 5 | #include "itkImage.h" 6 | 7 | namespace ants 8 | { 9 | extern itk::Image::Pointer antsImageRead(std::string // filename of the image to be read 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSIMAGEREAD_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsImageWrite.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSIMAGEWRITE_H 3 | #define ANTSIMAGEWRITE_H 4 | 5 | #include "itkImage.h" 6 | 7 | namespace ants 8 | { 9 | extern int 10 | antsImageWrite(itk::Image::Pointer, // image to write 11 | std::string // filename of the target file 12 | ); 13 | } // namespace ants 14 | 15 | #endif // ANTSIMAGEWRITE_H 16 | -------------------------------------------------------------------------------- /Examples/include/antsJointFusion.h: -------------------------------------------------------------------------------- 1 | #ifndef ANTSJOINTFUSION_H 2 | #define ANTSJOINTFUSION_H 3 | 4 | namespace ants 5 | { 6 | extern int 7 | antsJointFusion(std::vector, // equivalent to argv of command line parameters to main() 8 | std::ostream * out_stream // [optional] output stream to write 9 | ); 10 | } // namespace ants 11 | 12 | #endif // ANTSJOINTFUSION_H 13 | -------------------------------------------------------------------------------- /Examples/include/antsJointTensorFusion.h: -------------------------------------------------------------------------------- 1 | #ifndef ANTSJOINTTENSORFUSION_H 2 | #define ANTSJOINTTENSORFUSION_H 3 | 4 | namespace ants 5 | { 6 | extern int 7 | antsJointTensorFusion(std::vector, // equivalent to argv of command line parameters to main() 8 | std::ostream * out_stream // [optional] output stream to write 9 | ); 10 | } // namespace ants 11 | 12 | #endif // ANTSJOINTTENSORFUSION_H 13 | -------------------------------------------------------------------------------- /Examples/include/antsLandmarkBasedTransformInitializer.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSLANDMARKBASEDTRANSFORMINITIALIZER_H 3 | #define ANTSLANDMARKBASEDTRANSFORMINITIALIZER_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsLandmarkBasedTransformInitializer(std::vector, // equivalent to argv of command line 9 | // parameters to main() 10 | std::ostream * out_stream // [optional] output stream to write 11 | ); 12 | } // namespace ants 13 | 14 | #endif // ANTSUSELANDMARKIMAGESTOGETBSPLINEDISPLACEMENTFIELD_H 15 | -------------------------------------------------------------------------------- /Examples/include/antsMotionCorr.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSMOTIONCORR_H 3 | #define ANTSMOTIONCORR_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsMotionCorr(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSMOTIONCORR_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsMotionCorrDiffusionDirection.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSMOTIONCORRDIFFUSIONDIRECTION_H 3 | #define ANTSMOTIONCORRDIFFUSIONDIRECTION_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsMotionCorrDiffusionDirection(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSMOTIONCORRDIFFUSIONDIRECTION_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsMotionCorrStats.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSMOTIONCORRSTATS_H 3 | #define ANTSMOTIONCORRSTATS_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsMotionCorrStats(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSMOTIONCORRSTATS_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsRegistration.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSREGISTRATION_H 3 | #define ANTSREGISTRATION_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsRegistration(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSREGISTRATION_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsSliceRegularizedRegistration.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSLICEREGULARIZEDREGISTRATION_H 3 | #define ANTSLICEREGULARIZEDREGISTRATION_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsSliceRegularizedRegistration(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSLICEREGULARIZEDREGISTRATION_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsSurf.h: -------------------------------------------------------------------------------- 1 | #ifndef ANTSSURF_H 2 | #define ANTSSURF_H 3 | 4 | namespace ants 5 | { 6 | extern int 7 | antsSurf(std::vector, // equivalent to argv of command line parameters to main() 8 | std::ostream * out_stream // [optional] output stream to write 9 | ); 10 | } // namespace ants 11 | 12 | #endif // ANTSSURF_H 13 | -------------------------------------------------------------------------------- /Examples/include/antsTransformInfo.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSTRANSFORMINFO_H 3 | #define ANTSTRANSFORMINFO_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsTransformInfo(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTSMOTIONCORRSTATS_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsUtilitiesTesting.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTSUTILITIESTESTING_H 3 | #define ANTSUTILITIESTESTING_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | antsUtilitiesTesting(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // LABELGEOMETRYMEASURES_H 14 | -------------------------------------------------------------------------------- /Examples/include/antsVol.h: -------------------------------------------------------------------------------- 1 | #ifndef ANTSVOL_H 2 | #define ANTSVOL_H 3 | 4 | namespace ants 5 | { 6 | extern int 7 | antsVol(std::vector, // equivalent to argv of command line parameters to main() 8 | std::ostream * out_stream // [optional] output stream to write 9 | ); 10 | } // namespace ants 11 | 12 | #endif // ANTVOL_H 13 | -------------------------------------------------------------------------------- /Examples/include/ants_moco.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ANTS_MOCO_H 3 | #define ANTS_MOCO_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | ants_moco(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ANTS_MOCO_H 14 | -------------------------------------------------------------------------------- /Examples/include/compareTwoTransforms.h: -------------------------------------------------------------------------------- 1 | #ifndef COMPARETWOTRANSFORMS_H 2 | #define COMPARETWOTRANSFORMS_H 3 | 4 | namespace ants 5 | { 6 | extern int 7 | compareTwoTransforms(std::vector, // equivalent to argv of command line parameters to main() 8 | std::ostream * out_stream // [optional] output stream to write 9 | ); 10 | } // namespace ants 11 | 12 | #endif // COMPARETWOTRANSFORMS_H 13 | -------------------------------------------------------------------------------- /Examples/include/iMath.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef IMATH_H 3 | #define IMATH_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | iMath(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // IMATH_H 14 | -------------------------------------------------------------------------------- /Examples/include/itkCommandLineParserTest.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ITKCOMMANDLINEPARSERTEST_H 3 | #define ITKCOMMANDLINEPARSERTEST_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | itkCommandLineParserTest(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // ITKCOMMANDLINEPARSERTEST_H 14 | -------------------------------------------------------------------------------- /Examples/include/sccan.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SCCAN_H 3 | #define SCCAN_H 4 | 5 | namespace ants 6 | { 7 | extern int 8 | sccan(std::vector, // equivalent to argv of command line parameters to main() 9 | std::ostream * out_stream // [optional] output stream to write 10 | ); 11 | } // namespace ants 12 | 13 | #endif // SCCAN_H 14 | -------------------------------------------------------------------------------- /Examples/include/simpleSynRegistration.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMPLESYNREGISTRATION_H 2 | #define SIMPLESYNREGISTRATION_H 3 | 4 | namespace ants 5 | { 6 | extern int 7 | simpleSynRegistration(std::vector, // equivalent to argv of command line parameters to main() 8 | std::ostream * out_stream // [optional] output stream to write 9 | ); 10 | } // namespace ants 11 | 12 | #endif // SIMPLESYNREGISTRATION_H 13 | -------------------------------------------------------------------------------- /Examples/template_for_executables.cxx.in: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "include/ants.h" 5 | 6 | int main( int argc , char * argv[] ) 7 | { 8 | const char * const * const ptr = &argv[1] ; 9 | const std::vector< std::string > command_line_args( ptr , ptr+argc-1 ); 10 | std::ostream * command_stream = &std::cout; 11 | return ants::@ANTS_FUNCTION_NAME@( command_line_args , command_stream ) ; 12 | } 13 | -------------------------------------------------------------------------------- /ImageSegmentation/antsPassThroughListSampleFilter.hxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Advanced Normalization Tools 4 | 5 | Copyright (c) ConsortiumOfANTS. All rights reserved. 6 | See accompanying COPYING.txt or 7 | https://github.com/stnava/ANTs/blob/master/ANTSCopyright.txt 8 | for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notices for more information. 13 | 14 | =========================================================================*/ 15 | #ifndef __antsPassThroughListSampleFilter_hxx 16 | #define __antsPassThroughListSampleFilter_hxx 17 | 18 | 19 | namespace itk 20 | { 21 | namespace ants 22 | { 23 | namespace Statistics 24 | { 25 | template 26 | PassThroughListSampleFilter::PassThroughListSampleFilter() 27 | { 28 | this->AllocateOutput(); 29 | this->GetOutput()->SetMeasurementVectorSize(this->GetInput()->GetMeasurementVectorSize()); 30 | } 31 | 32 | template 33 | PassThroughListSampleFilter::~PassThroughListSampleFilter() = default; 34 | 35 | template 36 | void 37 | PassThroughListSampleFilter::GenerateData() 38 | { 39 | /** 40 | * Simply pass the input to the output. 41 | */ 42 | typename ListSampleType::ConstIterator It = this->GetInput()->Begin(); 43 | while (It != this->GetInput()->End()) 44 | { 45 | this->GetOutput()->PushBack(It.GetMeasurementVector()); 46 | ++It; 47 | } 48 | } 49 | 50 | template 51 | void 52 | PassThroughListSampleFilter::PrintSelf(std::ostream & os, Indent indent) const 53 | { 54 | this->Superclass::PrintSelf(os, indent); 55 | } 56 | } // end of namespace Statistics 57 | } // end of namespace ants 58 | } // end of namespace itk 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /Scripts/ANTSAverage2DAffine.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | NUMPARAM=$# 3 | if [ $NUMPARAM -lt 2 ] ; then 4 | echo " Usage " 5 | echo " $0 OUTNameAffine.txt *Affine.txt " 6 | echo " assumes close to idetity affine transforms " 7 | exit 8 | fi 9 | OUTNM=$1 10 | shift 1 11 | FLIST=$* 12 | NFILES=0 13 | PARAM1=0 14 | PARAM2=0 15 | PARAM3=0 16 | PARAM4=0 17 | PARAM5=0 18 | PARAM6=0 19 | PARAM7=0 20 | PARAM8=0 21 | LL=` head -n 4 $FLIST | grep Paramet | cut -d ' ' -f 2 ` 22 | for x in $LL ; do PARAM1=` awk -v a=$PARAM1 -v b=$x 'BEGIN{print (a + b)}' ` ; let NFILES=$NFILES+1 ; done 23 | PARAM1=` awk -v a=$PARAM1 -v b=$NFILES 'BEGIN{print (a / b)}' ` 24 | 25 | LL=` head -n 4 $FLIST | grep Paramet | cut -d ' ' -f 3 ` 26 | for x in $LL ; do PARAM2=` awk -v a=$PARAM2 -v b=$x 'BEGIN{print (a + b)}' ` ; done 27 | PARAM2=` awk -v a=$PARAM2 -v b=$NFILES 'BEGIN{print (a / b)}' ` 28 | 29 | LL=` head -n 4 $FLIST | grep Paramet | cut -d ' ' -f 4 ` 30 | for x in $LL ; do PARAM3=` awk -v a=$PARAM3 -v b=$x 'BEGIN{print (a + b)}' ` ; done 31 | PARAM3=` awk -v a=$PARAM3 -v b=$NFILES 'BEGIN{print (a / b)}' ` 32 | 33 | LL=` head -n 4 $FLIST | grep Paramet | cut -d ' ' -f 5 ` 34 | for x in $LL ; do PARAM4=` awk -v a=$PARAM4 -v b=$x 'BEGIN{print (a + b)}' ` ; done 35 | PARAM4=` awk -v a=$PARAM4 -v b=$NFILES 'BEGIN{print (a / b)}' ` 36 | 37 | LL=` head -n 4 $FLIST | grep Paramet | cut -d ' ' -f 6 ` 38 | for x in $LL ; do PARAM5=` awk -v a=$PARAM5 -v b=$x 'BEGIN{print (a + b)}' ` ; done 39 | PARAM5=` awk -v a=$PARAM5 -v b=$NFILES 'BEGIN{print (a / b)}' ` 40 | 41 | LL=` head -n 4 $FLIST | grep Paramet | cut -d ' ' -f 7 ` 42 | for x in $LL ; do PARAM6=` awk -v a=$PARAM6 -v b=$x 'BEGIN{print (a + b)}' ` ; done 43 | PARAM6=` awk -v a=$PARAM6 -v b=$NFILES 'BEGIN{print (a / b)}' ` 44 | 45 | LL=` cat $FLIST | grep FixedParamet | cut -d ' ' -f 2 ` 46 | for x in $LL ; do PARAM7=` awk -v a=$PARAM7 -v b=$x 'BEGIN{print (a + b)}' ` ; done 47 | PARAM7=` awk -v a=$PARAM7 -v b=$NFILES 'BEGIN{print (a / b)}' ` 48 | 49 | LL=` cat $FLIST | grep FixedParamet | cut -d ' ' -f 3 ` 50 | for x in $LL ; do PARAM8=` awk -v a=$PARAM8 -v b=$x 'BEGIN{print (a + b)}' ` ; done 51 | PARAM8=` awk -v a=$PARAM8 -v b=$NFILES 'BEGIN{print (a / b)}' ` 52 | 53 | echo "#Insight Transform File V1.0 " > $OUTNM 54 | echo "# Transform 0 " >> $OUTNM 55 | echo "Transform: MatrixOffsetTransformBase_double_2_2 " >> $OUTNM 56 | echo "Parameters: $PARAM1 $PARAM2 $PARAM3 $PARAM4 $PARAM5 $PARAM6 " >> $OUTNM 57 | echo "FixedParameters: $PARAM7 $PARAM8 " >> $OUTNM 58 | 59 | 60 | exit 61 | -------------------------------------------------------------------------------- /Scripts/antsLaplacianBoundaryCondition.R: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env Rscript 2 | library(getopt) 3 | options(digits=3) 4 | Args <- commandArgs() 5 | self<-Args[4] 6 | self<-substring(self,8,nchar(as.character(self))) 7 | spec = c( 8 | 'mask' , 'm', "0", "character" ," name of brain mask image ", 9 | 'input' , 'i', "1", "character"," the input prefix ", 10 | 'dim' , 'd', "3", "character"," the input prefix ", 11 | 'output' , 'o', "output.nii.gz", "character"," the output prefix ") 12 | # ............................................. # 13 | spec=matrix(spec,ncol=5,byrow=TRUE) 14 | # get the options 15 | opt = getopt(spec) 16 | # ............................................. # 17 | #help was asked for. 18 | if ( !is.null(opt$help) || length(opt) == 1 ) { 19 | #print a friendly message and exit with a non-zero error code 20 | cat("\n") 21 | cat(paste(self,"\n")) 22 | for ( x in 1:nrow(spec) ) { 23 | cat("\n") 24 | longopt<-paste("--",spec[x,1],sep='') 25 | shortopt<-paste("-",spec[x,2],sep='') 26 | hlist<-paste(shortopt,"|",longopt,spec[x,5],"\n \n") 27 | # print(hlist,quote=F) 28 | cat(format(hlist, width=40, justify = c("left"))) 29 | } 30 | cat(format("Example: \n", width=40, justify = c("left"))) 31 | ex<-paste(self," --output myoutput.nii.gz --input image.nii.gz --mask mask.nii.gz \n \n ") 32 | ex<-format(ex, width=length(ex), justify = c("left")) 33 | cat("\n") 34 | cat(ex) 35 | q(status=1); 36 | } 37 | if ( is.null( opt$dim ) ) dim<-3 else dim<-as.numeric( opt$dim ) 38 | # 39 | # take care of optional parameters 40 | for ( myfn in c( opt$mask, opt$input ) ) 41 | { 42 | if ( !file.exists(myfn) ) 43 | { 44 | print(paste("input file",myfn,"does not exist. Exiting.")) 45 | q(status=1) 46 | } # else print(paste(" have input file",myfn)) 47 | } 48 | library(ANTsR) 49 | img<-antsImageRead( opt$input, dim ) 50 | mask<-antsImageRead( opt$mask, dim ) 51 | mymean<-mean( img[ mask == 1] ) 52 | outimg<-antsImageClone(img) 53 | outimg[ mask == 0 ]<-mymean 54 | outimg = iMath( outimg, "Laplacian", 1, 1 ) 55 | antsImageWrite( outimg , opt$output ) 56 | -------------------------------------------------------------------------------- /Scripts/antsMotionCorrExample: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | in=$1 4 | if [[ ! -s $in ]] || [[ ${#in} -lt 3 ]] ; then 5 | echo open this example file and take a look to see what is done 6 | exit 7 | fi 8 | out=motcorr 9 | 10 | # average the time series 11 | antsMotionCorr -d 3 -a $in -o ${out}_avg.nii.gz 12 | 13 | # do affine motion correction 14 | antsMotionCorr -d 3 -o [${out},${out}.nii.gz,${out}_avg.nii.gz] -m gc[ ${out}_avg.nii.gz , $in , 1 , 1 , Random, 0.05 ] -t Affine[ 0.005 ] -i 20 -u 1 -e 1 -s 0 -f 1 -n 10 15 | 16 | # do affine and deformable correction 17 | antsMotionCorr -d 3 -o [${out},${out}.nii.gz,${out}_avg.nii.gz] -m gc[ ${out}_avg.nii.gz , $in , 1 , 1 , Random, 0.05 ] -t Affine[ 0.005 ] -i 20 -u 1 -e 1 -s 0 -f 1 -m CC[ ${out}_avg.nii.gz , $in , 1 , 2 ] -t GaussianDisplacementField[0.15,3,0.5] -i 20 -u 1 -e 1 -s 0 -f 1 -n 10 18 | 19 | # check a result by taking a 3d slice from 4d 20 | ExtractSliceFromImage 4 ${out}.nii.gz temp.nii.gz 0 32 21 | -------------------------------------------------------------------------------- /Scripts/antsaffine.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if ! command -v ANTS &> /dev/null 4 | then 5 | echo "Cannot find the ANTS program. Please \(re\)define \$PATH in your environment." 6 | exit 1 7 | fi 8 | 9 | NUMPARAMS=$# 10 | 11 | if [ $NUMPARAMS -lt 3 ] 12 | then 13 | echo " USAGE :: " 14 | echo " sh antsaffine.sh ImageDimension fixed.ext moving.ext OPTIONAL-OUTPREFIX PURELY-RIGID " 15 | echo " affine only registration " 16 | exit 17 | fi 18 | 19 | #initialization, here, is unbiased 20 | DIM=$1 21 | 22 | if [ ${#DIM} -gt 1 ] 23 | then 24 | echo " Problem with specified ImageDimension => User Specified Value = $DIM " 25 | exit 26 | fi 27 | 28 | FIXED=$2 29 | 30 | if [ ${#FIXED} -lt 1 -o ! -f $FIXED ] 31 | then 32 | echo " Problem with specified Fixed Image => User Specified Value = $FIXED " 33 | exit 34 | fi 35 | 36 | MOVING=$3 37 | 38 | if [ ${#MOVING} -lt 1 -o ! -f $MOVING ] 39 | then 40 | echo " Problem with specified Moving Image => User Specified Value = $MOVING " 41 | exit 42 | fi 43 | 44 | OUTPUTNAME=` echo $MOVING | cut -d '.' -f 1 ` 45 | 46 | if [ $NUMPARAMS -gt 3 ] 47 | then 48 | OUTPUTNAME=${4} 49 | fi 50 | 51 | RIGID=" --rigid-affine false " 52 | if [ $NUMPARAMS -gt 4 ] 53 | then 54 | RIGID=" --rigid-affine true --affine-gradient-descent-option 0.5x0.95x1.e-4x1.e-4 " 55 | fi 56 | echo " Will this mapping be purely rigid? $RIGID " 57 | 58 | #below, some affine options 59 | #--MI-option 16x8000 #-a InitAffine.txt --continue-affine 0 60 | 61 | exe=" ANTS $DIM -m MI[ ${FIXED},${MOVING},1,32 ] -o ${OUTPUTNAME} -i 0 --use-Histogram-Matching --number-of-affine-iterations 10000x10000x10000x10000x10000 $RIGID " 62 | 63 | echo " $exe " 64 | 65 | $exe 66 | 67 | WarpImageMultiTransform $DIM $MOVING ${OUTPUTNAME}deformed.nii.gz ${OUTPUTNAME}Affine.txt -R ${FIXED} 68 | -------------------------------------------------------------------------------- /Scripts/antsdeformationmag.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | NUMPARAMS=$# 3 | if [ $NUMPARAMS -lt 3 ] 4 | then 5 | echo " USAGE :: " 6 | echo " $0 inWarp WhichTypeOfMagnitude outputmagnitudeimage.nii " 7 | echo " WhichTypeOfMagnitude == Laplacian Grad Euclidean " 8 | echo " the numbers that come out of this depend on some itk filters being dimensionally correct and consistent. " 9 | echo " this may not be the case -- however, relative values should be ok , e.g comparing Grad values to Grad values etc " 10 | exit 11 | fi 12 | 13 | inwarp=$1 14 | whichmag=$2 15 | magimage=$3 16 | dimarr=(`PrintHeader ${inwarp}xvec.nii.gz | grep Spacing | grep , | wc `) 17 | DIM=${dimarr[0]} 18 | let DIM=${DIM}+1 19 | # multiply some image of the right size by 0 to make the initial magnitude image 20 | ImageMath $DIM $magimage m ${inwarp}xvec.nii.gz 0 21 | ImageMath $DIM ${magimage}temp.nii.gz m ${inwarp}xvec.nii.gz 0 22 | ok=0 23 | for x in x y z 24 | do 25 | if [ -s ${inwarp}${x}vec.nii.gz ] 26 | then 27 | # compute the magnitude of the x-component deformation 28 | if [ $whichmag == Laplacian ] 29 | then 30 | echo " Laplacian $x " 31 | ok=1 32 | ImageMath $DIM ${magimage}temp.nii.gz Laplacian ${inwarp}${x}vec.nii.gz 1.0 0 33 | elif [ $whichmag == Grad ] 34 | then 35 | echo " Grad $x " 36 | ok=1 37 | ImageMath $DIM ${magimage}temp.nii.gz Grad ${inwarp}${x}vec.nii.gz 1.0 0 38 | #ImageMath $DIM temp.nii.gz m temp.nii.gz temp.nii.gz 39 | elif [ $whichmag == Euclidean ] 40 | then 41 | echo " Euclidean $x " 42 | ok=1 43 | ImageMath $DIM ${magimage}temp.nii.gz m ${inwarp}${x}vec.nii.gz ${inwarp}${x}vec.nii.gz 44 | fi 45 | # add the xvec magnitude to the magimage 46 | ImageMath $DIM $magimage + $magimage ${magimage}temp.nii.gz 47 | fi # ifz 48 | done #loop 49 | if [ $ok -eq 1 ] 50 | then 51 | # take the square root 52 | ImageMath $DIM $magimage ^ $magimage 0.5 53 | MeasureMinMaxMean $DIM $magimage 54 | #thus, 55 | #magimage=sqrt( x*x + y*y + z*z ) 56 | else 57 | echo " User Requested deformation measure :: $whichmag " 58 | echo " that is not available -- user needs to choose another type of deformation measure " 59 | fi 60 | 61 | rm -f ${magimage}temp.nii.gz 62 | -------------------------------------------------------------------------------- /Scripts/antsqsub.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #$ -S /bin/bash 3 | 4 | dir=$1 5 | cmd=$2 6 | para=$3 7 | naming=$4 8 | fixname=$5 9 | movingname=$6 10 | echo $6 11 | opta=$7 12 | echo $7 13 | optb=$8 14 | echo $8 15 | optc=$9 16 | echo $9 17 | optd=${10} 18 | echo ${10} 19 | opte=${11} 20 | echo ${11} 21 | optf=${12} 22 | echo ${12} 23 | optg=${13} 24 | echo ${13} 25 | opth=${14} 26 | echo ${14} 27 | opti=${15} 28 | echo ${15} 29 | optj=${16} 30 | echo ${16} 31 | optk=${17} 32 | echo ${17} 33 | optl=${18} 34 | echo ${18} 35 | optm=${19} 36 | echo ${19} 37 | optn=${20} 38 | echo ${20} 39 | opto=${21} 40 | echo ${21} 41 | optp=${22} 42 | echo ${22} 43 | optq=${23} 44 | echo ${23} 45 | optr=${24} 46 | echo ${24} 47 | opts=${25} 48 | echo ${25} 49 | optt=${26} 50 | echo ${26} 51 | 52 | echo " dir " 53 | echo $1 54 | 55 | cd $1 56 | echo $cmd $para $naming $fixname $movingname $opta $optb $optc $optd $opte $optf $optg $opth $opti $optj $optk $optl $optm $optn $opto $optp $optq $optr $opts $optt 57 | $cmd $para $naming $fixname $movingname $opta $optb $optc $optd $opte $optf $optg $opth $opti $optj $optk $optl $optm $optn $opto $optp $optq $optr $opts $optt ${27} ${28} ${29} ${30} ${31} ${32} ${33} ${34} ${35} ${36} ${37} ${38} ${39} ${40} ${41} ${42} ${43} ${44} ${45} ${46} ${47} ${48} ${49} 58 | cd - 59 | -------------------------------------------------------------------------------- /Scripts/cbf_pasl_robust_batch.R: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env Rscript 2 | library( "ANTsR" ) 3 | library("extremevalues" ) 4 | args<-commandArgs(TRUE) 5 | 6 | aslImg <- args[1] 7 | m0Img <- args[2] 8 | outname <- args[3] 9 | 10 | #init <- cbf_pasl_robust( asl_img, m0_img ) 11 | #cbf <- cbf_pasl_quantify( init$delta, init$m0 ) 12 | 13 | pasl <- antsImageRead( aslImg, 4 ) 14 | m0 <- antsImageRead( m0Img, 3 ) 15 | 16 | pasl.processing <- aslPerfusion(pasl, moreaccurate=FALSE, m0=m0, interpolation="sinc" ) 17 | pasl.parameters <- list( sequence="pasl", m0=m0 ) 18 | cbf <- quantifyCBF( pasl.processing$perfusion, pasl.processing$mask, pasl.parameters ) 19 | meancbf <- cbf$kmeancbf 20 | cbfOverTime <- cbf$timecbf 21 | print(outname) 22 | antsImageWrite( meancbf, outname ) 23 | 24 | -------------------------------------------------------------------------------- /Scripts/cbf_pcasl_robust_batch.R: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env Rscript 2 | library( "ANTsR" ) 3 | library("extremevalues" ) 4 | args<-commandArgs(TRUE) 5 | 6 | aslImg <- args[1] 7 | outname <- args[2] 8 | 9 | 10 | pasl <- antsImageRead( aslImg, 4 ) 11 | 12 | pcasl.processing <- aslPerfusion(pasl, moreaccurate=FALSE) 13 | pcasl.parameters <- list( sequence="pcasl", m0=pcasl.processing$m0 ) 14 | cbf <- quantifyCBF( pcasl.processing$perfusion, pcasl.processing$mask, pcasl.parameters ) 15 | meancbf <- cbf$kmeancbf 16 | cbfOverTime <- cbf$timecbf 17 | print(outname) 18 | antsImageWrite( meancbf, outname ) 19 | 20 | -------------------------------------------------------------------------------- /Scripts/guidedregistration.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ $# -lt 7 ] 3 | then 4 | echo " USAGE \n sh command.sh fixed.nii fixedhipp.nii moving.nii movinghipp.nii outputname iterations DIM " 5 | echo " the template = fixed.nii , the individual = moving.nii " 6 | echo " iterations should be of the form 100x100x10 " 7 | exit 8 | fi 9 | if ! command -v ANTS &> /dev/null 10 | then 11 | echo we cant find the ANTS program -- does not seem to exist. please \(re\)define \$PATH in your environment. 12 | exit 13 | fi 14 | 15 | FIX=$1 16 | FIXH=$2 17 | MOV=$3 18 | MOVH=$4 19 | OUT=$5 20 | ITS=$6 21 | DIM=$7 22 | 23 | if [ ${#FIX} -lt 1 -o ! -f $FIX ] 24 | then 25 | echo " Problem with specified Fixed Image => User Specified Value = $FIX " 26 | exit 27 | fi 28 | if [ ${#MOV} -lt 1 -o ! -f $MOV ] 29 | then 30 | echo " Problem with specified Moving Image => User Specified Value = $MOV " 31 | exit 32 | fi 33 | if [ ${#FIXH} -lt 1 -o ! -f $FIXH ] 34 | then 35 | echo " Problem with specified Fixed Label Image => User Specified Value = $FIXH " 36 | exit 37 | fi 38 | if [ ${#MOVH} -lt 1 -o ! -f $MOVH ] 39 | then 40 | echo " Problem with specified Moving Label Image => User Specified Value = $MOVH " 41 | exit 42 | fi 43 | 44 | # == Important Parameters Begin == 45 | 46 | LMWT=$9 # weight on landmarks 47 | 48 | INTWT=$8 # weight on intensity -- twice the landmarks 49 | 50 | # PSE/point-set-expectation/PointSetExpectation[fixedImage,movingImage,fixedPoints,movingPoints,weight,pointSetPercentage,pointSetSigma,boundaryPointsOnly,kNeighborhood, PartialMatchingIterations=100000] 51 | # the partial matching option assumes the complete labeling is in the first set of label parameters ... 52 | # more iterations leads to more symmetry in the matching - 0 iterations means full asymmetry 53 | PCT=0.1 # percent of labeled voxels to use 54 | PARZ=100 # PARZEN sigma 55 | LM=PSE[ ${FIX},${MOV},$FIXH,$MOVH,${LMWT},${PCT},${PARZ},0,25,100] 56 | 57 | INTENSITY=CC[ $FIX,${MOV},${INTWT},4] 58 | 59 | # == Important Parameters end? == 60 | 61 | ANTS $DIM -o $OUT -i $ITS -t SyN[ 0.25 ] -r Gauss[ 3,0 ] -m $INTENSITY -m $LM 62 | 63 | WarpImageMultiTransform $DIM $MOV ${OUT}toTemplate.nii.gz ${OUT}Warp.nii.gz ${OUT}Affine.txt -R $FIX 64 | 65 | WarpImageMultiTransform $DIM $FIX ${OUT}toMov.nii.gz -i ${OUT}Affine.txt ${OUT}InverseWarp.nii.gz -R $MOV 66 | 67 | WarpImageMultiTransform $DIM $FIXH ${OUT}hipp.nii.gz -i ${OUT}Affine.txt ${OUT}InverseWarp.nii.gz -R $MOV --UseNN 68 | 69 | -------------------------------------------------------------------------------- /Scripts/multi_template_script.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | ANTSPATH=$1 3 | if [ ${#ANTSPATH} -lt 3 ] ; then 4 | echo usage 5 | echo $0 PATH_TO_ANTS_BINARIES image_to_label.nii.gz 6 | exit 7 | fi 8 | if ! command -v ants.sh &> /dev/null 9 | then 10 | echo you need the file ants.sh - exiting 11 | exit 12 | fi 13 | 14 | Image_To_Be_Labeled=$2 15 | if [[ ! -s $Image_To_Be_Labeled ]] || [[ ${#Image_To_Be_Labeled} -lt 3 ]] ; then 16 | echo you need to pass an image you want to label as the 2nd argument 17 | echo " you tried to pass $Image_To_Be_Labeled with name length ${#Image_To_Be_Labeled} --- sure that's right? " 18 | exit 19 | fi 20 | 21 | LONGITERATIONS=30x50x30 22 | FASTITERATIONS=10x0x0 23 | ct=0 24 | LIST_OF_IMAGES=" image1.nii.gz image2.nii.gz " 25 | LIST_OF_LABELS=( image1_labels.nii.gz image2_labels.nii.gz ) 26 | LIST_OF_OUTPUT=( image1_output image2_output ) 27 | for labeled_img in $LIST_OF_IMAGES ; do 28 | sh ants.sh 3 $labeled_img $Image_To_Be_Labeled ${LIST_OF_OUTPUT[${ct}]} $FASTITERATIONS ${LIST_OF_LABELS[${ct}]} 29 | let ct=$ct+1 30 | done 31 | ls *labeled.nii.gz > labeled_list.txt 32 | ImageSetStatistics 3 labeled_list.txt new_subject_labels.nii.gz 1 33 | -------------------------------------------------------------------------------- /Scripts/newAntsExample.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | dim=3 # image dimensionality 4 | AP="" # /home/yourself/code/ANTS/bin/bin/ # path to ANTs binaries 5 | ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=2 # controls multi-threading 6 | export ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS 7 | f=$1 ; m=$2 # fixed and moving image file names 8 | mysetting=$3 9 | if [[ ! -s $f ]] ; then echo no fixed $f ; exit; fi 10 | if [[ ! -s $m ]] ; then echo no moving $m ;exit; fi 11 | if [[ ${#mysetting} -eq 0 ]] ; then 12 | echo usage is 13 | echo $0 fixed.nii.gz moving.nii.gz mysetting 14 | echo where mysetting is either forproduction or fastfortesting 15 | exit 16 | fi 17 | nm1=` basename $f | cut -d '.' -f 1 ` 18 | nm2=` basename $m | cut -d '.' -f 1 ` 19 | reg=${AP}antsRegistration # path to antsRegistration 20 | if [[ $mysetting == "fastfortesting" ]] ; then 21 | its=10000x0x0 22 | percentage=0.1 23 | syn="100x0x0,0,5" 24 | else 25 | its=10000x111110x11110 26 | percentage=0.3 27 | syn="100x100x50,-0.01,5" 28 | mysetting=forproduction 29 | fi 30 | echo affine $m $f outname is $nm am using setting $mysetting 31 | nm=${D}${nm1}_fixed_${nm2}_moving_setting_is_${mysetting} # construct output prefix 32 | $reg -d $dim -r [ $f, $m ,1 ] \ 33 | -m mattes[ $f, $m , 1 , 32, regular, $percentage ] \ 34 | -t translation[ 0.1 ] \ 35 | -c [ $its,1.e-8,20 ] \ 36 | -s 4x2x1vox \ 37 | -f 6x4x2 -l 1 \ 38 | -m mattes[ $f, $m , 1 , 32, regular, $percentage ] \ 39 | -t rigid[ 0.1 ] \ 40 | -c [ $its,1.e-8,20 ] \ 41 | -s 4x2x1vox \ 42 | -f 3x2x1 -l 1 \ 43 | -m mattes[ $f, $m , 1 , 32, regular, $percentage ] \ 44 | -t affine[ 0.1 ] \ 45 | -c [ $its,1.e-8,20 ] \ 46 | -s 4x2x1vox \ 47 | -f 3x2x1 -l 1 \ 48 | -m mattes[ $f, $m , 0.5 , 32 ] \ 49 | -m cc[ $f, $m , 0.5 , 4 ] \ 50 | -t SyN[ .20, 3, 0 ] \ 51 | -c [ $syn ] \ 52 | -s 1x0.5x0vox \ 53 | -f 4x2x1 -l 1 -u 1 -z 1 \ 54 | -o [ ${nm},${nm}_diff.nii.gz,${nm}_inv.nii.gz] 55 | 56 | ${AP}antsApplyTransforms -d $dim -i $m -r $f -n linear -t ${nm}1Warp.nii.gz -t ${nm}0GenericAffine.mat -o ${nm}_warped.nii.gz 57 | -------------------------------------------------------------------------------- /Scripts/optimalsmooth.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo " sh $0 outputprefix " 4 | if [ $# -lt 1 ] ; then 5 | exit 6 | fi 7 | 8 | SUB=$1 9 | TH=${SUB}thicknorm.nii.gz 10 | JA=${SUB}logjacobian.nii 11 | MK=${SUB}mask.nii.gz 12 | OUTT=${SUB}smooththick.nii.gz 13 | OUTJ=${SUB}smoothjac.nii.gz 14 | REPS=5 15 | SurfaceBasedSmoothing $TH 1.5 $MK $OUTT $REPS 16 | SurfaceBasedSmoothing $JA 1.5 $MK $OUTJ $REPS 17 | -------------------------------------------------------------------------------- /Scripts/phantomstudy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #initialization, here, is unbiased 4 | count=0 5 | for x in phantomAwmgm.jpg phantomBwmgm.jpg phantomCwmgm.jpg phantomDwmgm.jpg phantomEwmgm.jpg phantomFwmgm.jpg phantomGwmgm.jpg phantomHwmgm.jpg 6 | do 7 | count=`expr $count + 1` # Increment the counter 8 | echo " count is $count and file is $x " 9 | ANTS 2 -m PR[ phantomtemplate.jpg,$x,1,4 ] -i 20x161x161x161 -o TEST{$count} -t SyN[ 2 ] -r Gauss[ 3,0.] 10 | # 11 | # -t SyN[ 1,2,0.05 ] -r Gauss[ 3,0.25] 12 | WarpImageMultiTransform 2 $x TEST{$count}registered.nii TEST{$count}Warp.nii TEST{$count}Affine.txt 13 | done 14 | 15 | # to look at the stack of results, do this: 16 | 17 | StackSlices volo.hdr -1 -1 0 *$1 18 | StackSlices volr.hdr -1 -1 0 *registered.nii 19 | 20 | count=0 21 | for x in phantomAwmgm.jpg phantomBwmgm.jpg phantomCwmgm.jpg phantomDwmgm.jpg phantomEwmgm.jpg phantomFwmgm.jpg phantomGwmgm.jpg phantomHwmgm.jpg 22 | do 23 | count=`expr $count + 1` # Increment the counter 24 | echo " count is $count and file is $x " 25 | echo " CreateJacobianDeterminantImage 2 TEST{$count}Warp.nii TEST{$count}logjac.nii 1 " 26 | CreateJacobianDeterminantImage 2 TEST{$count}Warp.nii TEST{$count}logjac.nii 1 27 | # SmoothImage 2 TEST{$count}logjac.nii 1 TEST{$count}logjac.nii 28 | done 29 | 30 | 31 | ThresholdImage 2 phantomtemplate.jpg mask.nii 100 200 32 | # use the GLM with mask 33 | GLM 2 mask.nii designmat.txt contrast.txt Result.nii 1000 TEST*logjac.nii 34 | -------------------------------------------------------------------------------- /Scripts/registerimages.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use File::Basename; 3 | 4 | if ($#ARGV >= 0) { $who = join(' ', $ARGV[0]); } 5 | if ($#ARGV >= 1) { $template = join(' ', $ARGV[1]); } 6 | if ($#ARGV >= 2) { $params = join(' ', $ARGV[2]); } else { $params=0; } 7 | if ($#ARGV >= 3) { $outnaming = join(' ', $ARGV[3]); } else { $outnaming=0; } 8 | if ($#ARGV >= 4) { $metric= join(' ', $ARGV[4]); } else { $metric="PR[".$template; } 9 | if ($#ARGV >= 5) { $metricpar= join(' ', $ARGV[5]); } else { $metricpar=",1,4]"; } 10 | 11 | opendir(DIR, $who); 12 | @filelist = glob("$who"); 13 | # @filelist2 = glob("$who2"); 14 | $ct=100; 15 | print " Expecting Normalization params ".$params." \n \n \n doing \n $who \n "; 16 | $dir = `pwd`; 17 | $dir=substr($dir,0,length($dir)-1)."/"; 18 | $pathpre=""; 19 | $qsname="superfresh.sh"; 20 | foreach $name (@filelist) 21 | { 22 | $pre=$outnaming.$name; 23 | $pre=~s/\.[^.]*$//; 24 | print $pre." \n "; 25 | $prog=$params; 26 | $exe=$prog." -m ".$metric.",".$name.",".$metricpar." -o ".$pre." \n "; 27 | $exe2 = "/mnt/pkg/sge-root/bin/lx24-x86/qsub -q mac ".$qsname." ".$dir." ".$exe." "; 28 | print $exe."\n"; 29 | system $exe2; 30 | # USE qstat TO VERIFY THE JOB IS SUBMITTED 31 | $ct=$ct+1; 32 | } 33 | 34 | print " DONE WITH LOOP \n "; 35 | $user=`whoami`; 36 | chomp($user); 37 | print " you are ".$user." = surf-king "; 38 | $atcfn=0; 39 | 40 | if ($atcfn) { $waitcmd="vq -s | grep ".$user; } 41 | else { $waitcmd=" qstat -u ".$user." | grep ".substr($qsname,0,4); } 42 | $continuewaiting=1; 43 | if ($continuewaiting) { system "sleep 40"; } 44 | # Now Wait for the jobs to complete 45 | while($continuewaiting) 46 | { 47 | system $waitcmd; 48 | $output = `$waitcmd`; 49 | 50 | if ( $output eq "" ) 51 | { 52 | $continuewaiting=0; 53 | print "Jobs all finished!\n"; 54 | } 55 | else { print " wait ";system "sleep 30"; } 56 | } 57 | 58 | 59 | closedir(DIR); 60 | -------------------------------------------------------------------------------- /Scripts/runprogramonimageset.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | if ($#ARGV >= 0) { $who = join(' ', $ARGV[0]); } 3 | 4 | opendir(DIR, $who); 5 | @filelist = glob("$who"); 6 | # @filelist2 = glob("$who2"); 7 | $ct=0; 8 | 9 | $dir = `pwd`; 10 | $dir=substr($dir,0,length($dir)-1)."/"; 11 | 12 | $pathpre="/mnt/aibs1/avants/bin/ants/"; 13 | foreach $name (@filelist) 14 | { 15 | $exe = $pathpre."ANTS 3 -m PR[templatecontrol.nii,".$name.",1,2] -o ".$name." -t SyN[3] -r Gauss[2,0] -i 100x100x30 "; 16 | $exe2 = "/mnt/pkg/sge-root/bin/lx24-x86/qsub -q mac /mnt/data1/avants/Data/code/qsub3.sh ".$dir." ".$exe." "; 17 | print "$exe\n"; 18 | system $exe2; 19 | # USE qstat TO VERIFY THE JOB IS SUBMITTED 20 | $ct=$ct+1; 21 | } 22 | closedir(DIR); 23 | -------------------------------------------------------------------------------- /Scripts/skel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ $# -lt 3 ]] ; then 3 | echo read script before using 4 | echo $0 segmentationimage outputname thresholdlevel 5 | echo e.g. $0 seg.nii.gz gm 2 6 | exit 7 | fi 8 | TEM=$1 9 | nm=$2 10 | ThresholdImage 3 $TEM ${nm}_topo.nii.gz $3 $3 11 | ImageMath 3 ${nm}_topo.nii.gz MD ${nm}_topo.nii.gz 1 12 | ImageMath 3 ${nm}_topo.nii.gz ME ${nm}_topo.nii.gz 1 13 | ImageMath 3 ${nm}_topo.nii.gz Neg ${nm}_topo.nii.gz 14 | ImageMath 3 ${nm}_topod.nii.gz D ${nm}_topo.nii.gz 15 | ImageMath 3 ${nm}_topodl.nii.gz Laplacian ${nm}_topod.nii.gz 1.0 1 16 | ThresholdImage 3 ${nm}_topodl.nii.gz speed.nii.gz 0.0 0.25 17 | ImageMath 3 speed.nii.gz Neg speed.nii.gz 18 | ImageMath 3 ${nm}_topo.nii.gz GetLargestComponent ${nm}_topo.nii.gz 19 | ImageMath 3 ${nm}_topo_skel.nii.gz PropagateLabelsThroughMask speed.nii.gz ${nm}_topo.nii.gz 20000 1 20 | ImageMath 3 ${nm}_topo_skel.nii.gz Neg ${nm}_topo_skel.nii.gz 21 | ThresholdImage 3 ${nm}_topo_skel.nii.gz ${nm}_topo_skel.nii.gz 1 10000 22 | MultiplyImages 3 ${nm}_topo_skel.nii.gz $3 ${nm}_topo_skel.nii.gz 23 | -------------------------------------------------------------------------------- /Scripts/submitexperimentalbuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # request Bourne shell as shell for job 3 | 4 | ctest -D ExperimentalStart 5 | ctest -D ExperimentalUpdate 6 | ctest -D ExperimentalConfigure 7 | ctest -D ExperimentalBuild 8 | ctest -D ExperimentalSubmit 9 | ctest -D ExperimentalTest 10 | #ctest -D ExperimentalCoverage 11 | ctest -D ExperimentalSubmit 12 | #ctest -D ExperimentalMemCheck 13 | #ctest -D ExperimentalSubmit 14 | -------------------------------------------------------------------------------- /Scripts/sygnccavg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TNAME=$1 4 | GRADSTEP=$2 5 | shift 2 6 | 7 | FLIST2=$* 8 | 9 | ImageMath 2 $TNAME Normalize $TNAME 10 | for x in $(seq 1 5 ) ; do 11 | for y in $FLIST2 ; do 12 | ImageMath 2 turdx${y} Normalize $y 13 | ImageMath 2 turdx${y} CorrelationUpdate $TNAME turdx${y} 4 14 | # MeasureImageSimilarity 2 1 $y $TNAME 15 | SmoothImage 2 turdx${y} 0.5 turdx${y} 16 | # MeasureMinMaxMean 2 turdx$y 17 | done 18 | 19 | AverageImages 2 turdu.nii.gz 0 turdx** 20 | MultiplyImages 2 turdu.nii.gz $GRADSTEP turdu.nii.gz 21 | ImageMath 2 $TNAME + $TNAME turdu.nii.gz 22 | done 23 | -------------------------------------------------------------------------------- /Scripts/thickstudy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | count=0 4 | for x in phantomA phantomB phantomC phantomD phantomE phantomF phantomG phantomH 5 | do 6 | count=`expr $count + 1` # Increment the counter 7 | echo " $x " 8 | echo " LaplacianThickness ${x}wm.hdr ${x}gm.hdr 15 TEST{$count}thick.hdr 1 0.5 " 9 | ThresholdImage 2 ${x}wmgm.jpg ${x}wm.nii 245 290 10 | ThresholdImage 2 ${x}wmgm.jpg ${x}gm.nii 111 133 11 | LaplacianThickness ${x}wm.nii ${x}gm.nii 15 TEST{$count}thick.hdr 5 3 12 | WarpImageMultiTransform 2 TEST{$count}thick.hdr TEST{$count}thickreg.hdr TEST{$count}Warp.nii TEST{$count}Affine.txt 13 | # SmoothImage 2 TEST{$count}thickreg.hdr 1 TEST{$count}thickreg.hdr 14 | done 15 | 16 | StudentsTestOnImages 2 THICK2.hdr 4 4 17 | 18 | 19 | ~/Code/bin/ants/GLM 2 mask.nii designmat.txt contrastvec.txt temp.hdr 1000 TEST{1}thickreg.hdr TEST{2}thickreg.hdr TEST{3}thickreg.hdr TEST{4}thickreg.hdr TEST{5}thickreg.hdr TEST{6}thickreg.hdr TEST{7}thickreg.hdr TEST{8}thickreg.hdr 20 | 21 | MultiplyImages 2 THICK2.hdr phantomtemplate.jpg THICK2.hdr 22 | -------------------------------------------------------------------------------- /Scripts/unbiased_longitudinal_map: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # an example of unbiased longitudinal registration performed with ANTs. 4 | # 5 | DIM=2 # set the image dimensionality 6 | # 7 | # the images below are available in ANTS/Examples/Data/ 8 | # you should link them to a local directory and then run this script from that directory. 9 | # 10 | REFSPACE=B2.tiff 11 | I=B3.tiff 12 | J=B4.tiff 13 | K=B5.tiff 14 | AFFITS=" --number-of-affine-iterations 10000x10000x10000x10000 " 15 | ANTS $DIM -m MI[$REFSPACE,$I,1,16] -o I_init -i 0 $AFFITS 16 | WarpImageMultiTransform $DIM $I temp.nii.gz -R $REFSPACE I_initAffine.txt 17 | ANTS $DIM -m MI[temp.nii.gz,$J,1,16] -o J_init -i 0 $AFFITS 18 | TRAN=" -i 100x100 -t SyN[0.1] " 19 | TRAN=" -i 100x100x1000 -t SyN[0.1] " 20 | # this will initialize the registration with the affine maps computed above 21 | # gaussian 22 | # ANTS $DIM -m CC[$I,$J,1,4] -o J_to_I_diff $TRAN -r Gauss[3,0] $AFFITS -F I_initAffine.txt -a J_initAffine.txt 23 | # dmffd 24 | ANTS $DIM -m CC[$I,$J,1,4] -o J_to_I_diff $TRAN -r DMFFD[10x10x10,0,3] $AFFITS --fixed-image-initial-affine $REFSPACE -F I_initAffine.txt -a J_initAffine.txt --fixed-image-initial-affine $REFSPACE 25 | # now warp J to I just to check correctness 26 | WarpImageMultiTransform $DIM $J J_to_I.nii.gz -R $I -i I_initAffine.txt J_to_I_diffWarp.nii.gz J_initAffine.txt 27 | # 28 | # note that the reference space is also the space where the warp is computed. 29 | # if you want to analyze the mapping in another space, then you would have to warp it there. e.g. 30 | # this will deform the map to the space of I. 31 | WarpImageMultiTransform $DIM J_to_I_diffWarp.nii.gz J_to_I_diffWarp_in_I_space.nii.gz -R $I -i I_initAffine.txt 32 | # 33 | # cleanup 34 | rm temp.nii.gz 35 | -------------------------------------------------------------------------------- /Scripts/warpimages.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | if ($#ARGV >= 0) { $who = join(' ', $ARGV[0]); } 3 | if ($#ARGV >= 1) { $template = join(' ', $ARGV[1]); } 4 | if ($#ARGV >= 2) { $dim = join(' ', $ARGV[2]); } else { $dim=0; } 5 | if ($#ARGV >= 3) { $outnaming = join(' ', $ARGV[3]); } else { $outnaming=""; } 6 | opendir(DIR, $who); 7 | @filelist = glob("$who"); 8 | # @filelist2 = glob("$who2"); 9 | $ct=0; 10 | print " EXPECTING IMAGE DIMENSION ".$dim." \n \n \n "; 11 | 12 | $dir = `pwd`; 13 | $dir=substr($dir,0,length($dir)-1)."/"; 14 | $pathpre="/mnt/aibs1/avants/bin/ants/"; 15 | 16 | $qsname="superfresh.sh"; 17 | 18 | foreach $name (@filelist) 19 | { 20 | $pre=$outnaming.$name; 21 | $pre=~s/\.[^.]*$//; 22 | print $pre." \n "; 23 | $prog=$pathpre."WarpImageMultiTransform ".$dim; 24 | $exe=$prog." ".$name." ".$pre."deformed.nii ".$pre."Warp.nii ".$pre."Affine.txt -R ".$template; 25 | $exe2 = "/mnt/pkg/sge-root/bin/lx24-x86/qsub -q mac ".$qsname." ".$dir." ".$exe." "; 26 | print $exe."\n"; 27 | system $exe2; 28 | # USE qstat TO VERIFY THE JOB IS SUBMITTED 29 | $ct=$ct+1; 30 | } 31 | 32 | 33 | 34 | $user=`whoami`; 35 | chomp($user); 36 | print " you are ".$user." = a jingle-jangle-jungle "; 37 | $atcfn=0; 38 | if ($atcfn) { $waitcmd="vq -s | grep ".$user; } 39 | else { $waitcmd=" qstat -u ".$user." | grep ".substr($qsname,0,4); } 40 | $continuewaiting=1; 41 | if ($continuewaiting) { system "sleep 40"; } 42 | while($continuewaiting) 43 | { 44 | system $waitcmd; 45 | $output = `$waitcmd`; 46 | 47 | if ( $output eq "" ) 48 | { 49 | $continuewaiting=0; 50 | print "Jobs all finished!\n"; 51 | } 52 | else { print " wait ";system "sleep 30"; } 53 | } 54 | 55 | closedir(DIR); 56 | -------------------------------------------------------------------------------- /Scripts/weightedaverage.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | if ($#ARGV >= 0) { $who = join(' ', $ARGV[0]); } 3 | if ($#ARGV >= 1) { $imagedimension = join(' ', $ARGV[1]); } 4 | if ($#ARGV >= 2) { $outputname = join(' ', $ARGV[2]); } 5 | if ($#ARGV < 2) { 6 | print " usage: \n perl weightedaverage.pl *files.jpg imagedimension weight1 ... weightN \n "; 7 | exit(1); 8 | } 9 | 10 | opendir(DIR, $who); 11 | @filelist = glob("$who"); 12 | $basect=3; 13 | $ct=$basect; 14 | 15 | $dir = `pwd`; 16 | $dir=substr($dir,0,length($dir)-1)."/"; 17 | 18 | foreach $name (@filelist) 19 | { 20 | $weight=0; 21 | if ($#ARGV >= $ct) { $weight = join(' ', $ARGV[$ct]); } 22 | print " count ".$ct." & w= ".$weight." \n "; 23 | $tempname=" temp.nii "; 24 | $exe = " ImageMath ".$imagedimension." ".$tempname." m ".$name." ".$weight." \n "; 25 | system $exe; 26 | $exe = " ImageMath ".$imagedimension." ".$outputname." + ".$tempname." ".$outputname." \n "; 27 | if ($ct > $basect ) { system $exe; } 28 | else { 29 | $exe=" ImageMath ".$imagedimension." ".$outputname." m ".$name." ".$weight." \n "; 30 | print " YEE \n"; 31 | system $exe; 32 | } 33 | $ct=$ct+1; 34 | } 35 | closedir(DIR); 36 | -------------------------------------------------------------------------------- /Scripts/weightedaverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Usage: \n sh weightedaverage.sh \"Faces*tiff\" \n " 4 | 5 | count=9 6 | for x in `ls -tr $1 ` 7 | do 8 | count=`expr $count + 1` # Increment the counter 9 | echo " count is $count and file is $x at it $i " 10 | ANTS 2 -m PR[ template.nii,$x,1,8,-0.9 ] -t SyN[ 3 ] -r Gauss[ 3,1.5 ] -o ROBU{$count} -i 22x21x10 --MI-option 16x8000 #-a InitAffine.txt --continue-affine 0 11 | WarpImageMultiTransform 2 $x ROBU{$count}{$i}registered.nii ROBU{$count}Warp.nii ROBU{$count}Affine.txt 12 | ComposeMultiTransform 2 ROBU{$count}Warp.nii -R template.nii ROBU{$count}Warp.nii ROBU{$count}Affine.txt 13 | ComposeMaps 2 ROBU{$count}Warp.nii ROBU{$count}Affine.txt ROBU{$count}Warp.nii 2 14 | ConvertToJpg ROBU{$count}{$i}registered.nii ROBU{$count}{$i}registered.jpg 15 | MeasureImageSimilarity 2 2 template.nii ROBU{$count}{$i}registered.nii metriclog.txt 16 | done 17 | 18 | # end loop 19 | -------------------------------------------------------------------------------- /SuperBuild/External_VTK_build_step.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | if(UNIX) 3 | 4 | if(APPLE) 5 | set(ENV{DYLD_LIBRARY_PATH} "@CMAKE_CURRENT_BINARY_DIR@/python-build/lib") 6 | else() 7 | set(ENV{LD_LIBRARY_PATH} "@CMAKE_CURRENT_BINARY_DIR@/python-build/lib") 8 | endif() 9 | 10 | execute_process( 11 | COMMAND $(MAKE) 12 | WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/@proj@-build" 13 | ) 14 | 15 | endif() 16 | -------------------------------------------------------------------------------- /SuperBuild/External_VTK_patch.cmake: -------------------------------------------------------------------------------- 1 | set(vtkDetCFLAGS 2 | ${VTKSource}/CMake/vtkDetermineCompilerFlags.cmake) 3 | 4 | file(READ ${vtkDetCFLAGS} 5 | code) 6 | 7 | string(REPLACE 8 | "set(VTK_REQUIRED_C_FLAGS \"\${VTK_REQUIRED_C_FLAGS} -mlong-branch\")" 9 | "" 10 | code "${code}") 11 | string(REPLACE 12 | "set(VTK_REQUIRED_CXX_FLAGS \"\${VTK_REQUIRED_CXX_FLAGS} -mlong-branch\")" 13 | "" 14 | code "${code}") 15 | 16 | file(WRITE ${vtkDetCFLAGS} 17 | "${code}" 18 | ) 19 | 20 | set(ftglCMakeLists_txt ${VTKSource}/Utilities/ftgl/CMakeLists.txt) 21 | file(READ ${ftglCMakeLists_txt} 22 | code) 23 | string(REPLACE " -fpascal-strings" "" code "${code}") 24 | 25 | file(WRITE ${ftglCMakeLists_txt} "${code}") 26 | 27 | find_file(vtkVRMLImporter vtkVRMLImporter.cxx 28 | HINTS ${VTKSource}/Hybrid ${VTKSource}/IO/IMPORT 29 | ) 30 | 31 | file(READ ${vtkVRMLImporter} 32 | code) 33 | 34 | string(REPLACE 35 | "#ifdef __GNUC__ 36 | #undef alloca 37 | #define alloca __builtin_alloca 38 | " 39 | "#ifdef __GNUC__ 40 | #ifndef __clang__ 41 | #undef alloca 42 | #define alloca __builtin_alloca 43 | #endif 44 | " 45 | code "${code}") 46 | 47 | file(WRITE ${vtkVRMLImporter} 48 | "${code}" 49 | ) 50 | -------------------------------------------------------------------------------- /Temporary/deprecate_itkFEMElement3DC0LinearTriangularLaplaceBeltrami.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Insight Segmentation & Registration Toolkit 4 | 5 | Copyright (c) Insight Software Consortium. All rights reserved. 6 | See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 7 | 8 | This software is distributed WITHOUT ANY WARRANTY; without even 9 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 10 | PURPOSE. See the above copyright notices for more information. 11 | 12 | =========================================================================*/ 13 | 14 | #ifndef __itkFEMElement3DC0LinearTriangularLaplaceBeltrami_h 15 | #define __itkFEMElement3DC0LinearTriangularLaplaceBeltrami_h 16 | 17 | #include "itkFEMElement3DC0LinearTriangular.h" 18 | #include "itkFEMElement3DMembrane.h" 19 | #include "itkFEMElement3DMembrane1DOF.h" 20 | 21 | namespace itk 22 | { 23 | namespace fem 24 | { 25 | /** 26 | * \class Element3DC0LinearTriangularLaplaceBeltrami 27 | * \brief 3-noded finite element class in 3D space for surface LaplaceBeltrami problem. 28 | * 29 | * This element is combined from Element3DC0LinearTriangular and Element3DLaplaceBeltrami. 30 | */ 31 | class Element3DC0LinearTriangularLaplaceBeltrami : public Element3DMembrane1DOF 32 | { 33 | FEM_CLASS(Element3DC0LinearTriangularLaplaceBeltrami, Element3DMembrane1DOF) 34 | public: 35 | HANDLE_ELEMENT_LOADS(); 36 | 37 | /** 38 | * Default constructor only clears the internal storage 39 | */ 40 | Element3DC0LinearTriangularLaplaceBeltrami(); 41 | 42 | /** 43 | * Construct an element by specifying pointers to 44 | * 3 points and a material. 45 | */ 46 | Element3DC0LinearTriangularLaplaceBeltrami(NodeIDType n1_, NodeIDType n2_, NodeIDType n3_, Material::ConstPointer p_); 47 | 48 | virtual unsigned int 49 | GetNumberOfDegreesOfFreedomPerNode(void) const 50 | { 51 | return 1; 52 | } 53 | 54 | virtual void 55 | GetStiffnessMatrix(MatrixType & Ke) const; 56 | 57 | // void Read( std::istream&, void* info ); 58 | }; // class Element3DC0LinearTriangularLaplaceBeltrami 59 | 60 | FEM_CLASS_INIT(Element3DC0LinearTriangularLaplaceBeltrami) 61 | } // namespace fem 62 | } // namespace itk 63 | 64 | #endif // #ifndef __itkFEMElement3DC0LinearTriangularLaplaceBeltrami_h 65 | -------------------------------------------------------------------------------- /Temporary/deprecate_itkFEMElement3DC0LinearTriangularMembrane.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Insight Segmentation & Registration Toolkit 4 | 5 | Copyright (c) Insight Software Consortium. All rights reserved. 6 | See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 7 | 8 | This software is distributed WITHOUT ANY WARRANTY; without even 9 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 10 | PURPOSE. See the above copyright notices for more information. 11 | 12 | =========================================================================*/ 13 | 14 | #ifndef __itkFEMElement3DC0LinearTriangularMembrane_h 15 | #define __itkFEMElement3DC0LinearTriangularMembrane_h 16 | 17 | #include "itkFEMElement3DC0LinearTriangular.h" 18 | #include "itkFEMElement3DMembrane.h" 19 | #include "itkFEMElement3DMembrane1DOF.h" 20 | 21 | namespace itk 22 | { 23 | namespace fem 24 | { 25 | /** 26 | * \class Element3DC0LinearTriangularMembrane 27 | * \brief 3-noded finite element class in 3D space for surface membrane problem. 28 | * 29 | * This element is combined from Element3DC0LinearTriangular and Element3DMembrane. 30 | */ 31 | class Element3DC0LinearTriangularMembrane : public Element3DMembrane 32 | { 33 | FEM_CLASS(Element3DC0LinearTriangularMembrane, Element3DMembrane) 34 | public: 35 | HANDLE_ELEMENT_LOADS(); 36 | 37 | /** 38 | * Default constructor only clears the internal storage 39 | */ 40 | Element3DC0LinearTriangularMembrane(); 41 | 42 | /** 43 | * Construct an element by specifying pointers to 44 | * 3 points and a material. 45 | */ 46 | Element3DC0LinearTriangularMembrane(NodeIDType n1_, NodeIDType n2_, NodeIDType n3_, Material::ConstPointer p_); 47 | 48 | // virtual unsigned int GetNumberOfDegreesOfFreedomPerNode( void ) const 49 | // { return 1; } 50 | 51 | // virtual void GetStiffnessMatrix( MatrixType& Ke ) const; 52 | 53 | // void Read( std::istream&, void* info ); 54 | }; // class Element3DC0LinearTriangularMembrane 55 | 56 | FEM_CLASS_INIT(Element3DC0LinearTriangularMembrane) 57 | } // namespace fem 58 | } // namespace itk 59 | 60 | #endif // #ifndef __itkFEMElement3DC0LinearTriangularMembrane_h 61 | -------------------------------------------------------------------------------- /Tensor/itkExpTensorImageFilter.hxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Advanced Normalization Tools 4 | 5 | Copyright (c) ConsortiumOfANTS. All rights reserved. 6 | See accompanying COPYING.txt or 7 | https://github.com/stnava/ANTs/blob/master/ANTSCopyright.txt for details. 8 | 9 | This software is distributed WITHOUT ANY WARRANTY; without even 10 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 11 | PURPOSE. See the above copyright notices for more information. 12 | 13 | =========================================================================*/ 14 | #ifndef _itkExpTensorImageFilter_hxx 15 | #define _itkExpTensorImageFilter_hxx 16 | 17 | #include "itkConstNeighborhoodIterator.h" 18 | #include "itkNeighborhoodInnerProduct.h" 19 | #include "itkImageRegionIterator.h" 20 | #include "itkImageRegionConstIterator.h" 21 | #include "itkOffset.h" 22 | #include "itkProgressReporter.h" 23 | #include "itkObjectFactory.h" 24 | #include "vnl/vnl_matrix.h" 25 | #include "vnl/algo/vnl_symmetric_eigensystem.h" 26 | #include "TensorFunctions.h" 27 | 28 | namespace itk 29 | { 30 | template 31 | ExpTensorImageFilter::ExpTensorImageFilter() = default; 32 | 33 | template 34 | void 35 | ExpTensorImageFilter::GenerateData() 36 | { 37 | InputImagePointer input = this->GetInput(); 38 | OutputImagePointer output = this->GetOutput(); 39 | 40 | ImageRegionConstIterator inputIt(input, input->GetLargestPossibleRegion()); 41 | 42 | output->SetRegions(input->GetLargestPossibleRegion()); 43 | output->AllocateInitialized(); 44 | 45 | ImageRegionIterator outputIt(output, output->GetLargestPossibleRegion()); 46 | for (inputIt.GoToBegin(), outputIt.GoToBegin(); !inputIt.IsAtEnd() && !outputIt.IsAtEnd(); ++inputIt, ++outputIt) 47 | { 48 | bool success; // TODO -- actually check the result? 49 | InputPixelType result = TensorLogAndExp(inputIt.Value(), false, success); 50 | outputIt.Set(result); 51 | } 52 | } 53 | 54 | /** 55 | * Standard "PrintSelf" method 56 | */ 57 | template 58 | void 59 | ExpTensorImageFilter::PrintSelf(std::ostream & os, Indent indent) const 60 | { 61 | Superclass::PrintSelf(os, indent); 62 | } 63 | } // end namespace itk 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /Tensor/itkLogTensorImageFilter.hxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Advanced Normalization Tools 4 | 5 | Copyright (c) ConsortiumOfANTS. All rights reserved. 6 | See accompanying COPYING.txt or 7 | https://github.com/stnava/ANTs/blob/master/ANTSCopyright.txt for details. 8 | 9 | This software is distributed WITHOUT ANY WARRANTY; without even 10 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 11 | PURPOSE. See the above copyright notices for more information. 12 | 13 | =========================================================================*/ 14 | #ifndef _itkLogTensorImageFilter_hxx 15 | #define _itkLogTensorImageFilter_hxx 16 | 17 | #include "itkConstNeighborhoodIterator.h" 18 | #include "itkNeighborhoodInnerProduct.h" 19 | #include "itkImageRegionIteratorWithIndex.h" 20 | #include "itkImageRegionConstIterator.h" 21 | #include "itkOffset.h" 22 | #include "itkProgressReporter.h" 23 | #include "itkObjectFactory.h" 24 | #include "vnl/vnl_matrix.h" 25 | #include "vnl/algo/vnl_symmetric_eigensystem.h" 26 | #include "TensorFunctions.h" 27 | 28 | namespace itk 29 | { 30 | template 31 | LogTensorImageFilter::LogTensorImageFilter() = default; 32 | 33 | template 34 | void 35 | LogTensorImageFilter::GenerateData() 36 | { 37 | InputImagePointer input = this->GetInput(); 38 | OutputImagePointer output = this->GetOutput(); 39 | 40 | ImageRegionConstIterator inputIt(input, input->GetLargestPossibleRegion()); 41 | 42 | output->SetRegions(input->GetLargestPossibleRegion()); 43 | output->AllocateInitialized(); 44 | 45 | ImageRegionIteratorWithIndex outputIt(output, output->GetLargestPossibleRegion()); 46 | for (inputIt.GoToBegin(), outputIt.GoToBegin(); !inputIt.IsAtEnd() && !outputIt.IsAtEnd(); ++inputIt, ++outputIt) 47 | { 48 | InputPixelType result = TensorLog(inputIt.Value()); 49 | outputIt.Set(result); 50 | } 51 | } 52 | 53 | /** 54 | * Standard "PrintSelf" method 55 | */ 56 | template 57 | void 58 | LogTensorImageFilter::PrintSelf(std::ostream & os, Indent indent) const 59 | { 60 | Superclass::PrintSelf(os, indent); 61 | } 62 | } // end namespace itk 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /TestData/ANON0006_20_T1_dbg_splayed.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 097f960dc33670568c139c1d19c5f07c31e252a850de7b37460dfdd48ab1363a5b648842cb56bdbbb04211589f67022560eebda9c85ccdc86a6cd085b9e53f0a 2 | -------------------------------------------------------------------------------- /TestData/ANON0006_20_T1_sag_twisted.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 12c570928b94c9b480ee809d281c073c6402e6d4b222ca91e648fff001c20ca543f26a93b2da2a9057d75dc6e2b04e22f65528db4b3a225c6e55ab372b6f8a8a 2 | -------------------------------------------------------------------------------- /TestData/CompositeTransformUtilTest.result.h5.sha512: -------------------------------------------------------------------------------- 1 | 97c0f6cf99602d29a0c5070f61b8fa3348f492b6f04bf4b60eea34f369e6b19b8f9405c783df27d4e5bc1d0071081a4ea93f6725caa61bddaee1e1e9723b13d8 2 | -------------------------------------------------------------------------------- /TestData/CompositeTransformUtilTest_AffineTransform.mat.sha512: -------------------------------------------------------------------------------- 1 | 33b868a72ef3b3ae416582b0572bf519e19e2a1afd8c0fc475db06fe2c34a83d35b9008d938e4141cebc60b781442fc71de1563b6e11f8c93c5d5db8fb3e612d 2 | -------------------------------------------------------------------------------- /TestData/CompositeTransformUtilTest_RigidTransform.mat.sha512: -------------------------------------------------------------------------------- 1 | e847817e32a08f5efbdf038a2cba7c17c39906d14fc2ced53736f47dda8c2f94df8c9611875924bd4e6055678ff490f44719ae013d76626f1bbe5e208eb48123 2 | -------------------------------------------------------------------------------- /TestData/CompositeTransformUtilTest_SyNTransform.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 969736df0271840d8f1dac90ce871b670de95215a673d5e64cf4c37eeffd71fd631059a5354ef263afb94335b989fa94aa2701c783509d392d0cc262ea1adfcc 2 | -------------------------------------------------------------------------------- /TestData/Data/B1.tiff.md5: -------------------------------------------------------------------------------- 1 | d50be7f1c451bf832c534206842b2d37 -------------------------------------------------------------------------------- /TestData/Data/B2.tiff.md5: -------------------------------------------------------------------------------- 1 | 08ee0426072d1444706889ba66988cf1 -------------------------------------------------------------------------------- /TestData/Data/B3.tiff.md5: -------------------------------------------------------------------------------- 1 | 20f1223c0010b9e4c346cfee9190acb4 -------------------------------------------------------------------------------- /TestData/Data/B4.tiff.md5: -------------------------------------------------------------------------------- 1 | f37cb48710987c33a4aee3ed8abaad57 -------------------------------------------------------------------------------- /TestData/Data/B5.tiff.md5: -------------------------------------------------------------------------------- 1 | d0c7e80f3a88639c6af4a2e749f4cda4 -------------------------------------------------------------------------------- /TestData/Data/Frown.nii.sha512: -------------------------------------------------------------------------------- 1 | d5bcdd4c68e840c7d7bcac32e68ae7a20d2896ecb78f7d3dc2512707d88092b154a81aeb62392460fbd487f60248680a5c4777e7efe430a8b6fdcdd823f222af 2 | -------------------------------------------------------------------------------- /TestData/Data/Frown.txt.sha512: -------------------------------------------------------------------------------- 1 | 20942c444831f9dd71d41809acf0eac6fb351bda9a6e2d6826a645121b09d781a7feacdcd5edf4b7e9708f9e5de380bdfdfcb9f7c4b25fa1a03d506d817c3e1d 2 | -------------------------------------------------------------------------------- /TestData/Data/Frown.vtk.sha512: -------------------------------------------------------------------------------- 1 | 6a5395aa5619d69802304998dde7d9b44d4e768725cb0bfd3cca20666a22d51c9879558d1767564f66de82c87c3b80df5e04338e84ee1299ff2876254fd1904f 2 | -------------------------------------------------------------------------------- /TestData/Data/README.md5: -------------------------------------------------------------------------------- 1 | c753ce2a74481486c37d101ba224b2fb -------------------------------------------------------------------------------- /TestData/Data/Smile.nii.sha512: -------------------------------------------------------------------------------- 1 | a764b6b2e4d1b07c6ad0794973a45ed4967c86ce6dd84471000712be0bd9a5a0a405740e4af28b9909060b00ebe66a343e34d38affa719b54ac7c0180e9babd3 2 | -------------------------------------------------------------------------------- /TestData/Data/Smile.txt.sha512: -------------------------------------------------------------------------------- 1 | 0f6c76fb3222490b283500bb19d9fddb63a5670af660c25a6ecb181d2bde7036c5781898ad64b93f4918004adbdf62063e4bac79462cdb708acf34331c205e03 2 | -------------------------------------------------------------------------------- /TestData/Data/Smile.vtk.sha512: -------------------------------------------------------------------------------- 1 | 4ca0ce32b28329ab42c0f7ef1816dc8e54978ac60573b14b75a53a93a6af42995aadd4451ddfd19fa0ab707feff1388a86fa675c558ace1906a1ff867b15281f 2 | -------------------------------------------------------------------------------- /TestData/Data/beetlerot.jpg.md5: -------------------------------------------------------------------------------- 1 | 5335f839229b48e82db8861f8ea552e8 -------------------------------------------------------------------------------- /TestData/Data/c.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | fdb18bdc8f097c6d7b649a4cc09a0344b3e9e34cb2ab0fecfa85ad6623493b345a6a05ebe4307034fdbaa13d2a54895ff422ea39624e5211e58dc9fb571f5405 2 | -------------------------------------------------------------------------------- /TestData/Data/ch2brainmask.nii.gz.md5: -------------------------------------------------------------------------------- 1 | a396d2381eb357181ab0038f0559d9db -------------------------------------------------------------------------------- /TestData/Data/chalf.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 58877e3bd2bab703e539a1f22b8964f5982765bb9dd609fc0e1ec6f3503b94d4aa338cf9970c0d1bde1f3b87ea14f98e625ed0e0919b157584370c872665a8c3 2 | -------------------------------------------------------------------------------- /TestData/Data/ford.jpg.md5: -------------------------------------------------------------------------------- 1 | f5c08ab5a885182cae48ace65f1bd91f -------------------------------------------------------------------------------- /TestData/Data/functional.nii.md5: -------------------------------------------------------------------------------- 1 | 941066d9b635e8c272e647abd6a00f9b -------------------------------------------------------------------------------- /TestData/Data/listPriorWolk_nirepDemo.txt.md5: -------------------------------------------------------------------------------- 1 | 99f91c8c0b957cd5a678c7385f258e74 -------------------------------------------------------------------------------- /TestData/Data/mov2.nii.gz.md5: -------------------------------------------------------------------------------- 1 | 16d7b1385c3fcad2c0fe45c53123e8a3 -------------------------------------------------------------------------------- /TestData/Data/myview1.csv.md5: -------------------------------------------------------------------------------- 1 | c9449fdf994ee8b813386fe49bcd0059 -------------------------------------------------------------------------------- /TestData/Data/myview2.csv.md5: -------------------------------------------------------------------------------- 1 | 46fbac6191b33e297871c364c709711c -------------------------------------------------------------------------------- /TestData/Data/myview3.csv.md5: -------------------------------------------------------------------------------- 1 | b90fd8bff771a67013717fbc549326a0 -------------------------------------------------------------------------------- /TestData/Data/myview4.csv.md5: -------------------------------------------------------------------------------- 1 | 8c4ea9d008a044c0b145125a455fa42a -------------------------------------------------------------------------------- /TestData/Data/myview_mismatch.csv.md5: -------------------------------------------------------------------------------- 1 | 68c7bda70524918d509c9edf6a0ec203 -------------------------------------------------------------------------------- /TestData/Data/phantomAwmgm.jpg.md5: -------------------------------------------------------------------------------- 1 | a1c5447d6937909e7d853e113a6073fc -------------------------------------------------------------------------------- /TestData/Data/phantomBwmgm.jpg.md5: -------------------------------------------------------------------------------- 1 | dc52ba5f395cd1b1612148da844d78ed -------------------------------------------------------------------------------- /TestData/Data/phantomCwmgm.jpg.md5: -------------------------------------------------------------------------------- 1 | ae8ed778e46b39d350108a86cba5301d -------------------------------------------------------------------------------- /TestData/Data/phantomDwmgm.jpg.md5: -------------------------------------------------------------------------------- 1 | 0094881420d3f4fa2be08e5dad4e98ef -------------------------------------------------------------------------------- /TestData/Data/phantomEwmgm.jpg.md5: -------------------------------------------------------------------------------- 1 | 035e70ac7a4ffc010d319c7ea8879567 -------------------------------------------------------------------------------- /TestData/Data/phantomFwmgm.jpg.md5: -------------------------------------------------------------------------------- 1 | c8e0f1fc42799b1394770036cccb562c -------------------------------------------------------------------------------- /TestData/Data/phantomGwmgm.jpg.md5: -------------------------------------------------------------------------------- 1 | 6c9016956c8296b32a4dbc3eb6ff8c1a -------------------------------------------------------------------------------- /TestData/Data/phantomHwmgm.jpg.md5: -------------------------------------------------------------------------------- 1 | de88309aac182bfe0abaf869eb59ed81 -------------------------------------------------------------------------------- /TestData/Data/phantomtemplate.jpg.md5: -------------------------------------------------------------------------------- 1 | 179dc1c16d96548564f35f1132efce22 -------------------------------------------------------------------------------- /TestData/Data/priorScaleListWolk_nirep0p1Demo.csv.md5: -------------------------------------------------------------------------------- 1 | 1261fc7c8ba9fae6046cf18d8f9a2f49 -------------------------------------------------------------------------------- /TestData/Data/r16mask.nii.gz.md5: -------------------------------------------------------------------------------- 1 | acdbe32b199591bca333add30cf7b547 -------------------------------------------------------------------------------- /TestData/Data/r16priors.nii.gz.md5: -------------------------------------------------------------------------------- 1 | 03dd793ed073bbe0c8b19cc5f4033d2a -------------------------------------------------------------------------------- /TestData/Data/r16roth.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 9b8a059e0cb75fb2318cd29141eea8b27cd9f0cd676bb38d12dc3385ae63c82aa89a11e8199bca41d2b7753c85e60eea8274185aabd047d71d106755b7934a60 2 | -------------------------------------------------------------------------------- /TestData/Data/r16slice.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 9b3caa5afdc591763df439c37edfaaf0cb30d98ba82d8ddbc6e434f7379b0b21ca4afbc31d25e5b36fef9551abb36af3d2252fecf0ad984263f1ffda25e955ca 2 | -------------------------------------------------------------------------------- /TestData/Data/r27slice.nii.gz.md5: -------------------------------------------------------------------------------- 1 | 8228d2a1fa139a1eb8804ceaddcdcff3 -------------------------------------------------------------------------------- /TestData/Data/r30slice.nii.gz.md5: -------------------------------------------------------------------------------- 1 | 090a1086e91222800f1e9aa4105b2c0f -------------------------------------------------------------------------------- /TestData/Data/r62slice.nii.gz.md5: -------------------------------------------------------------------------------- 1 | fa1c95f06e2ce7642f6967eb4fa0b80d -------------------------------------------------------------------------------- /TestData/Data/r64roth.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 2943de03b0bcce9b0c5e9c8003cb0959b9bb849cc0598d27a2079f30e6d0f204a09583884233529d066c41cbfb6ec5340e0fb27eb646e828d9bcf737d8138587 2 | -------------------------------------------------------------------------------- /TestData/Data/r64slice.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | ff97abe94ded1df66d6de40713470f58730d939ef8b1112a86e69aedbbaf4fbb1ccf9a129e3b70d25093c2c241676e11714a9e2cfb9a071708dc5cd838058ba0 2 | -------------------------------------------------------------------------------- /TestData/Data/r85slice.nii.gz.md5: -------------------------------------------------------------------------------- 1 | 602bdf5fc198a86712157dee7fa17027 -------------------------------------------------------------------------------- /TestData/Data/ref2.nii.gz.md5: -------------------------------------------------------------------------------- 1 | 1e3d598f7af2d226512a5004c664915e -------------------------------------------------------------------------------- /TestData/Data/test_DiReCT.sh.md5: -------------------------------------------------------------------------------- 1 | 65caa9274f60b238365d0a675f9204cf -------------------------------------------------------------------------------- /TestData/Data/test_image_ground_truth.nii.gz.md5: -------------------------------------------------------------------------------- 1 | 4d4650e16da2a1b5be7f78b1f9e32dfb -------------------------------------------------------------------------------- /TestData/Data/test_image_seg.nii.gz.md5: -------------------------------------------------------------------------------- 1 | b92477360d95deb585590bc65c44d80f -------------------------------------------------------------------------------- /TestData/Data/wolk_dataMCINormalDemo.mhd.md5: -------------------------------------------------------------------------------- 1 | 8e5337c9077993f2a248bcc41a58c202 -------------------------------------------------------------------------------- /TestData/Data/wolk_dataMCINormalDemo.raw.md5: -------------------------------------------------------------------------------- 1 | 13d6e66ea47619ca43235086c343fc4a -------------------------------------------------------------------------------- /TestData/Data/wolk_mask.nii.gz.md5: -------------------------------------------------------------------------------- 1 | 8556f22c41488ae6da0e7a2de0f9d828 -------------------------------------------------------------------------------- /TestData/Initializer_0.05_antsRegistrationTest_AffineRotationMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | 1f222d51b01aa7673b3ee2dccda4893e647c37728d5b3cf695e568eff2757aed63d213ce3e28d4f39987634b0ff275e3ac81b0ba5ab12ec551dcf330a890cd64 2 | -------------------------------------------------------------------------------- /TestData/Initializer_0.05_antsRegistrationTest_AffineRotationNoMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | 7fd9d2482cf770555fc19a66f32d6afea1f40c51dd32b7210a19d6db4ec194177af68ceb97f2bc58649dbcb824f2744111a86dcebb5db1bd67a327c5ce54ecb5 2 | -------------------------------------------------------------------------------- /TestData/Initializer_0.05_antsRegistrationTest_AffineScaleMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | 58fa0e18a9366d3c1edb160fa81d9b3bcecb26340355760f367f5bcbe6acdcacba3bc9d0fabbae6c851a4be0ae1765885b5f71b5df7789c52935e93be9e0b1f1 2 | -------------------------------------------------------------------------------- /TestData/Initializer_0.05_antsRegistrationTest_AffineScaleMasks_Float.mat.sha512: -------------------------------------------------------------------------------- 1 | 93a03249ae973ff30026ad86b523548def3a92e420b8b263a4ecac9257ec9fdda46662ff8d0ecb94660947bdb18b6bfcaa45e2f05c1c3f0983d215955ee7102f 2 | -------------------------------------------------------------------------------- /TestData/Initializer_0.05_antsRegistrationTest_RigidRotationHeadMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | 0bf2c4801fb69956ee177f1b11f8ce8e3f9f8343573200709820054b0a8fe1cd57015b5dd7f1c346f285935395d8054d1f15b965d3623c58c38e9b1610c3e5a6 2 | -------------------------------------------------------------------------------- /TestData/Initializer_0.05_antsRegistrationTest_RigidRotationNoMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | 0bf2c4801fb69956ee177f1b11f8ce8e3f9f8343573200709820054b0a8fe1cd57015b5dd7f1c346f285935395d8054d1f15b965d3623c58c38e9b1610c3e5a6 2 | -------------------------------------------------------------------------------- /TestData/Initializer_0.05_antsRegistrationTest_RigidRotationNoMasks_Float.mat.sha512: -------------------------------------------------------------------------------- 1 | 4aecb12a1e3d6274852ac9235a78eb3ae56c51836a04b72506ff2727728b40f25d1ff66e673b7556ee1aca39248b96af13ee20063261aeacfcc52961b8745656 2 | -------------------------------------------------------------------------------- /TestData/Initializer_0.05_antsRegistrationTest_SimilarityRotationNoMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | e42b7a91806cc3d5a09918c5e0b4bf6ada8b708c027e9f376f8dc08bbe751316736d58cdfec707354041e2d98e4664a89a658b258c378058b827586e37bc593b 2 | -------------------------------------------------------------------------------- /TestData/Initializer_0.05_antsRegistrationTest_SimilarityScaleNoMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | 73f0727546645b50dcc561a3220846838eb6759bbcb8b96fa732eeead44498dfd316db289b5f1c2e991be944bce477df99358f9d4bf4b9d088ca89bdc886de2c 2 | -------------------------------------------------------------------------------- /TestData/Initializer_antsRegistrationTest_AffineTranslationMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | dcb3ce71affeceb11cc9c737f65081e4683b10c2f5ab2fae1243badfba7937001a90098acbeaf81a8aab6fe69a7c2459a7a59e0ff62e46fb74dd80b08c31b957 2 | -------------------------------------------------------------------------------- /TestData/Initializer_antsRegistrationTest_RigidAnisotropicMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | 733b19915e2a8fdb6a13cddbe30f1eae13c43015bc16a16857794550ca2a4bc6bc79845a41b5be5deceb6c3a6c45172f4190bf463a6f71d6f07d5ba3f6549ccc 2 | -------------------------------------------------------------------------------- /TestData/Initializer_antsRegistrationTest_RigidRotGeomNoMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | e45e434fdb4b3db07f840be645a08954820d6df9454851f8b37822c06080f964546a5134c38987ead8c75f10030e97d2f639055689df36040d62b7bd998d3e9d 2 | -------------------------------------------------------------------------------- /TestData/Initializer_antsRegistrationTest_ScaleRotationRescaleHeadMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | 224a06b9a9ce640d9ef843c13b523df8cecd61c6579d27ec9febc05030c2badfca22cb3f11a99072c20cede17d0d37dd50f49fa4bbf3ade43b08cc33d8a10738 2 | -------------------------------------------------------------------------------- /TestData/Initializer_antsRegistrationTest_ScaleRotationRescaleHeadMasks_Float.mat.sha512: -------------------------------------------------------------------------------- 1 | 91c12d949451f65e729c60635d25074490a126a8e94d69ff085af3be8a548f2c21eec179e61efb466aff92d5439dbad594647aea241662412bb92a4b343a072e 2 | -------------------------------------------------------------------------------- /TestData/Initializer_antsRegistrationTest_TranslationRescaleHeadMasks.mat.sha512: -------------------------------------------------------------------------------- 1 | bf4e5566b572d8adde9fc2931c07709be6b2d0cb6ed6bf2136615234f9071444b386f437e1136bf3ac9c9873715073893bdd168f2dbf95f1557e30c57b25d8f9 2 | -------------------------------------------------------------------------------- /TestData/Initializer_antsRegistrationTest_TranslationRescaleHeadMasks_Float.mat.sha512: -------------------------------------------------------------------------------- 1 | ded1346ac2813dc2afabf96654812a773519a3c0b2d700213d0997dee74d87c8cc734e176f4444bf9b1ec64b862a8007fcdf06114a056fbc7093dd8fd634438f 2 | -------------------------------------------------------------------------------- /TestData/antsApplyTransformsTesting.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 372e647cf938ab87a9ac6a557b98a1e16560df088569a0a02d6430df6759e61b1877cf531d341c354b355e576b73bed75db8ffb55c89810b14c749db8f95387f 2 | -------------------------------------------------------------------------------- /TestData/antsApplyTransformsTesting_InputWarpTransform.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 8bfbda498b3b2720474480a8bccab81df47088b2084af4289beb86fbd814dfe8b4b88e26ffc783b4a507eede799a03cec2dc1d8e95c1538e81ce86939f14a1c8 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_AffineRotationMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 7cc80b3899a14de9e3fa94b1a21b00a0bd576f38e8a8a12473e09e075984b346551ab6de6210dd388ac7913046fc27438558089aeecdac0114faee97a0dca773 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_AffineRotationNoMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | cd7014ce0939f377d4babbccab0542b7679524b20e8f650a3ab9f731bff8e0cb1be6dbe285184014d5cfc87de596196e4f572472c49c58c45d86899d9d484a39 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_AffineScaleMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 13d352d60470f773a487e3912071cfed2762296e30dd3ec3da58836b126fd96167d8b77d7e821030166a0d6a447f2490597f98a6e2b1c8bc1b3e0f2dba38da4d 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_AffineScaleNoMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 13d352d60470f773a487e3912071cfed2762296e30dd3ec3da58836b126fd96167d8b77d7e821030166a0d6a447f2490597f98a6e2b1c8bc1b3e0f2dba38da4d 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_AffineTranslationMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | ab5cb14261a1113a73f30f2a7258e54c17249dcd8ab7071de07a79a493834ae684155e7f76535f809d5a6d9f1c0fb3f7738cfb8aa1e0fe6e670f5bf1d4633f0a 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_AffineTranslationNoMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | ab5cb14261a1113a73f30f2a7258e54c17249dcd8ab7071de07a79a493834ae684155e7f76535f809d5a6d9f1c0fb3f7738cfb8aa1e0fe6e670f5bf1d4633f0a 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_CCSimilarityRotationMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 71dd87469df82f8726cb957b3f5c1022a1694fccc6964ccf838a95ecf3c5500e4d61c80662429fa18764475ae258572da78b1071a79092dbae7aca2e74e41d39 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_MSEAffineRotationMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 166710ab66c540359990516c50c49d94599e23d9de5445894585ea59e1e8dc93427657fa185d4c3e317968a1e131a89883faaf74bbc8c2c0d651e6a6a2913554 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_MSESimilarityRotationMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | d171974183150de09fb4123a5470a96d9944ef06136e023ac4f452a12e67331270c91dd4b31b55e77cb8f7daf4f8e228ebeab7f2279ba5c6f4ee7ef0a5bbb0fd 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_MSESimilarityRotationMasks_Float.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 6cbbc4df7d928aa6cd062702c5095a2fd748e10255e2d7e9e87aca63121735860659e5343c6313364a6a64afabae5eb5287fa76aa57ee80e655ab5bb3fb2cc7d 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_RigidAnisotropicMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | e26d6aafe899688171f7f1480ca23a2dc632110791ca3111d58044569aea903ef34b667ffee333654b24294eaa38e208b2b43a6fcf9ab609d6e969e6baa635cc 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_RigidRotGeomNoMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | e461666fe38bd18c121bafd12d426454d317e0be44329d4fdfa4d7ca30d0ca6a3e669c7f1db1f7a099f69c1eae420767383446615f92841ec9ff108cbaea71ad 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_RigidRotaRotaRotNoMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 90507372d835ca5de7c825d654c89cbf047937faaf89302e641dede6899803335d6e22155ff8a14e5b3b92a644d0f13d3a6b559a8ac75dbb86860787d0d9f3ab 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_RigidRotaRotaRotNoMasks_Float.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | f9a2ac225edd7256b79509a559c696fda4639b3636d1b3c76559e6f0217a847a65de824000a98672defa9048ec72e08ccd2807c02a13079b2a14d98efe3257d3 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_RigidRotationHeadMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 535b9b58d5f0f008f1f7bfe94ebfd092e0b213fb2da913655f830cd1a610c811c0ade427877136d19c7c49979135552ac2db72262ccdf3b31b74d0227bd95dda 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_RigidRotationMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 535b9b58d5f0f008f1f7bfe94ebfd092e0b213fb2da913655f830cd1a610c811c0ade427877136d19c7c49979135552ac2db72262ccdf3b31b74d0227bd95dda 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_RigidRotationNoMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 535b9b58d5f0f008f1f7bfe94ebfd092e0b213fb2da913655f830cd1a610c811c0ade427877136d19c7c49979135552ac2db72262ccdf3b31b74d0227bd95dda 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_ScaleRotationRescaleHeadMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 070733c1b7c3a069ba17e34fe0afd843eb10921591207b6c66055fbb5679596d1372c34f8e2e485d60a65c067e144aaf13bad0f020a21a447b2dc21865b2b69d 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_ScaleRotationRescaleHeadMasks_Float.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 39fd50eeb4aa5a55110fa84db00d5f669d8e8f97cbee0e8ae3e711b9fb96bf0675be02e4c8165c9a14415655e3b0279888e4999cb5d2e4bf67eabd88f9d2e2be 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_ScaleTranslationRescaleHeadMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 645f8ed5d7df64bc44ef16f84c454f2e55c8c04dccc7490318b6f4c4fb0400157b822e65c0196a9da09541027bc0eee14cc91d8f04a1b0e8b13e6faa05471743 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_SimilarityRotationMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 7fd54788ba0d4bbf2e7f77b99d41b77128d95ec6c63a16c754087c151ba49e1bcaa270709e749dd0bed407417babbc8c2168deb0677535bc7b226633f9ac8123 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_SimilarityRotationNoMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 2e2de8f219093c3c7f5c9e175820bc633925dc22a49a8707370d47b45ecc64c7cadb98aa4cd012878e9b42dc28f13feb9aa69b151b0710d635c4091d026ee251 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_SimilarityScaleMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | ce8f2e5fdaba35a6e25de1969f7bd34a34dd9201c9e05181bf69d557a2c187a768e14cbc513400e45e72f71c5464c81753e33476f1e3e1838e4663f6cef9d75e 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_SimilarityScaleNoMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 14e8a14b7177e090cf4286337aabd757e37f3e6d7f634e3697bb8f77dc85ad44f72619ec38b691c04e301cf262d3933a42b4aad01ae3da0adb31ddd4ce07c0f7 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_SimilarityTranslationRescaleNoMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | ea791e9f3f6173b6ecef0aff56cbab594b0363658c31829c2822a8af252a269486e64122af9122916094bee5ffac78729d6737e7b30602e3e91478b35abb0d02 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_SimilarityTranslationRescaleNoMasks_Float.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 6aa6b5366c359679cadf7ced45a2e76b38533f0eb89a668a2b52bf7a37e0910a6b6172dfd243937e192def14256f391405b72d262ba603f9ad67e9cb446cc800 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_SyNScaleNoMasks.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 06f01cb63dfdd6ef7b864effb2847ab1d14ea2fb8a3fd2e73bdae31edc708b2bab9f5c4c807f833ccd807e993c6d005c4162e625cf0fdd2b747dcf10b7ddb12b 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_SyNScaleNoMasks_Float.result.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | c7e608b5d0780e1b514e6cd1ab6d4377d0d36242ab637760bfdc0310b7cc241f8d857e1f75406f9c0fd1370178e093dd41d27cb4af4ee236bcd26dc58acd3ce8 2 | -------------------------------------------------------------------------------- /TestData/antsRegistrationTest_initialize_transforms_per_stageComposite.result.h5.sha512: -------------------------------------------------------------------------------- 1 | 5f979e157e74fe42bd020aec3511f7692ccb0f22031614fe7bbad33d77387296d5be94cd4ab3707b99db6e7f69a35a999deedbd43623ded482b05bffb5c7aed2 2 | -------------------------------------------------------------------------------- /TestData/rotation.geom.test.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 452f5261ba5753f355684e4625441acbcdfdfc86577844ed069821cfefa0e4128c2625164e1b19f48d7b1f1340cd1dc4077448f745e88b15dcbf684fa6b88413 2 | -------------------------------------------------------------------------------- /TestData/rotation.rescale.test.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | f51d0228f34d2400dbfef1c968c0221683580954dd179de32e3f7b809f21115e7572e0c509aa79b1e94e872428e9ef26230abb5163438caeac277400e21240c2 2 | -------------------------------------------------------------------------------- /TestData/rotation.test.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 44909ff51b5d636116d7e206fb79a913140998d686c92139e30248be8fd34ffd4e649d8d492e6200f534341badc23ac179a8ee4297d01c85d315619a6b5fbc30 2 | -------------------------------------------------------------------------------- /TestData/rotation.test_mask.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 106303e12022a4feb52ee28d18d4b2a575dfee3a0f223ca701a4ed1bf71acf3b77afa24fffe2e0c1aaae1b50cc5d222600cb4412fc5d49ac6b4958d393a1e887 2 | -------------------------------------------------------------------------------- /TestData/scale.test.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | da676d70781712048369aba4fcf7eec8777149b87888231ec8e520b81168ed44e377b345cd478bb725148c265a83a28ad12d31e4f57e45742e671caa106358e8 2 | -------------------------------------------------------------------------------- /TestData/scale.test_mask.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | a3830cacd08b03e32ed7c73b8db9dd6946569c7980ebbc99ce2ca07deb5a71a7c9bdc6c42083f79c4d6d78997fecb401471449b7713fa6f0e31fa312717eac11 2 | -------------------------------------------------------------------------------- /TestData/test.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 038fa4ba7e74233e35052d87d0e525b2f66b78c0b43267b6ab29afffa7306ba31df69ab0445f6d6b5d04dc21a2eb599297d6387eae5fb452ab4189fbb13aa3a6 2 | -------------------------------------------------------------------------------- /TestData/test_mask.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | 31dd949204d2902da1ef97dc057d2d39548478a7ca89d7c7f2aa1a3c81a9d9fb8739eb71e8cf3fe1991e27275b02d0ab19c300cb3742e0e63e418e6e26a6eaab 2 | -------------------------------------------------------------------------------- /TestData/translation.rescale.test.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | bc53d5978e6c65bfcb51d6c39fc6d0bb3d2c9f45a7403d23f8e568471c3abe096ba858e9eaaf5feb44006fcdc1b28b2b20a78916bb2011683c72ddd49579c1a8 2 | -------------------------------------------------------------------------------- /TestData/translation.test.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | e87199e4b0bb25e170e68f1a758305bdb0fa0b41508c3f8f058be6a26e7161d57c6be57a0e19bb390a6ba028fbaf0795c73d3172fe9411fa6dbbdbc46a0585dd 2 | -------------------------------------------------------------------------------- /TestData/translation.test_mask.nii.gz.sha512: -------------------------------------------------------------------------------- 1 | d95645879eafb4fc1839105561e89a7fd092f4f4971d89302d43fc62faf50db797899a1f0b63fa6b55f3b8640f6b04910197adeb89ef41f81b19814b88e759b9 2 | -------------------------------------------------------------------------------- /Utilities/DevelopmentSetupScripts/SetupHooks.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #========================================================================== 3 | # 4 | # Copyright Insight Software Consortium 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0.txt 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | #==========================================================================*/ 19 | 20 | 21 | # Run this script to set up the git hooks for committing changes to ANTs. 22 | 23 | egrep-q() { 24 | egrep "$@" >/dev/null 2>/dev/null 25 | } 26 | 27 | die() { 28 | echo 'failure during hook setup' 1>&2 29 | echo '-------------------------' 1>&2 30 | echo '' 1>&2 31 | echo "$@" 1>&2 32 | exit 1 33 | } 34 | 35 | u=$(cd "$(echo "$0"|sed 's/[^/]*$//')"; pwd) 36 | cd "$u/../../.git/hooks" 37 | 38 | # Symlink the hooks in from a local dir. 39 | for file in ../../Utilities/Hooks/* ../../Utilities/Hooks/.*; do 40 | base=$(basename "$file") 41 | if [ x"$base" == x"." -o x"$base" == x".." ]; then 42 | continue 43 | fi 44 | rm "$base" 45 | ln -s "$file" 46 | done 47 | 48 | # Set up uncrustify hook. 49 | echo "Setting up the uncrustify hook..." 50 | git config hooks.uncrustify.conf "Utilities/Maintenance/uncrustify.cfg" 51 | 52 | # Set up KWStyle hook. 53 | echo "Setting up the KWStyle hook..." 54 | git config hooks.KWStyle.conf "Utilities/KWStyle/kws.xml.in" 55 | git config hooks.KWStyle.overwriteRulesConf "Utilities/KWStyle/Overwrite.txt" 56 | git config hooks.KWStyle false 57 | 58 | # Set up cppcheck hook. 59 | echo "Setting up the cppcheck hook..." 60 | git config hooks.cppcheck true 61 | 62 | # Set up hook chaining. 63 | echo "Setting up hook chaining: prepare-commit-msg, commit-msg, pre-commit" 64 | git config hooks.chain-prepare-commit-msg Utilities/Hooks/prepare-commit-msg 65 | git config hooks.chain-commit-msg Utilities/Hooks/commit-msg 66 | git config hooks.chain-pre-commit Utilities/Hooks/pre-commit 67 | 68 | echo "Done." 69 | -------------------------------------------------------------------------------- /Utilities/Hooks/prepare-commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #========================================================================== 3 | # 4 | # Copyright Insight Software Consortium 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0.txt 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | #==========================================================================*/ 19 | 20 | egrep-q() { 21 | egrep "$@" >/dev/null 2>/dev/null 22 | } 23 | 24 | # First argument is file containing commit message. 25 | commit_msg="$1" 26 | 27 | # Check for our extra instructions. 28 | egrep-q "^# Start BRAINSTools commit messages" -- "$commit_msg" && return 0 29 | 30 | # Insert our extra instructions. 31 | commit_msg_tmp="$commit_msg.$$" 32 | sed 's/^# On branch.*/'\ 33 | '# Start BRAINSTools commit messages with a standard prefix (and a space):\ 34 | # BUG: - fix for runtime crash or incorrect result\ 35 | # COMP: - compiler error or warning fix\ 36 | # DOC: - documentation change\ 37 | # ENH: - new functionality\ 38 | # PERF: - performance improvement\ 39 | # STYLE: - no logic impact (indentation, comments)\ 40 | # WIP: - Work In Progress not ready for merge\ 41 | # To reference JIRA issue XY, add " (#XY)" to the END of the FIRST line.\ 42 | #/' "$commit_msg" > "$commit_msg_tmp" && 43 | sed '/^# On branch.*$/ a\ 44 | '"$instructions"' 45 | /^# Not currently on any branch.*$/ a\ 46 | '"$instructions"' 47 | ' "$commit_msg" > "$commit_msg_tmp" && 48 | mv "$commit_msg_tmp" "$commit_msg" 49 | -------------------------------------------------------------------------------- /Utilities/ReadWriteData.cxx: -------------------------------------------------------------------------------- 1 | #include "ReadWriteData.h" 2 | 3 | #include "itksys/SystemTools.hxx" 4 | 5 | bool 6 | ANTSFileExists(const std::string & strFilename) 7 | { 8 | // ITK checks file existence on all platforms, also read permissions on POSIX systems 9 | return itksys::SystemTools::FileExists(strFilename); 10 | } 11 | 12 | bool 13 | ANTSFileIsImage(const std::string &filename) 14 | { 15 | if (!ANTSFileExists(filename)) 16 | { 17 | return false; 18 | } 19 | 20 | // Check if the file is recognized as a valid image 21 | itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( 22 | filename.c_str(), itk::ImageIOFactory::IOFileModeEnum::ReadMode); 23 | if (!imageIO) 24 | { 25 | return false; 26 | } 27 | 28 | // File passed both checks 29 | return true; 30 | } -------------------------------------------------------------------------------- /Utilities/SetupForDevelopment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | $(dirname "$0")/DevelopmentSetupScripts/SetupHooks.sh 4 | -------------------------------------------------------------------------------- /Utilities/itkDeterminantTensorImageFilter.hxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Insight Segmentation & Registration Toolkit 4 | 5 | Copyright (c) Insight Software Consortium. All rights reserved. 6 | See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 7 | 8 | This software is distributed WITHOUT ANY WARRANTY; without even 9 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 10 | PURPOSE. See the above copyright notices for more information. 11 | 12 | =========================================================================*/ 13 | #ifndef _itkDeterminantTensorImageFilter_hxx 14 | #define _itkDeterminantTensorImageFilter_hxx 15 | 16 | 17 | #include "itkImageRegionIterator.h" 18 | #include "itkImageRegionConstIterator.h" 19 | #include "itkProgressReporter.h" 20 | 21 | #include "vnl/vnl_det.h" 22 | 23 | namespace itk 24 | { 25 | 26 | template 27 | DeterminantTensorImageFilter::DeterminantTensorImageFilter() 28 | { 29 | this->DynamicMultiThreadingOff(); 30 | } 31 | 32 | template 33 | void 34 | DeterminantTensorImageFilter::ThreadedGenerateData( 35 | const OutputImageRegionType & outputRegionForThread, 36 | ThreadIdType threadId) 37 | { 38 | ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels()); 39 | 40 | ImageRegionIterator ItD(this->GetOutput(), outputRegionForThread); 41 | ImageRegionConstIterator ItM(this->GetInput(), outputRegionForThread); 42 | 43 | ItD.GoToBegin(); 44 | ItM.GoToBegin(); 45 | while (!ItD.IsAtEnd() && !ItM.IsAtEnd()) 46 | { 47 | ItD.Set(static_cast(vnl_det((ItM.Get()).GetVnlMatrix()))); 48 | progress.CompletedPixel(); 49 | ++ItD; 50 | ++ItM; 51 | } 52 | } 53 | 54 | template 55 | void 56 | DeterminantTensorImageFilter::PrintSelf(std::ostream & os, Indent indent) const 57 | { 58 | Superclass::PrintSelf(os, indent); 59 | } 60 | 61 | } // end namespace itk 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /Utilities/itkPointSetFunction.hxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Advanced Normalization Tools 4 | 5 | Copyright (c) ConsortiumOfANTS. All rights reserved. 6 | See accompanying COPYING.txt or 7 | https://github.com/stnava/ANTs/blob/master/ANTSCopyright.txt for details. 8 | 9 | This software is distributed WITHOUT ANY WARRANTY; without even 10 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 11 | PURPOSE. See the above copyright notices for more information. 12 | 13 | =========================================================================*/ 14 | #ifndef __itkPointSetFunction_hxx 15 | #define __itkPointSetFunction_hxx 16 | 17 | 18 | namespace itk 19 | { 20 | /** 21 | * Constructor 22 | */ 23 | template 24 | PointSetFunction::PointSetFunction() 25 | { 26 | m_PointSet = nullptr; 27 | } 28 | 29 | /** 30 | * Standard "PrintSelf" method 31 | */ 32 | template 33 | void 34 | PointSetFunction::PrintSelf(std::ostream & os, Indent indent) const 35 | { 36 | Superclass::PrintSelf(os, indent); 37 | 38 | os << indent << "InputPointSet: " << m_PointSet.GetPointer() << std::endl; 39 | } 40 | 41 | /** 42 | * Initialize by setting the input point set 43 | */ 44 | template 45 | void 46 | PointSetFunction::SetInputPointSet(const InputPointSetType * ptr) 47 | { 48 | // set the input image 49 | m_PointSet = ptr; 50 | } 51 | } // end namespace itk 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | title: ANTs 2 | description: Advanced Normalization Tools 3 | google_analytics: "47460530" 4 | show_downloads: true 5 | theme: jekyll-theme-midnight 6 | 7 | gems: 8 | - jekyll-mentions 9 | -------------------------------------------------------------------------------- /antsRegistrationCLP/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | find_package(SlicerExecutionModel REQUIRED GenerateCLP) 3 | include(${GenerateCLP_USE_FILE}) 4 | 5 | set(antsRegistrationCLP_SOURCE antsRegistrationCLP.cxx) 6 | 7 | generateclp(antsRegistrationCLP_SOURCE antsREGISTRATIONCLP.xml) 8 | 9 | add_executable(antsRegistrationCLP ${antsRegistrationCLP_SOURCE}) 10 | 11 | target_link_libraries(antsRegistrationCLP ${ITK_LIBRARIES}) 12 | -------------------------------------------------------------------------------- /antsRegistrationCLP/antsRegistrationCLP.cxx: -------------------------------------------------------------------------------- 1 | #include "antsRegistrationCLPCLP.h" 2 | 3 | int 4 | maint(int argc, char * argv[]) 5 | { 6 | PARSE_ARGS; 7 | } 8 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | # Adapt as necessary starting from here 2 | 3 | # - GENERATOR: "Visual Studio 14 Win64" 4 | # CONFIG: Release 5 | # COMPILER: MSVC 6 | environment: 7 | matrix: 8 | - GENERATOR: "MinGW Makefiles" 9 | MINGW_DIR: mingw32 10 | CONFIG: Release 11 | COMPILER: MinGW 12 | itktag: c5138560409c75408ff76bccff938f21e5dcafc6 13 | 14 | init: 15 | # - set PATH=C:\MinGW\bin;C:\MinGW\msys\1.0\bin;%PATH%; 16 | - set PATH=C:\MinGW\bin;%PATH%; 17 | - cmd: ECHO %PATH% 18 | # - set PATH=%PATH%;C:\Users\appveyor\AppData\Local\Yarn\bin 19 | # - set PATH=%PATH%;C:\Program Files\AppVeyor\BuildAgent\ 20 | # - set PATH=%PATH%;C:\Windows\system32 21 | # - set PATH=%PATH%;C:\Windows 22 | # - set PATH=%PATH%;C:\Windows\System32\Wbem 23 | # - set PATH=%PATH%;C:\Windows\System32\WindowsPowerShell\v1.0\ 24 | # - set PATH=%PATH%;C:\Program Files\7-Zip 25 | - cd ../ 26 | - git clone https://github.com/InsightSoftwareConsortium/ITK.git 27 | - cd ITK 28 | - git checkout master 29 | - git checkout %itktag% 30 | - cd ../ 31 | # - git clone https://itk.org/ITK.git 32 | - mkdir ITKbin 33 | - cd ITKbin 34 | - cmake -G "%GENERATOR%" -DCMAKE_BUILD_TYPE:STRING="Release" -DCMAKE_SH:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=OFF ../ITK 35 | - mingw32-make -j 2 36 | - mingw32-make install 37 | - rm -rf ../ITK 38 | - set PATH=%CD%\ITKbin;%PATH%; 39 | - echo %APPVEYOR_BUILD_FOLDER% 40 | 41 | before_build: 42 | - cd %APPVEYOR_BUILD_FOLDER% 43 | - cmake -G "%GENERATOR%" -DRUN_LONG_TESTS=OFF -DRUN_SHORT_TESTS=ON ./.. 44 | - cd ANTS-build/ 45 | - mingw32-make test 46 | - mingw32-make install 47 | 48 | on_failure: 49 | - 7z a failure.zip * 50 | - appveyor PushArtifact failure.zip 51 | 52 | artifacts: 53 | - path: '\*_*.zip' 54 | name: Bits 55 | -------------------------------------------------------------------------------- /forhtml/README: -------------------------------------------------------------------------------- 1 | 2 | edit the index.html 3 | 4 | then run (from the root dir) 5 | 6 | ./forhtml/push-website 7 | 8 | e.g. 9 | 10 | git checkout master 11 | vi index.html 12 | git add index.html 13 | git commit -m 'ENH: grant ref' 14 | git push origin master # push your new index.html changes 15 | ./forhtml/push-website # send the site to github 16 | 17 | -------------------------------------------------------------------------------- /forhtml/nazca-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ANTsX/ANTs/d63d1fbc979042d9c41ef640aa2574bb30e14376/forhtml/nazca-1.jpg -------------------------------------------------------------------------------- /forhtml/push-website: -------------------------------------------------------------------------------- 1 | git checkout master 2 | 3 | git branch -D gh-pages 4 | 5 | git push origin --delete gh-pages 6 | 7 | git checkout --orphan gh-pages 8 | 9 | git add index.html .htaccess 10 | 11 | git add forhtml/ 12 | 13 | git commit -m "pages commit" 14 | 15 | git push origin gh-pages 16 | 17 | git checkout master 18 | --------------------------------------------------------------------------------