From 31f18fe01ec4bc84dc8c4554075ab2eb4bd25280 Mon Sep 17 00:00:00 2001 From: "Chr. Rossmanith" Date: Wed, 15 Jan 2020 22:04:34 +0100 Subject: [PATCH] Type->Enum // added .as_ref() // adjust ITK git tag --- Examples/ANTS.cxx | 4 +-- Examples/ANTSIntegrateVectorField.cxx | 2 +- Examples/ANTSIntegrateVelocityField.cxx | 2 +- ...SUseLandmarkImagesToGetAffineTransform.cxx | 2 +- ...arkImagesToGetBSplineDisplacementField.cxx | 2 +- Examples/Atropos.cxx | 2 +- Examples/AverageImages.cxx | 6 ++-- Examples/AverageTensorImages.cxx | 2 +- Examples/ConvertImagePixelType.cxx | 2 +- .../ConvertInputImagePixelTypeToFloat.cxx | 2 +- Examples/ConvertToJpg.cxx | 2 +- Examples/CopyImageHeaderInformation.cxx | 2 +- Examples/CreateDTICohort.cxx | 2 +- Examples/CreateTiledMosaic.cxx | 2 +- Examples/DenoiseImage.cxx | 2 +- Examples/ImageMath_Templates.hxx | 8 ++--- Examples/KellyKapowski.cxx | 2 +- Examples/LaplacianThickness.cxx | 2 +- Examples/MeasureMinMaxMean.cxx | 2 +- Examples/MultiplyImages.cxx | 2 +- Examples/N4BiasFieldCorrection.cxx | 2 +- Examples/NonLocalSuperResolution.cxx | 2 +- Examples/PrintHeader.cxx | 2 +- Examples/ResetDirection.cxx | 2 +- Examples/SetDirectionByMatrix.cxx | 2 +- Examples/StudentsTestOnImages.cxx | 2 +- Examples/WarpImageMultiTransform.cxx | 2 +- .../WarpTimeSeriesImageMultiTransform.cxx | 2 +- Examples/antsAI.cxx | 12 +++---- Examples/antsAlignOrigin.cxx | 2 +- Examples/antsJointFusion.cxx | 2 +- Examples/antsJointTensorFusion.cxx | 2 +- Examples/antsMotionCorrDiffusionDirection.cxx | 2 +- Examples/antsRegistrationTemplateHeader.h | 10 +++--- Examples/antsSurf.cxx | 2 +- Examples/antsVol.cxx | 2 +- Examples/itkantsRegistrationHelper.hxx | 32 +++++++++---------- .../itkANTSAffine3DTransform.hxx | 8 ++--- .../itkANTSCenteredAffine2DTransform.hxx | 4 +-- SuperBuild/External_ITKv5.cmake | 2 +- 40 files changed, 74 insertions(+), 74 deletions(-) diff --git a/Examples/ANTS.cxx b/Examples/ANTS.cxx index 321659e70..c564edf27 100644 --- a/Examples/ANTS.cxx +++ b/Examples/ANTS.cxx @@ -190,14 +190,14 @@ int ANTS( std::vector args, std::ostream* /*out_stream = nullptr*/ if( argc == 3 && ( std::stoi( argv[1] ) != '-' || std::stoi( argv[1] ) != 2 || std::stoi( argv[1] ) != 3 ) ) { itk::ImageIOBase::Pointer fixedImageIO - = itk::ImageIOFactory::CreateImageIO( argv[1], itk::ImageIOFactory::FileModeType::ReadMode ); + = itk::ImageIOFactory::CreateImageIO( argv[1], itk::ImageIOFactory::FileModeEnum::ReadMode ); if( fixedImageIO.IsNull() ) { std::cerr << "Invalid fixed image: " << argv[1] << std::endl; return EXIT_FAILURE; } itk::ImageIOBase::Pointer movingImageIO - = itk::ImageIOFactory::CreateImageIO( argv[2], itk::ImageIOFactory::FileModeType::ReadMode ); + = itk::ImageIOFactory::CreateImageIO( argv[2], itk::ImageIOFactory::FileModeEnum::ReadMode ); if( movingImageIO.IsNull() ) { std::cerr << "Invalid moving image: " << argv[2] << std::endl; diff --git a/Examples/ANTSIntegrateVectorField.cxx b/Examples/ANTSIntegrateVectorField.cxx index 967c74c2c..b5255acac 100644 --- a/Examples/ANTSIntegrateVectorField.cxx +++ b/Examples/ANTSIntegrateVectorField.cxx @@ -464,7 +464,7 @@ int ANTSIntegrateVectorField( std::vector args, std::ostream* /*out std::string ifn = std::string(argv[1]); itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(ifn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(ifn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(ifn.c_str() ); imageIO->ReadImageInformation(); unsigned int dim = imageIO->GetNumberOfDimensions(); diff --git a/Examples/ANTSIntegrateVelocityField.cxx b/Examples/ANTSIntegrateVelocityField.cxx index 46cdaa6b4..c226734ce 100644 --- a/Examples/ANTSIntegrateVelocityField.cxx +++ b/Examples/ANTSIntegrateVelocityField.cxx @@ -169,7 +169,7 @@ int ANTSIntegrateVelocityField( std::vector args, std::ostream* /*o std::cout << " start " << std::endl; std::string ifn = std::string(argv[1]); itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(ifn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(ifn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(ifn.c_str() ); imageIO->ReadImageInformation(); unsigned int dim = imageIO->GetNumberOfDimensions(); diff --git a/Examples/ANTSUseLandmarkImagesToGetAffineTransform.cxx b/Examples/ANTSUseLandmarkImagesToGetAffineTransform.cxx index 57df3a30b..7f24d7b5b 100644 --- a/Examples/ANTSUseLandmarkImagesToGetAffineTransform.cxx +++ b/Examples/ANTSUseLandmarkImagesToGetAffineTransform.cxx @@ -436,7 +436,7 @@ int ANTSUseLandmarkImagesToGetAffineTransform( std::vector args, st // Get the image dimension std::string fn = std::string(argv[1]); itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); diff --git a/Examples/ANTSUseLandmarkImagesToGetBSplineDisplacementField.cxx b/Examples/ANTSUseLandmarkImagesToGetBSplineDisplacementField.cxx index ef38edfcd..7018efe0c 100644 --- a/Examples/ANTSUseLandmarkImagesToGetBSplineDisplacementField.cxx +++ b/Examples/ANTSUseLandmarkImagesToGetBSplineDisplacementField.cxx @@ -541,7 +541,7 @@ int ANTSUseLandmarkImagesToGetBSplineDisplacementField( std::vector // Get the image dimension std::string fn = std::string(argv[1]); itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); diff --git a/Examples/Atropos.cxx b/Examples/Atropos.cxx index 1ce089956..9b1f26c0a 100644 --- a/Examples/Atropos.cxx +++ b/Examples/Atropos.cxx @@ -1778,7 +1778,7 @@ int Atropos( std::vector args, std::ostream* /*out_stream = nullptr return EXIT_FAILURE; } itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - filename.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + filename.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); dimension = imageIO->GetNumberOfDimensions(); } diff --git a/Examples/AverageImages.cxx b/Examples/AverageImages.cxx index 33c72198d..680b05d27 100644 --- a/Examples/AverageImages.cxx +++ b/Examples/AverageImages.cxx @@ -72,7 +72,7 @@ int AverageImages1(unsigned int argc, char *argv[]) // Get the image dimension const std::string fn = std::string(argv[j]); typename itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); @@ -194,7 +194,7 @@ int AverageImages(unsigned int argc, char *argv[]) std::string fn = std::string(argv[j]); std::cout << " fn " << fn << " " << ImageDimension << " " << NVectorComponents << std::endl; typename itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName( fn.c_str() ); imageIO->ReadImageInformation(); @@ -326,7 +326,7 @@ int AverageImages( std::vector args, std::ostream* /*out_stream = n const int dim = std::stoi( argv[1] ); itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(argv[4], itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(argv[4], itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(argv[4]); imageIO->ReadImageInformation(); unsigned int ncomponents = imageIO->GetNumberOfComponents(); diff --git a/Examples/AverageTensorImages.cxx b/Examples/AverageTensorImages.cxx index 04b7a7463..3257d8c39 100644 --- a/Examples/AverageTensorImages.cxx +++ b/Examples/AverageTensorImages.cxx @@ -37,7 +37,7 @@ int AverageTensorImages(unsigned int argc, char *argv[]) std::string fn = std::string(argv[j]); std::cout << " fn " << fn << std::endl; typename itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); for( unsigned int i = 0; i < imageIO->GetNumberOfDimensions(); i++ ) diff --git a/Examples/ConvertImagePixelType.cxx b/Examples/ConvertImagePixelType.cxx index ef49f9f7a..9db00adec 100644 --- a/Examples/ConvertImagePixelType.cxx +++ b/Examples/ConvertImagePixelType.cxx @@ -170,7 +170,7 @@ int ConvertImagePixelType( std::vector args, std::ostream* /*out_st std::string fn = std::string(argv[1]); itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); diff --git a/Examples/ConvertInputImagePixelTypeToFloat.cxx b/Examples/ConvertInputImagePixelTypeToFloat.cxx index ddde7be3a..909e7f3f5 100644 --- a/Examples/ConvertInputImagePixelTypeToFloat.cxx +++ b/Examples/ConvertInputImagePixelTypeToFloat.cxx @@ -150,7 +150,7 @@ int ConvertInputImagePixelTypeToFloat( std::vector args, std::ostre std::string fn = std::string(argv[1]); itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); diff --git a/Examples/ConvertToJpg.cxx b/Examples/ConvertToJpg.cxx index ae7cfa38b..ef5a811d4 100644 --- a/Examples/ConvertToJpg.cxx +++ b/Examples/ConvertToJpg.cxx @@ -148,7 +148,7 @@ int ConvertToJpg( std::vector args, std::ostream* /*out_stream = nu std::string fn = std::string(argv[1]); itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); diff --git a/Examples/CopyImageHeaderInformation.cxx b/Examples/CopyImageHeaderInformation.cxx index 869e1493c..25b36d41e 100644 --- a/Examples/CopyImageHeaderInformation.cxx +++ b/Examples/CopyImageHeaderInformation.cxx @@ -184,7 +184,7 @@ int CopyImageHeaderInformation( std::vector args, std::ostream* /*o std::string fn = std::string(argv[1]); itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); unsigned int dim = imageIO->GetNumberOfDimensions(); diff --git a/Examples/CreateDTICohort.cxx b/Examples/CreateDTICohort.cxx index 7aef6255e..2bf98792e 100644 --- a/Examples/CreateDTICohort.cxx +++ b/Examples/CreateDTICohort.cxx @@ -1180,7 +1180,7 @@ int CreateDTICohort( std::vector args, std::ostream* /*out_stream = return EXIT_FAILURE; } itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - filename.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + filename.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); dimension = imageIO->GetNumberOfDimensions(); } diff --git a/Examples/CreateTiledMosaic.cxx b/Examples/CreateTiledMosaic.cxx index 8ac5af352..9572cfe04 100644 --- a/Examples/CreateTiledMosaic.cxx +++ b/Examples/CreateTiledMosaic.cxx @@ -1286,7 +1286,7 @@ int CreateTiledMosaic( std::vector args, std::ostream* /*out_stream filename = imageOption->GetFunction( 0 )->GetName(); itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - filename.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + filename.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); unsigned int dimension = imageIO->GetNumberOfDimensions(); if( dimension == 3 ) diff --git a/Examples/DenoiseImage.cxx b/Examples/DenoiseImage.cxx index 112bce5ea..6b27f6d50 100644 --- a/Examples/DenoiseImage.cxx +++ b/Examples/DenoiseImage.cxx @@ -649,7 +649,7 @@ int DenoiseImage( std::vector args, std::ostream* /*out_stream = nu return EXIT_FAILURE; } itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - filename.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + filename.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); dimension = imageIO->GetNumberOfDimensions(); } diff --git a/Examples/ImageMath_Templates.hxx b/Examples/ImageMath_Templates.hxx index 21cd8f5dc..2fc38e06c 100644 --- a/Examples/ImageMath_Templates.hxx +++ b/Examples/ImageMath_Templates.hxx @@ -1106,7 +1106,7 @@ int TileImages(unsigned int argc, char *argv[]) // Get the image dimension std::string fn = std::string(argv[j]); typename itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); @@ -5818,7 +5818,7 @@ int TensorFunctions(int argc, char *argv[]) " Convert a 4D tensor to a 3D tensor --- if there are 7 components to the tensor, we throw away the first component b/c its probably b0 " << std::endl; itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(fn1.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(fn1.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn1.c_str() ); imageIO->ReadImageInformation(); unsigned int dim = imageIO->GetNumberOfDimensions(); @@ -11022,7 +11022,7 @@ int ConvertImageSetToMatrix(unsigned int argc, char *argv[]) // Get the image dimension std::string fn = std::string(argv[j]); typename itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); for( unsigned int i = 0; i < imageIO->GetNumberOfDimensions(); i++ ) @@ -11319,7 +11319,7 @@ int ConvertImageSetToEigenvectors(unsigned int argc, char *argv[]) // Get the image dimension std::string fn = std::string(argv[j]); typename itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); for( unsigned int i = 0; i < imageIO->GetNumberOfDimensions(); i++ ) diff --git a/Examples/KellyKapowski.cxx b/Examples/KellyKapowski.cxx index a6366f838..71696459e 100644 --- a/Examples/KellyKapowski.cxx +++ b/Examples/KellyKapowski.cxx @@ -834,7 +834,7 @@ int KellyKapowski( std::vector args, std::ostream* /*out_stream = n return EXIT_FAILURE; } itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - filename.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + filename.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); dimension = imageIO->GetNumberOfDimensions(); } diff --git a/Examples/LaplacianThickness.cxx b/Examples/LaplacianThickness.cxx index 46b1c6ca2..3953c057d 100644 --- a/Examples/LaplacianThickness.cxx +++ b/Examples/LaplacianThickness.cxx @@ -1008,7 +1008,7 @@ int LaplacianThickness( std::vector args, std::ostream* /*out_strea // std::cout << " image " << ifn << std::endl; // Get the image dimension itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(ifn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(ifn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(ifn.c_str() ); imageIO->ReadImageInformation(); unsigned int dim = imageIO->GetNumberOfDimensions(); diff --git a/Examples/MeasureMinMaxMean.cxx b/Examples/MeasureMinMaxMean.cxx index eda32eced..4daab0988 100644 --- a/Examples/MeasureMinMaxMean.cxx +++ b/Examples/MeasureMinMaxMean.cxx @@ -187,7 +187,7 @@ int MeasureMinMaxMean( std::vector args, std::ostream* /*out_stream } int dim = std::stoi( argv[1] ); itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(argv[2], itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(argv[2], itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(argv[2]); imageIO->ReadImageInformation(); unsigned int ncomponents = imageIO->GetNumberOfComponents(); diff --git a/Examples/MultiplyImages.cxx b/Examples/MultiplyImages.cxx index cc963da41..af9b744ee 100644 --- a/Examples/MultiplyImages.cxx +++ b/Examples/MultiplyImages.cxx @@ -185,7 +185,7 @@ int MultiplyImages( std::vector args, std::ostream* /*out_stream = int dim = std::stoi( argv[1] ); itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(argv[2], itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(argv[2], itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(argv[2]); imageIO->ReadImageInformation(); unsigned int ncomponents = imageIO->GetNumberOfComponents(); diff --git a/Examples/N4BiasFieldCorrection.cxx b/Examples/N4BiasFieldCorrection.cxx index 89401c845..352381e8d 100644 --- a/Examples/N4BiasFieldCorrection.cxx +++ b/Examples/N4BiasFieldCorrection.cxx @@ -946,7 +946,7 @@ int N4BiasFieldCorrection( std::vector args, std::ostream* /*out_st return EXIT_FAILURE; } itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - filename.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + filename.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); dimension = imageIO->GetNumberOfDimensions(); } diff --git a/Examples/NonLocalSuperResolution.cxx b/Examples/NonLocalSuperResolution.cxx index ccf6c596a..a4ec5c3f9 100644 --- a/Examples/NonLocalSuperResolution.cxx +++ b/Examples/NonLocalSuperResolution.cxx @@ -717,7 +717,7 @@ int NonLocalSuperResolution( std::vector args, std::ostream* /*out_ return EXIT_FAILURE; } itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - filename.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + filename.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); dimension = imageIO->GetNumberOfDimensions(); } diff --git a/Examples/PrintHeader.cxx b/Examples/PrintHeader.cxx index 7c9708432..be6ba6f49 100644 --- a/Examples/PrintHeader.cxx +++ b/Examples/PrintHeader.cxx @@ -456,7 +456,7 @@ int PrintHeader( std::vector args, std::ostream* /*out_stream = nul } itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); try { diff --git a/Examples/ResetDirection.cxx b/Examples/ResetDirection.cxx index d393727f7..4ebf0a000 100644 --- a/Examples/ResetDirection.cxx +++ b/Examples/ResetDirection.cxx @@ -136,7 +136,7 @@ int ResetDirection( std::vector args, std::ostream* /*out_stream = std::string fn = std::string(argv[1]); itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); diff --git a/Examples/SetDirectionByMatrix.cxx b/Examples/SetDirectionByMatrix.cxx index 14ff0d4c4..f3b6616d5 100644 --- a/Examples/SetDirectionByMatrix.cxx +++ b/Examples/SetDirectionByMatrix.cxx @@ -155,7 +155,7 @@ int SetDirectionByMatrix( std::vector args, std::ostream* /*out_str std::string fn = std::string(argv[1]); itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); diff --git a/Examples/StudentsTestOnImages.cxx b/Examples/StudentsTestOnImages.cxx index 37cf32621..7e9677ddf 100644 --- a/Examples/StudentsTestOnImages.cxx +++ b/Examples/StudentsTestOnImages.cxx @@ -454,7 +454,7 @@ int StudentsTestOnImages(int argc, char *argv[]) // Get the image dimension std::string fn = std::string(argv[5]); itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(fn.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(fn.c_str() ); imageIO->ReadImageInformation(); typename ImageType::SizeType size; diff --git a/Examples/WarpImageMultiTransform.cxx b/Examples/WarpImageMultiTransform.cxx index 4a4c84189..638efd0c4 100644 --- a/Examples/WarpImageMultiTransform.cxx +++ b/Examples/WarpImageMultiTransform.cxx @@ -808,7 +808,7 @@ int WarpImageMultiTransform( std::vector args, std::ostream* /*out_ if( is_parsing_ok ) { itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO(moving_image_filename, - itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(moving_image_filename); imageIO->ReadImageInformation(); unsigned int ncomponents = imageIO->GetNumberOfComponents(); diff --git a/Examples/WarpTimeSeriesImageMultiTransform.cxx b/Examples/WarpTimeSeriesImageMultiTransform.cxx index 8a6a48322..c7a742567 100644 --- a/Examples/WarpTimeSeriesImageMultiTransform.cxx +++ b/Examples/WarpTimeSeriesImageMultiTransform.cxx @@ -483,7 +483,7 @@ void WarpImageMultiTransform(char *moving_image_filename, char *output_image_fil typename VectorImageType::Pointer img_mov; typename itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(moving_image_filename, itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(moving_image_filename, itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(moving_image_filename); imageIO->ReadImageInformation(); // std::cout << " Dimension " << imageIO->GetNumberOfDimensions() << " Components " diff --git a/Examples/antsAI.cxx b/Examples/antsAI.cxx index 6a9418c61..c140f8e91 100644 --- a/Examples/antsAI.cxx +++ b/Examples/antsAI.cxx @@ -959,18 +959,18 @@ int antsAI( itk::ants::CommandLineParser *parser ) if( ImageDimension == 2 ) { - fixedPrimaryEigenVector = fixedImagePrincipalAxes.GetVnlMatrix().get_row( 1 ); - movingPrimaryEigenVector = movingImagePrincipalAxes.GetVnlMatrix().get_row( 1 ); + fixedPrimaryEigenVector = fixedImagePrincipalAxes.GetVnlMatrix().get_row( 1 ).as_ref(); + movingPrimaryEigenVector = movingImagePrincipalAxes.GetVnlMatrix().get_row( 1 ).as_ref(); B = outer_product( movingPrimaryEigenVector, fixedPrimaryEigenVector ); } else if( ImageDimension == 3 ) { - fixedPrimaryEigenVector = fixedImagePrincipalAxes.GetVnlMatrix().get_row( 2 ); - fixedSecondaryEigenVector = fixedImagePrincipalAxes.GetVnlMatrix().get_row( 1 ); + fixedPrimaryEigenVector = fixedImagePrincipalAxes.GetVnlMatrix().get_row( 2 ).as_ref(); + fixedSecondaryEigenVector = fixedImagePrincipalAxes.GetVnlMatrix().get_row( 1 ).as_ref(); - movingPrimaryEigenVector = movingImagePrincipalAxes.GetVnlMatrix().get_row( 2 ); - movingSecondaryEigenVector = movingImagePrincipalAxes.GetVnlMatrix().get_row( 1 ); + movingPrimaryEigenVector = movingImagePrincipalAxes.GetVnlMatrix().get_row( 2 ).as_ref(); + movingSecondaryEigenVector = movingImagePrincipalAxes.GetVnlMatrix().get_row( 1 ).as_ref(); B = outer_product( movingPrimaryEigenVector, fixedPrimaryEigenVector ) + outer_product( movingSecondaryEigenVector, fixedSecondaryEigenVector ); diff --git a/Examples/antsAlignOrigin.cxx b/Examples/antsAlignOrigin.cxx index 7ca377608..00394eb16 100644 --- a/Examples/antsAlignOrigin.cxx +++ b/Examples/antsAlignOrigin.cxx @@ -323,7 +323,7 @@ int antsAlignOrigin( std::vector args, std::ostream* /*out_stream = parser->GetOption( "input-image-type" ); itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - filename.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + filename.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); unsigned int dimension = imageIO->GetNumberOfDimensions(); itk::ants::CommandLineParser::OptionType::Pointer dimOption = diff --git a/Examples/antsJointFusion.cxx b/Examples/antsJointFusion.cxx index 77bfb2208..76e2a20e3 100644 --- a/Examples/antsJointFusion.cxx +++ b/Examples/antsJointFusion.cxx @@ -1002,7 +1002,7 @@ int antsJointFusion( std::vector args, std::ostream* /*out_stream = return EXIT_FAILURE; } itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - filename.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + filename.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); dimension = imageIO->GetNumberOfDimensions(); } diff --git a/Examples/antsJointTensorFusion.cxx b/Examples/antsJointTensorFusion.cxx index 59ade1441..e42b9b86f 100644 --- a/Examples/antsJointTensorFusion.cxx +++ b/Examples/antsJointTensorFusion.cxx @@ -974,7 +974,7 @@ int antsJointTensorFusion( std::vector args, std::ostream* /*out_st return EXIT_FAILURE; } itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - filename.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + filename.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); dimension = imageIO->GetNumberOfDimensions(); } diff --git a/Examples/antsMotionCorrDiffusionDirection.cxx b/Examples/antsMotionCorrDiffusionDirection.cxx index 592e43463..6840cf39b 100644 --- a/Examples/antsMotionCorrDiffusionDirection.cxx +++ b/Examples/antsMotionCorrDiffusionDirection.cxx @@ -319,7 +319,7 @@ int ants_motion_directions( itk::ants::CommandLineParser *parser ) // Therefore check reference image is 3D, and fail if not // itk::ImageIOBase::Pointer imageIO = - itk::ImageIOFactory::CreateImageIO(physicalName.c_str(), itk::ImageIOFactory::FileModeType::ReadMode); + itk::ImageIOFactory::CreateImageIO(physicalName.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode); imageIO->SetFileName(physicalName.c_str() ); try { diff --git a/Examples/antsRegistrationTemplateHeader.h b/Examples/antsRegistrationTemplateHeader.h index 41a68b422..28d6f9e68 100644 --- a/Examples/antsRegistrationTemplateHeader.h +++ b/Examples/antsRegistrationTemplateHeader.h @@ -1240,8 +1240,8 @@ DoRegistration(typename ParserType::Pointer & parser) } unsigned int numStateComponents = savedStateTx->GetNumberOfTransforms(); // If the last two transforms are displacement field transforms, we add their inverse displacement field to the saved state composite. - if( savedStateTx->GetNthTransform( numStateComponents-1 )->GetTransformCategory() == TransformType::TransformCategoryType::DisplacementField - && savedStateTx->GetNthTransform( numStateComponents-2 )->GetTransformCategory() == TransformType::TransformCategoryType::DisplacementField ) + if( savedStateTx->GetNthTransform( numStateComponents-1 )->GetTransformCategory() == TransformType::TransformCategoryEnum::DisplacementField + && savedStateTx->GetNthTransform( numStateComponents-2 )->GetTransformCategory() == TransformType::TransformCategoryEnum::DisplacementField ) { typename DisplacementFieldTransformType::Pointer oneToEndTransform = dynamic_cast( savedStateTx->GetNthTransform( numStateComponents-2 ).GetPointer() ); @@ -1281,13 +1281,13 @@ DoRegistration(typename ParserType::Pointer & parser) TransformTypeNames.clear(); for( unsigned int i = 0; i < numTransforms; i++ ) { - if( transformToWrite->GetNthTransform( i )->GetTransformCategory() == TransformType::TransformCategoryType::Linear ) + if( transformToWrite->GetNthTransform( i )->GetTransformCategory() == TransformType::TransformCategoryEnum::Linear ) { // The output type must be Affine, not matrixoffset! TransformTypeNames.push_back( "matrixoffset" ); TransformTypeNames.emplace_back("genericaffine" ); } else if( transformToWrite->GetNthTransform( i )->GetTransformCategory() == - TransformType::TransformCategoryType::DisplacementField ) + TransformType::TransformCategoryEnum::DisplacementField ) { typename DisplacementFieldTransformType::Pointer nthTransform = dynamic_cast( transformToWrite->GetNthTransform( i ).GetPointer() ); @@ -1305,7 +1305,7 @@ DoRegistration(typename ParserType::Pointer & parser) TransformTypeNames.emplace_back("gdf" ); } } - else if( transformToWrite->GetNthTransform( i )->GetTransformCategory() == TransformType::TransformCategoryType::BSpline ) + else if( transformToWrite->GetNthTransform( i )->GetTransformCategory() == TransformType::TransformCategoryEnum::BSpline ) { TransformTypeNames.emplace_back("bspline" ); } diff --git a/Examples/antsSurf.cxx b/Examples/antsSurf.cxx index 831ae58c9..026d237c1 100644 --- a/Examples/antsSurf.cxx +++ b/Examples/antsSurf.cxx @@ -1100,7 +1100,7 @@ int antsSurf( std::vector args, std::ostream* /*out_stream = nullpt inputFile = imageOption->GetFunction( 0 )->GetParameter( 0 ); } itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - inputFile.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + inputFile.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); unsigned int dimension = imageIO->GetNumberOfDimensions(); if( dimension == 3 ) diff --git a/Examples/antsVol.cxx b/Examples/antsVol.cxx index bf1317fcf..47c2e2117 100644 --- a/Examples/antsVol.cxx +++ b/Examples/antsVol.cxx @@ -563,7 +563,7 @@ int antsVol( std::vector args, std::ostream* /*out_stream = nullptr inputFile = imageOption->GetFunction( 0 )->GetParameter( 0 ); } itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( - inputFile.c_str(), itk::ImageIOFactory::FileModeType::ReadMode ); + inputFile.c_str(), itk::ImageIOFactory::FileModeEnum::ReadMode ); unsigned int dimension = imageIO->GetNumberOfDimensions(); if( dimension == 3 ) diff --git a/Examples/itkantsRegistrationHelper.hxx b/Examples/itkantsRegistrationHelper.hxx index acc73f3fe..76edc5c16 100644 --- a/Examples/itkantsRegistrationHelper.hxx +++ b/Examples/itkantsRegistrationHelper.hxx @@ -3337,10 +3337,10 @@ RegistrationHelper // transforms for a SyN registration. // unsigned int numTransforms = compToRestore->GetNumberOfTransforms(); - if( (compToRestore->GetNthTransform( numTransforms-1 )->GetTransformCategory() == TransformType::TransformCategoryType::DisplacementField) - && (compToRestore->GetNthTransform( numTransforms-2 )->GetTransformCategory() == TransformType::TransformCategoryType::DisplacementField) - && (compToRestore->GetNthTransform( numTransforms-3 )->GetTransformCategory() == TransformType::TransformCategoryType::DisplacementField) - && (compToRestore->GetNthTransform( numTransforms-4 )->GetTransformCategory() == TransformType::TransformCategoryType::DisplacementField) ) + if( (compToRestore->GetNthTransform( numTransforms-1 )->GetTransformCategory() == TransformType::TransformCategoryEnum::DisplacementField) + && (compToRestore->GetNthTransform( numTransforms-2 )->GetTransformCategory() == TransformType::TransformCategoryEnum::DisplacementField) + && (compToRestore->GetNthTransform( numTransforms-3 )->GetTransformCategory() == TransformType::TransformCategoryEnum::DisplacementField) + && (compToRestore->GetNthTransform( numTransforms-4 )->GetTransformCategory() == TransformType::TransformCategoryEnum::DisplacementField) ) { typename DisplacementFieldTransformType::Pointer fixedToMiddleForwardTx = dynamic_cast( compToRestore->GetNthTransform( numTransforms-4 ).GetPointer() ); @@ -3507,7 +3507,7 @@ RegistrationHelper { typename CompositeTransformType::Pointer combinedCompositeTransform = CompositeTransformType::New(); - if( compositeTransform->GetTransformCategory() != TransformType::TransformCategoryType::DisplacementField ) + if( compositeTransform->GetTransformCategory() != TransformType::TransformCategoryEnum::DisplacementField ) { itkExceptionMacro( "The composite transform is not composed strictly of displacement fields." ); } @@ -3606,7 +3606,7 @@ RegistrationHelper collapsedCompositeTransform->AddTransform( this->CollapseLinearTransforms( compositeTransform ) ); return collapsedCompositeTransform; } - else if( compositeTransform->GetTransformCategory() == TransformType::TransformCategoryType::DisplacementField ) + else if( compositeTransform->GetTransformCategory() == TransformType::TransformCategoryEnum::DisplacementField ) { collapsedCompositeTransform->AddTransform( this->CollapseDisplacementFieldTransforms( compositeTransform ) ); collapsedCompositeTransform->FlattenTransformQueue(); @@ -3614,13 +3614,13 @@ RegistrationHelper } // Find the first linear or displacement field transform - typename TransformType::TransformCategoryType currentTransformCategory = TransformType::TransformCategoryType::UnknownTransformCategory; + typename TransformType::TransformCategoryEnum currentTransformCategory = TransformType::TransformCategoryEnum::UnknownTransformCategory; unsigned int startIndex = 0; for( unsigned int n = 0; n < compositeTransform->GetNumberOfTransforms(); n++ ) { - typename TransformType::TransformCategoryType transformCategory = + typename TransformType::TransformCategoryEnum transformCategory = compositeTransform->GetNthTransform( n )->GetTransformCategory(); - if( transformCategory == TransformType::TransformCategoryType::Linear || transformCategory == TransformType::TransformCategoryType::DisplacementField ) + if( transformCategory == TransformType::TransformCategoryEnum::Linear || transformCategory == TransformType::TransformCategoryEnum::DisplacementField ) { currentTransformCategory = transformCategory; startIndex = n; @@ -3634,24 +3634,24 @@ RegistrationHelper // If a linear or displacement field transform is found then we can break down the // composite transform into neighboring sets of like transform types. - if( currentTransformCategory != TransformType::TransformCategoryType::UnknownTransformCategory ) + if( currentTransformCategory != TransformType::TransformCategoryEnum::UnknownTransformCategory ) { CompositeTransformPointer currentCompositeTransform = CompositeTransformType::New(); currentCompositeTransform->AddTransform( compositeTransform->GetNthTransform( startIndex ) ); for( unsigned int n = startIndex + 1; n < compositeTransform->GetNumberOfTransforms(); n++ ) { - typename TransformType::TransformCategoryType transformCategory = + typename TransformType::TransformCategoryEnum transformCategory = compositeTransform->GetNthTransform( n )->GetTransformCategory(); if( transformCategory == currentTransformCategory ) { currentCompositeTransform->AddTransform( compositeTransform->GetNthTransform( n ) ); if( n == compositeTransform->GetNumberOfTransforms() - 1 ) { - if( currentTransformCategory == TransformType::TransformCategoryType::Linear ) + if( currentTransformCategory == TransformType::TransformCategoryEnum::Linear ) { collapsedCompositeTransform->AddTransform( this->CollapseLinearTransforms( currentCompositeTransform ) ); } - else if( currentTransformCategory == TransformType::TransformCategoryType::DisplacementField ) + else if( currentTransformCategory == TransformType::TransformCategoryEnum::DisplacementField ) { collapsedCompositeTransform->AddTransform( this->CollapseDisplacementFieldTransforms( currentCompositeTransform ) ); @@ -3660,12 +3660,12 @@ RegistrationHelper } else { - if( currentTransformCategory == TransformType::TransformCategoryType::Linear ) + if( currentTransformCategory == TransformType::TransformCategoryEnum::Linear ) { collapsedCompositeTransform->AddTransform( this->CollapseLinearTransforms( currentCompositeTransform ) ); currentCompositeTransform->ClearTransformQueue(); } - else if( currentTransformCategory == TransformType::TransformCategoryType::DisplacementField ) + else if( currentTransformCategory == TransformType::TransformCategoryEnum::DisplacementField ) { collapsedCompositeTransform->AddTransform( this->CollapseDisplacementFieldTransforms( currentCompositeTransform ) ); @@ -3673,7 +3673,7 @@ RegistrationHelper } currentTransformCategory = transformCategory; - if( ( transformCategory == TransformType::TransformCategoryType::Linear || transformCategory == TransformType::TransformCategoryType::DisplacementField ) && + if( ( transformCategory == TransformType::TransformCategoryEnum::Linear || transformCategory == TransformType::TransformCategoryEnum::DisplacementField ) && n < compositeTransform->GetNumberOfTransforms() - 1 ) { currentCompositeTransform->AddTransform( compositeTransform->GetNthTransform( n ) ); diff --git a/ImageRegistration/itkANTSAffine3DTransform.hxx b/ImageRegistration/itkANTSAffine3DTransform.hxx index c071dd841..7de86b16b 100644 --- a/ImageRegistration/itkANTSAffine3DTransform.hxx +++ b/ImageRegistration/itkANTSAffine3DTransform.hxx @@ -604,7 +604,7 @@ void ANTSAffine3DTransform::ComputeMatrixParameters() // InternalMatrixType A, Q, R; - typedef vnl_matrix TMatrix; + typedef vnl_matrix_fixed TMatrix; TMatrix A, R, Q; @@ -650,7 +650,7 @@ void ANTSAffine3DTransform::ComputeMatrixParameters() } if( itk::Math::FloatAlmostEqual( maxTr, trB ) ) { - TMatrix dq(3, 3, 0); + TMatrix dq; dq(0, 0) = 1; dq(1, 1) = -1; dq(2, 2) = -1; @@ -660,7 +660,7 @@ void ANTSAffine3DTransform::ComputeMatrixParameters() if( itk::Math::FloatAlmostEqual( maxTr, trC ) ) { - TMatrix dq(3, 3, 0); + TMatrix dq; dq(0, 0) = -1; dq(1, 1) = 1; dq(2, 2) = -1; @@ -670,7 +670,7 @@ void ANTSAffine3DTransform::ComputeMatrixParameters() if( itk::Math::FloatAlmostEqual( maxTr, trD ) ) { - TMatrix dq(3, 3, 0); + TMatrix dq; dq(0, 0) = -1; dq(1, 1) = -1; dq(2, 2) = 1; diff --git a/ImageRegistration/itkANTSCenteredAffine2DTransform.hxx b/ImageRegistration/itkANTSCenteredAffine2DTransform.hxx index 55c9977c8..d43eb3863 100644 --- a/ImageRegistration/itkANTSCenteredAffine2DTransform.hxx +++ b/ImageRegistration/itkANTSCenteredAffine2DTransform.hxx @@ -102,7 +102,7 @@ void ANTSCenteredAffine2DTransform ::ComputeMatrixParameters( void ) { - typedef vnl_matrix TMatrix; + typedef vnl_matrix_fixed TMatrix; TMatrix A, Q, R; @@ -112,7 +112,7 @@ ANTSCenteredAffine2DTransform R = myqr.Q(); // Q() is the rotation Q = myqr.R(); // R() is the upper triangluar - TMatrix dq(2, 2, 0); + TMatrix dq; for( unsigned i = 0; i < 2; i++ ) { dq(i, i) = (Q(i, i) >= 0) ? 1 : -1; diff --git a/SuperBuild/External_ITKv5.cmake b/SuperBuild/External_ITKv5.cmake index 9a1710bcb..97ff13637 100644 --- a/SuperBuild/External_ITKv5.cmake +++ b/SuperBuild/External_ITKv5.cmake @@ -151,7 +151,7 @@ if(NOT DEFINED ${extProjName}_DIR AND NOT ${USE_SYSTEM_${extProjName}}) ### --- End Project specific additions set(${proj}_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITK.git) # set(${proj}_REPOSITORY ${git_protocol}://github.com/stnava/ITK.git) - set(${proj}_GIT_TAG 49671655c88612fabeb5f0784d3f40123100f166) # 2019-10-30: fixes N4 errors with physical space drifting out of alignment + set(${proj}_GIT_TAG bcd762e7bd743341c2dce84852ced49d8292f293) # Type -> Enum set(ITK_VERSION_ID ITK-5.1) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID ExternalProject_Add(${proj}