# Rename Virtual Domain Accessors In Metricsv4

Michael Stauffer
2012-05-24
The virtual domain code within the Metricv4 classes was moved from ImageToImageMetricv4 to ObjectToObjectMetric, so it can also be used by PointSetToPointSetMetricv4 classes. Several accessor names relating to the virtual domain were changed to provide more consistency with similar accessors within the related classes, and to provide better naming for possible future changes to the way the virtual domain is stored and managed. The member variable for the virtual domain and the typename for the sample point set were also changed for similar reasons.
MyMetricv4Type::Pointer metric = MyMetricv4Type::New();

//Setup a virtual domain if( myImage.IsNull() ) { metric->CreateVirtualDomainImage( spacing, origin, direction, region ); } else { metric->SetVirtualDomainImage( myImage ); }

// Print out the virutal domain information std::cout << "Spacing : " << metric->GetVirtualDomainSpacing() << std::endl; std::cout << "Origin : " << metric->GetVirtualDomainOrigin() << std::endl; std::cout << "Direciton: " << metric->GetVirtualDomainDirection() << std::endl; std::cout << "Region : " << metric->GetVirtualDomainRegion() << std::endl; std::cout << "Image : " << metric->GetVirtualDomainImage() << std::endl;

// Get the virtual sampled point set MyMetricType::VirtualSampledPointSetType::Pointer pointSet = metric->GetVirtualSampledPointSet(); MyMetricType::VirtualSampledPointSetPointer pointSetAgain = metric->GetVirtualSampledPointSet();
MyMetricv4Type::Pointer metric = MyMetricv4Type::New();

//Setup a virtual domain if( myImage.IsNull() ) { metric->SetVirtualDomain( spacing, origin, direction, region ); } else { metric->SetVirtualDomainFromImage( myImage ); }

// Print out the virutal domain information std::cout << "Spacing : " << metric->GetVirtualSpacing() << std::endl; std::cout << "Origin : " << metric->GetVirtualOrigin() << std::endl; std::cout << "Direciton: " << metric->GetVirtualDirection() << std::endl; std::cout << "Region : " << metric->GetVirtualRegion() << std::endl; std::cout << "Image : " << metric->GetVirtualImage() << std::endl;

// Get the virtual sampled point set MyMetricType::VirtualPointSetType::Pointer pointSet = metric->GetVirtualSampledPointSet(); MyMetricType::VirtualPointSetPointer pointSetAgain = metric->GetVirtualSampledPointSet();
I178f48c2df6535900661b6643bd2e29db53c64ec
Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.h Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromIndexShift.h Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromIndexShift.hxx Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.h Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.hxx Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShift.h Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShift.hxx Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.h Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx Modules/Numerics/Optimizersv4/itk-module.cmake Modules/Numerics/Optimizersv4/src/itkGradientDescentOptimizerv4.cxx Modules/Numerics/Optimizersv4/test/CMakeLists.txt Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationTest.cxx Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx Modules/Numerics/Optimizersv4/test/itkQuasiNewtonOptimizerv4Test.cxx Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesEstimatorTest.cxx Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromIndexShiftTest.cxx Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromJacobianTest.cxx Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftTest.cxx Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromShiftTest.cxx Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4.hxx Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4DenseGetValueAndDerivativeThreader.hxx Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.hxx Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.h Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.hxx Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.hxx Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.hxx Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.hxx Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx Modules/Registration/Metricsv4/test/CMakeLists.txt Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest.cxx Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricTest.cxx Modules/Registration/Metricsv4/test/itkImageToImageMetricv4RegistrationTest.cxx Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricTest.cxx Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx Modules/Registration/Metricsv4/test/itkMetricImageGradientTest.cxx Modules/Registration/Metricsv4/test/itkMultiGradientImageToImageMetricv4RegistrationTest.cxx Modules/Registration/Metricsv4/test/itkMultiStartImageToImageMetricv4RegistrationTest.cxx Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.hxx Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx Modules/Registration/RegistrationMethodsv4/test/CMakeLists.txt Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx
CreateVirtualDomainImage
SetVirtualDomain
SetVirtualDomainImage
SetVirtualDomainFromImage
GetVirtualDomainSpacing
GetVirtualSpacing
GetVirtualDomainOrigin
GetVirtualOrigin
GetVirtualDomainDirection
GetVirtualDirection
GetVirtualDomainRegion
GetVirtualRegion
GetVirtualDomainImage
GetVirtualImage
VirtualSampledPointSetType
VirtualPointSetType
VirtualSampledPointSetPointer
VirtualPointSetPointer