Skip to content

Commit

Permalink
Type->Enum // added .as_ref() // adjust ITK git tag
Browse files Browse the repository at this point in the history
  • Loading branch information
crossmanith committed Feb 4, 2020
1 parent f028a73 commit 31f18fe
Show file tree
Hide file tree
Showing 40 changed files with 74 additions and 74 deletions.
4 changes: 2 additions & 2 deletions Examples/ANTS.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@ int ANTS( std::vector<std::string> 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;
Expand Down
2 changes: 1 addition & 1 deletion Examples/ANTSIntegrateVectorField.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ int ANTSIntegrateVectorField( std::vector<std::string> 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();
Expand Down
2 changes: 1 addition & 1 deletion Examples/ANTSIntegrateVelocityField.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ int ANTSIntegrateVelocityField( std::vector<std::string> 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();
Expand Down
2 changes: 1 addition & 1 deletion Examples/ANTSUseLandmarkImagesToGetAffineTransform.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ int ANTSUseLandmarkImagesToGetAffineTransform( std::vector<std::string> 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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ int ANTSUseLandmarkImagesToGetBSplineDisplacementField( std::vector<std::string>
// 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();

Expand Down
2 changes: 1 addition & 1 deletion Examples/Atropos.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ int Atropos( std::vector<std::string> 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();
}

Expand Down
6 changes: 3 additions & 3 deletions Examples/AverageImages.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -326,7 +326,7 @@ int AverageImages( std::vector<std::string> 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();
Expand Down
2 changes: 1 addition & 1 deletion Examples/AverageTensorImages.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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++ )
Expand Down
2 changes: 1 addition & 1 deletion Examples/ConvertImagePixelType.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ int ConvertImagePixelType( std::vector<std::string> 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();

Expand Down
2 changes: 1 addition & 1 deletion Examples/ConvertInputImagePixelTypeToFloat.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ int ConvertInputImagePixelTypeToFloat( std::vector<std::string> 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();

Expand Down
2 changes: 1 addition & 1 deletion Examples/ConvertToJpg.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int ConvertToJpg( std::vector<std::string> 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();

Expand Down
2 changes: 1 addition & 1 deletion Examples/CopyImageHeaderInformation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ int CopyImageHeaderInformation( std::vector<std::string> 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();
Expand Down
2 changes: 1 addition & 1 deletion Examples/CreateDTICohort.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ int CreateDTICohort( std::vector<std::string> 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();
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/CreateTiledMosaic.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ int CreateTiledMosaic( std::vector<std::string> 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 )
Expand Down
2 changes: 1 addition & 1 deletion Examples/DenoiseImage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ int DenoiseImage( std::vector<std::string> 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();
}

Expand Down
8 changes: 4 additions & 4 deletions Examples/ImageMath_Templates.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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++ )
Expand Down Expand Up @@ -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++ )
Expand Down
2 changes: 1 addition & 1 deletion Examples/KellyKapowski.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ int KellyKapowski( std::vector<std::string> 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();
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/LaplacianThickness.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ int LaplacianThickness( std::vector<std::string> 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();
Expand Down
2 changes: 1 addition & 1 deletion Examples/MeasureMinMaxMean.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ int MeasureMinMaxMean( std::vector<std::string> 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();
Expand Down
2 changes: 1 addition & 1 deletion Examples/MultiplyImages.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ int MultiplyImages( std::vector<std::string> 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();
Expand Down
2 changes: 1 addition & 1 deletion Examples/N4BiasFieldCorrection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ int N4BiasFieldCorrection( std::vector<std::string> 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();
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/NonLocalSuperResolution.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ int NonLocalSuperResolution( std::vector<std::string> 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();
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/PrintHeader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ int PrintHeader( std::vector<std::string> 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
{
Expand Down
2 changes: 1 addition & 1 deletion Examples/ResetDirection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ int ResetDirection( std::vector<std::string> 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();

Expand Down
2 changes: 1 addition & 1 deletion Examples/SetDirectionByMatrix.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int SetDirectionByMatrix( std::vector<std::string> 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();

Expand Down
2 changes: 1 addition & 1 deletion Examples/StudentsTestOnImages.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Examples/WarpImageMultiTransform.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ int WarpImageMultiTransform( std::vector<std::string> 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();
Expand Down
2 changes: 1 addition & 1 deletion Examples/WarpTimeSeriesImageMultiTransform.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
12 changes: 6 additions & 6 deletions Examples/antsAI.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion Examples/antsAlignOrigin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ int antsAlignOrigin( std::vector<std::string> 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 =
Expand Down
2 changes: 1 addition & 1 deletion Examples/antsJointFusion.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ int antsJointFusion( std::vector<std::string> 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();
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/antsJointTensorFusion.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ int antsJointTensorFusion( std::vector<std::string> 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();
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/antsMotionCorrDiffusionDirection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Loading

0 comments on commit 31f18fe

Please sign in to comment.