Skip to content

Commit

Permalink
A variety of compile fixes which appear when legacy is disabled (#1651)
Browse files Browse the repository at this point in the history
* COMP: The Gaussian label interpolator does not need the vector comparer

Fixes the following compile error:

antsRegistration2DDouble.cxx
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: 'bool ants::VectorPixelCompare<RealType,1>::operator ()(const itk::Vector<TPixel,1> &,const itk::Vector<TPixel,1> &) const': cannot convert argument 1 from 'const _Kty' to 'const itk::Vector<TPixel,1> &' [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: with [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: [ [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: TPixel=RealType [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: ] [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: and [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: [ [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: _Kty=itk::NumericTraits<double>::RealType [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: ] [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: and [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: [ [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: TPixel=RealType [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17): error C2664: ] [C:\Dev\ANTs-VS22\ANTS-build\Examples\antsUtilities.vcxproj]
  (compiling source file '../../../ANTs/Examples/antsRegistration2DDouble.cxx')
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17):
  Reason: cannot convert from 'const _Kty' to 'const itk::Vector<TPixel,1>'
          with
          [
              _Kty=itk::NumericTraits<double>::RealType
          ]
          and
          [
              TPixel=RealType
          ]
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17):
  Constructor for class 'itk::Vector<TPixel,1>' is declared 'explicit'
          with
          [
              TPixel=RealType
          ]
  C:\Dev\ANTs\Examples\antsUtilities.h(376,3):
  see declaration of 'ants::VectorPixelCompare<RealType,1>::operator ()'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17):
  while trying to match the argument list '(const _Kty, const _Keyty)'
          with
          [
              _Kty=itk::NumericTraits<double>::RealType
          ]
          and
          [
              _Keyty=double
          ]
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1610,17):
  the template instantiation context (the oldest one first) is
  	C:\Dev\ANTs\Examples\antsRegistration2DDouble.cxx(10,10):
  	see reference to function template instantiation 'int ants::DoRegistration<double,2>(itk::ants::CommandLineParser::Pointer &)' being compiled
  	C:\Dev\ANTs\Examples\make_interpolator_snip.tmpl(124,1):
  	see reference to class template instantiation 'itk::LabelImageGaussianInterpolateImageFunction<ImageType,RealType,CompareType>' being compiled
  	C:\Dev\ITK-git\Modules\Core\ImageFunction\include\itkLabelImageGaussianInterpolateImageFunction.hxx(41,1):
  	while compiling class template member function 'TOutput itk::LabelImageGaussianInterpolateImageFunction<ImageType,RealType,CompareType>::EvaluateAtContinuousIndex(const itk::ContinuousIndex<TCoordRep,2> &,TOutput *) const'
          with
          [
              TOutput=itk::NumericTraits<double>::RealType,
              TCoordRep=double
          ]
  		C:\Dev\ITK-git\Modules\Core\ImageFunction\include\itkLabelImageGaussianInterpolateImageFunction.h(117,5):
  		see the first reference to 'itk::LabelImageGaussianInterpolateImageFunction<ImageType,RealType,CompareType>::EvaluateAtContinuousIndex' in 'itk::LabelImageGaussianInterpolateImageFunction<ImageType,RealType,CompareType>::EvaluateAtContinuousIndex'
  	C:\Dev\ITK-git\Modules\Core\ImageFunction\include\itkLabelImageGaussianInterpolateImageFunction.hxx(61,17):
  	see reference to class template instantiation 'std::map<TOutput,itk::NumericTraits<double>::RealType,TPixelCompare,std::allocator<std::pair<const TOutput,itk::NumericTraits<double>::RealType>>>' being compiled
          with
          [
              TOutput=itk::NumericTraits<double>::RealType,
              TPixelCompare=CompareType
          ]
  	C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\map(72,20):
  	see reference to class template instantiation 'std::_Tree<std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,false>>' being compiled
          with
          [
              _Kty=itk::NumericTraits<double>::RealType,
              _Ty=itk::NumericTraits<double>::RealType,
              _Pr=CompareType,
              _Alloc=std::allocator<std::pair<const itk::NumericTraits<double>::RealType,itk::NumericTraits<double>::RealType>>
          ]
  	C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1370,25):
  	while compiling class template member function 'std::_Tree_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const TOutput,itk::NumericTraits<double>::RealType>>>> std::_Tree<std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,false>>::find(const double &)'
          with
          [
              TOutput=itk::NumericTraits<double>::RealType,
              _Kty=itk::NumericTraits<double>::RealType,
              _Ty=itk::NumericTraits<double>::RealType,
              _Pr=CompareType,
              _Alloc=std::allocator<std::pair<const itk::NumericTraits<double>::RealType,itk::NumericTraits<double>::RealType>>
          ]
  		C:\Dev\ITK-git\Modules\Core\ImageFunction\include\itkLabelImageGaussianInterpolateImageFunction.hxx(74,36):
  		see the first reference to 'std::_Tree<std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,false>>::find' in 'itk::LabelImageGaussianInterpolateImageFunction<ImageType,RealType,CompareType>::EvaluateAtContinuousIndex'
          with
          [
              _Kty=itk::NumericTraits<double>::RealType,
              _Ty=itk::NumericTraits<double>::RealType,
              _Pr=CompareType,
              _Alloc=std::allocator<std::pair<const itk::NumericTraits<double>::RealType,itk::NumericTraits<double>::RealType>>
          ]
  		C:\Dev\ITK-git\Modules\Core\ImageFunction\include\itkLabelImageGaussianInterpolateImageFunction.h(117,5):
  		see the first reference to 'itk::LabelImageGaussianInterpolateImageFunction<ImageType,RealType,CompareType>::EvaluateAtContinuousIndex' in 'itk::LabelImageGaussianInterpolateImageFunction<ImageType,RealType,CompareType>::EvaluateAtContinuousIndex'
  	C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1371,25):
  	see reference to function template instantiation 'std::_Tree_node<std::pair<const TOutput,itk::NumericTraits<double>::RealType>,std::_Default_allocator_traits<_Alloc>::void_pointer> *std::_Tree<std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,false>>::_Find<double>(const _Other &) const' being compiled
          with
          [
              TOutput=itk::NumericTraits<double>::RealType,
              _Alloc=std::allocator<std::pair<const itk::NumericTraits<double>::RealType,itk::NumericTraits<double>::RealType>>,
              _Kty=itk::NumericTraits<double>::RealType,
              _Ty=itk::NumericTraits<double>::RealType,
              _Pr=CompareType,
              _Other=double
          ]
  	C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xtree(1361,50):
  	see reference to function template instantiation 'std::_Tree_find_result<std::_Tree_node<std::pair<const TOutput,itk::NumericTraits<double>::RealType>,std::_Default_allocator_traits<_Alloc>::void_pointer> *> std::_Tree<std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,false>>::_Find_lower_bound<_Other>(const _Keyty &) const' being compiled
          with
          [
              TOutput=itk::NumericTraits<double>::RealType,
              _Alloc=std::allocator<std::pair<const itk::NumericTraits<double>::RealType,itk::NumericTraits<double>::RealType>>,
              _Kty=itk::NumericTraits<double>::RealType,
              _Ty=itk::NumericTraits<double>::RealType,
              _Pr=CompareType,
              _Other=double,
              _Keyty=double
          ]

* COMP: Fix compile errors related to operations of vector pixels

I don't know whether this is the right thing to do.
I was primarily trying to get it to compile.

* COMP: Fix unused variable warning

Message:

C:\Dev\ANTs\Examples\AverageAffineTransform.cxx(314,40): warning C4101: 'e': unreferenced local variable [C:\Dev\ANTs-SB\ANTS-build\Examples\l_AverageAffineTransform.vcxproj]

* COMP: Fix compile warnings

Example message:

C:\Dev\ANTs\ImageRegistration\itkAvantsMutualInformationRegistrationFunction.cxx(368,54): warning C4834: discarding return value of function with [[nodiscard]] attribute [C:\Dev\ANTs-SB\ANTS-build\Examples\l_ANTS.vcxproj]

Also use the new-style enums.

* ENH: Remove mentions of zlib

* ENH: Remove legacy functionality from ITK

* COMP: Fixing compile errors on Linux

* BUG: setting wrong indices

* BUG: Part of the description was discarded

Ref #1652.

* STYLE: Use // comment and apply clang-format

* ENH: Use a recent version of ITK
  • Loading branch information
dzenanz authored Jan 12, 2024
1 parent 2d3cefa commit 62550fc
Show file tree
Hide file tree
Showing 19 changed files with 120 additions and 110 deletions.
10 changes: 5 additions & 5 deletions Examples/ANTSUseLandmarkImagesToGetBSplineDisplacementField.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "itkImportImageFilter.h"
#include "itkVectorLinearInterpolateImageFunction.h"
#include "itkPointSet.h"
#include "itkFloatTypes.h"

#include <string>
#include <vector>
Expand Down Expand Up @@ -283,7 +284,8 @@ LandmarkBasedDisplacementFieldTransformInitializer(int argc, char * argv[])
}

itk::ContinuousIndex<double, ImageDimension> fixedCidx;
fixedImage->TransformPhysicalPointToContinuousIndex(fixedPhysicalPoint, fixedCidx);
fixedCidx = fixedImage->
template TransformPhysicalPointToContinuousIndex<double, itk::SpacePrecisionType>(fixedPhysicalPoint);

typename DisplacementFieldType::PointType fieldPoint;
parametricInputImage->TransformContinuousIndexToPhysicalPoint(fixedCidx, fieldPoint);
Expand Down Expand Up @@ -540,13 +542,11 @@ ANTSUseLandmarkImagesToGetBSplineDisplacementField(std::vector<std::string> args

switch (imageIO->GetNumberOfDimensions())
{
case 2:
{
case 2: {
LandmarkBasedDisplacementFieldTransformInitializer<2>(argc, argv);
}
break;
case 3:
{
case 3: {
LandmarkBasedDisplacementFieldTransformInitializer<3>(argc, argv);
}
break;
Expand Down
34 changes: 17 additions & 17 deletions Examples/Atropos.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1322,25 +1322,25 @@ AtroposInitializeCommandLineOptions(itk::ants::CommandLineParser * parser)
}

{
std::string description = std::string("Different posterior probability formulations are possible as ") +
std::string("are different update options. To guarantee theoretical ") +
std::string("convergence properties, a proper formulation of the well-known ") +
std::string("iterated conditional modes (ICM) uses an asynchronous update step ") +
std::string("modulated by a specified annealing temperature. If one sets ") +
std::string("the AnnealingTemperature > 1 in the posterior formulation ") +
std::string("a traditional code set for a proper ICM update will be created. ") +
std::string("Otherwise, a synchronous update step will take place at each iteration. ") +
std::string("The annealing temperature, T, converts the posteriorProbability ") +
std::string("to posteriorProbability^(1/T) over the course of optimization. ");
std::string("Options include the following: ") +
std::string description =
std::string("Different posterior probability formulations are possible as ") +
std::string("are different update options. To guarantee theoretical ") +
std::string("convergence properties, a proper formulation of the well-known ") +
std::string("iterated conditional modes (ICM) uses an asynchronous update step ") +
std::string("modulated by a specified annealing temperature. If one sets ") +
std::string("the AnnealingTemperature > 1 in the posterior formulation ") +
std::string("a traditional code set for a proper ICM update will be created. ") +
std::string("Otherwise, a synchronous update step will take place at each iteration. ") +
std::string("The annealing temperature, T, converts the posteriorProbability ") +
std::string("to posteriorProbability^(1/T) over the course of optimization. ") +
std::string("Options include the following: ") +
std::string(" Socrates: posteriorProbability = (spatialPrior)^priorWeight") +
std::string("*(likelihood*mrfPrior)^(1-priorWeight), ") + std::string(" Plato: posteriorProbability = 1.0, ") +
std::string(" Aristotle: posteriorProbability = 1.0, ") +
std::string(" Sigmoid: posteriorProbability = 1.0, ") /* +
std::string( " Zeno: posteriorProbability = 1.0\n" ) +
std::string( " Diogenes: posteriorProbability = 1.0\n" ) +
std::string( " Thales: posteriorProbability = 1.0\n" ) +
std::string( " Democritus: posteriorProbability = 1.0.\n" ) */
std::string(" Aristotle: posteriorProbability = 1.0, ") + std::string(" Sigmoid: posteriorProbability = 1.0, ")
// std::string( " Zeno: posteriorProbability = 1.0\n" ) +
// std::string( " Diogenes: posteriorProbability = 1.0\n" ) +
// std::string( " Thales: posteriorProbability = 1.0\n" ) +
// std::string( " Democritus: posteriorProbability = 1.0.\n" )
;

OptionType::Pointer option = OptionType::New();
Expand Down
2 changes: 1 addition & 1 deletion Examples/AverageAffineTransform.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ AverageAffineTransform(std::vector<std::string> args, std::ostream * /*out_strea
{
kImageDim = std::stoi(argv[1]);
}
catch (const std::invalid_argument & e)
catch (const std::invalid_argument &)
{
std::cerr << "Invalid image dimension: " << argv[1] << std::endl;
return EXIT_FAILURE;
Expand Down
4 changes: 3 additions & 1 deletion Examples/CreateTiledMosaic.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,9 @@ CreateMosaic(itk::ants::CommandLineParser * parser)
rgbPadder->SetInput(rgbExtracter->GetOutput());
rgbPadder->SetPadLowerBound(lowerBound);
rgbPadder->SetPadUpperBound(upperBound);
rgbPadder->SetConstant(static_cast<PixelType>(padValue));
RgbPixelType rgbPadValue;
rgbPadValue.Fill(padValue);
rgbPadder->SetConstant(rgbPadValue);

outputRgbSlice = rgbPadder->GetOutput();
outputRgbSlice->Update();
Expand Down
3 changes: 2 additions & 1 deletion Examples/DeNrrd.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <itkNrrdImageIO.h>
#include <itkVectorImage.h>
#include <itkVariableLengthVector.h>
#include <itkCommonEnums.h>

#include <itkMetaDataDictionary.h>

Expand Down Expand Up @@ -113,7 +114,7 @@ DeNrrd(std::vector<std::string> args, std::ostream * /*out_stream = nullptr */)

itk::NrrdImageIO::Pointer io = itk::NrrdImageIO::New();
// io->SetNrrdVectorType( nrrdKindList );
io->SetFileType(itk::ImageIOBase::ASCII);
io->SetFileType(itk::CommonEnums::IOFile::ASCII);

// std::cout << "Number of dwi values " << reader->GetOutput()->GetNumberOfComponentsPerPixel() << std::endl;

Expand Down
12 changes: 8 additions & 4 deletions Examples/ImageMath_Templates.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -3756,8 +3756,8 @@ TimeSeriesToMatrix(int argc, char * argv[])
{
typename MatrixImageType::IndexType matind;
matind.Fill(0);
matind[1] = t;
matind[2] = voxct;
matind[0] = t;
matind[1] = voxct;
tind[ImageDimension - 1] = t;
Scalar pix = image1->GetPixel(tind);
mSample(t) = pix;
Expand Down Expand Up @@ -5916,7 +5916,11 @@ VImageMath(int argc, char * argv[])

if (strcmp(operation.c_str(), "vm") == 0)
{
result = pix1 * pix2;
// element-wise multiplication
for (unsigned d = 0; d < pix1.GetNumberOfComponents(); ++d)
{
result[d] = pix1[d] * pix2[d];
}
}
else if (strcmp(operation.c_str(), "v+") == 0)
{
Expand All @@ -5933,7 +5937,7 @@ VImageMath(int argc, char * argv[])
}
else if (strcmp(operation.c_str(), "vtotal") == 0)
{
result += pix1 * pix2;
result.Fill(pix1 * pix2);
}
vfIter2.Set(result);
}
Expand Down
8 changes: 7 additions & 1 deletion Examples/MultiplyImages.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,13 @@ MultiplyImages(int argc, char * argv[])
}
else
{
vfIter2.Set(pix1 * image2->GetPixel(ind));
// element-wise multiplication
PixelType result = image2->GetPixel(ind);
for (unsigned d = 0; d < pix1.GetNumberOfComponents(); ++d)
{
result[d] *= pix1[d];
}
vfIter2.Set(result);
}
}
typename writertype::Pointer writer = writertype::New();
Expand Down
104 changes: 52 additions & 52 deletions Examples/PrintHeader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,58 +52,58 @@ try_print_metadata(itk::MetaDataDictionary & mdd, std::string key)
}

string
get_rai_code(itk::SpatialOrientation::ValidCoordinateOrientationFlags code)
get_rai_code(itk::SpatialOrientationEnums::ValidCoordinateOrientations code)
{
std::map<itk::SpatialOrientation::ValidCoordinateOrientationFlags, string> m_CodeToString;

m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RIP] = "RIP";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LIP] = "LIP";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RSP] = "RSP";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LSP] = "LSP";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RIA] = "RIA";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LIA] = "LIA";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RSA] = "RSA";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LSA] = "LSA";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_IRP] = "IRP";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_ILP] = "ILP";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_SRP] = "SRP";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_SLP] = "SLP";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_IRA] = "IRA";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_ILA] = "ILA";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_SRA] = "SRA";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_SLA] = "SLA";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RPI] = "RPI";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LPI] = "LPI";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RAI] = "RAI";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LAI] = "LAI";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RPS] = "RPS";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LPS] = "LPS";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RAS] = "RAS";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LAS] = "LAS";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_PRI] = "PRI";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_PLI] = "PLI";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_ARI] = "ARI";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_ALI] = "ALI";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_PRS] = "PRS";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_PLS] = "PLS";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_ARS] = "ARS";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_ALS] = "ALS";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_IPR] = "IPR";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_SPR] = "SPR";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_IAR] = "IAR";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_SAR] = "SAR";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_IPL] = "IPL";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_SPL] = "SPL";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_IAL] = "IAL";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_SAL] = "SAL";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_PIR] = "PIR";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_PSR] = "PSR";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_AIR] = "AIR";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_ASR] = "ASR";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_PIL] = "PIL";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_PSL] = "PSL";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_AIL] = "AIL";
m_CodeToString[itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_ASL] = "ASL";
std::map<itk::SpatialOrientationEnums::ValidCoordinateOrientations, string> m_CodeToString;

m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_RIP] = "RIP";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_LIP] = "LIP";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_RSP] = "RSP";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_LSP] = "LSP";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_RIA] = "RIA";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_LIA] = "LIA";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_RSA] = "RSA";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_LSA] = "LSA";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_IRP] = "IRP";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_ILP] = "ILP";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_SRP] = "SRP";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_SLP] = "SLP";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_IRA] = "IRA";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_ILA] = "ILA";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_SRA] = "SRA";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_SLA] = "SLA";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_RPI] = "RPI";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_LPI] = "LPI";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_RAI] = "RAI";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_LAI] = "LAI";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_RPS] = "RPS";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_LPS] = "LPS";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_RAS] = "RAS";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_LAS] = "LAS";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_PRI] = "PRI";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_PLI] = "PLI";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_ARI] = "ARI";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_ALI] = "ALI";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_PRS] = "PRS";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_PLS] = "PLS";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_ARS] = "ARS";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_ALS] = "ALS";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_IPR] = "IPR";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_SPR] = "SPR";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_IAR] = "IAR";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_SAR] = "SAR";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_IPL] = "IPL";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_SPL] = "SPL";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_IAL] = "IAL";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_SAL] = "SAL";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_PIR] = "PIR";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_PSR] = "PSR";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_AIR] = "AIR";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_ASR] = "ASR";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_PIL] = "PIL";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_PSL] = "PSL";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_AIL] = "AIL";
m_CodeToString[itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_ASL] = "ASL";
return m_CodeToString[code];
}

Expand Down Expand Up @@ -280,7 +280,7 @@ PrintHeader(int argc, char * argv[])
{
// Get the metadata as a generic object
string key = itMeta->first, v_string;
itk::SpatialOrientation::ValidCoordinateOrientationFlags v_oflags =
itk::SpatialOrientationEnums::ValidCoordinateOrientations v_oflags =
itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_INVALID;

if (itk::ExposeMetaData<string>(mdd, key, v_string))
Expand Down
4 changes: 2 additions & 2 deletions Examples/antsJointTensorFusion.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ antsJointTensorFusion(itk::ants::CommandLineParser * parser)
ConvertToLowerCase(metricString);
if (metricString.compare("pc") == 0)
{
fusionFilter->SetSimilarityMetric(FusionFilterType::PEARSON_CORRELATION);
fusionFilter->SetSimilarityMetric(itk::NonLocalPatchBasedImageFilterEnums::SimilarityMetric::PEARSON_CORRELATION);
}
else if (metricString.compare("msq") == 0)
{
fusionFilter->SetSimilarityMetric(FusionFilterType::MEAN_SQUARES);
fusionFilter->SetSimilarityMetric(itk::NonLocalPatchBasedImageFilterEnums::SimilarityMetric::MEAN_SQUARES);
}
else
{
Expand Down
7 changes: 5 additions & 2 deletions Examples/antsLandmarkBasedTransformInitializer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "itkRigid2DTransform.h"
#include "itkVersorRigid3DTransform.h"
#include "itkTransformFileWriter.h"
#include "itkFloatTypes.h"

#include <string>
#include <vector>
Expand Down Expand Up @@ -372,10 +373,12 @@ InitializeBSplineTransform(int argc, char * argv[])
}

itk::ContinuousIndex<double, ImageDimension> fixedCidx;
fixedImage->TransformPhysicalPointToContinuousIndex(fixedPhysicalPoint, fixedCidx);
fixedCidx = fixedImage->
template TransformPhysicalPointToContinuousIndex<double, itk::SpacePrecisionType>(fixedPhysicalPoint);

typename DisplacementFieldType::PointType fieldPoint;
parametricInputImage->TransformContinuousIndexToPhysicalPoint(fixedCidx, fieldPoint);
fieldPoint = parametricInputImage->
template TransformContinuousIndexToPhysicalPoint<double, itk::SpacePrecisionType>(fixedCidx);

fieldPoints->SetPoint(count, fieldPoint);
fieldPoints->SetPointData(count, vector);
Expand Down
Loading

0 comments on commit 62550fc

Please sign in to comment.