18 #ifndef __itkImageToImageMetric_h
19 #define __itkImageToImageMetric_h
50 template<
class TFixedImage,
class TMovingImage >
79 itkStaticConstMacro(MovingImageDimension,
81 TMovingImage::ImageDimension);
82 itkStaticConstMacro(FixedImageDimension,
84 TFixedImage::ImageDimension);
89 itkGetStaticConstMacro(MovingImageDimension),
90 itkGetStaticConstMacro(FixedImageDimension) >
170 return this->GetNumberOfPixelsCounted();
173 itkGetConstReferenceMacro(NumberOfPixelsCounted,
SizeValueType);
176 void SetFixedImageRegion(
const FixedImageRegionType reg);
179 itkGetConstReferenceMacro(FixedImageRegion, FixedImageRegionType);
182 itkSetObjectMacro(MovingImageMask, MovingImageMaskType);
183 itkSetConstObjectMacro(MovingImageMask, MovingImageMaskType);
184 itkGetConstObjectMacro(MovingImageMask, MovingImageMaskType);
188 itkSetObjectMacro(FixedImageMask, FixedImageMaskType);
189 itkSetConstObjectMacro(FixedImageMask, FixedImageMaskType);
190 itkGetConstObjectMacro(FixedImageMask, FixedImageMaskType);
195 void SetFixedImageIndexes(
const FixedImageIndexContainer & indexes);
197 void SetUseFixedImageIndexes(
bool useIndex);
199 itkGetConstReferenceMacro(UseFixedImageIndexes,
bool);
203 itkGetConstReferenceMacro(NumberOfThreads,
ThreadIdType);
207 itkSetMacro(ComputeGradient,
bool);
208 itkGetConstReferenceMacro(ComputeGradient,
bool);
209 itkBooleanMacro(ComputeGradient);
213 virtual void ComputeGradient(
void);
216 itkGetConstObjectMacro(GradientImage, GradientImageType);
219 void SetTransformParameters(
const ParametersType & parameters)
const;
222 unsigned int GetNumberOfParameters(
void)
const
224 return m_Transform->GetNumberOfParameters();
229 virtual void Initialize(
void)
233 virtual
void MultiThreadingInitialize(
void) throw ( ExceptionObject );
237 virtual
void SetNumberOfFixedImageSamples(
SizeValueType numSamples);
238 itkGetConstReferenceMacro(NumberOfFixedImageSamples,
SizeValueType);
243 void SetNumberOfSpatialSamples(SizeValueType num)
245 this->SetNumberOfFixedImageSamples(num);
250 return this->GetNumberOfFixedImageSamples();
255 void SetFixedImageSamplesIntensityThreshold(
const FixedImagePixelType & thresh);
257 itkGetConstReferenceMacro(FixedImageSamplesIntensityThreshold, FixedImagePixelType);
259 void SetUseFixedImageSamplesIntensityThreshold(
bool useThresh);
261 itkGetConstReferenceMacro(UseFixedImageSamplesIntensityThreshold,
bool);
266 void SetUseAllPixels(
bool useAllPixels);
268 void UseAllPixelsOn(
void)
270 this->SetUseAllPixels(
true);
273 void UseAllPixelsOff(
void)
275 this->SetUseAllPixels(
false);
278 itkGetConstReferenceMacro(UseAllPixels,
bool);
284 void SetUseSequentialSampling(
bool sequentialSampling);
286 itkGetConstReferenceMacro(UseSequentialSampling,
bool);
297 void ReinitializeSeed();
298 void ReinitializeSeed(
int seed);
317 itkSetMacro(UseCachingOfBSplineWeights,
bool);
318 itkGetConstReferenceMacro(UseCachingOfBSplineWeights,
bool);
319 itkBooleanMacro(UseCachingOfBSplineWeights);
327 return m_ThreaderTransform;
335 void PrintSelf(std::ostream & os,
Indent indent)
const;
428 itkStaticConstMacro(DeformationSplineOrder,
unsigned int, 3);
479 virtual void PreComputeTransformValues(
void);
483 virtual void TransformPoint(
unsigned int sampleNumber,
485 bool & sampleWithinSupportRegion,
486 double & movingImageValue,
489 virtual void TransformPointWithDerivatives(
unsigned int sampleNumber,
491 bool & sampleWithinSupportRegion,
492 double & movingImageValue,
524 void GetValueMultiThreadedPreProcessInitiate(
void)
const;
526 void GetValueMultiThreadedInitiate(
void)
const;
528 void GetValueMultiThreadedPostProcessInitiate(
void)
const;
536 virtual inline void GetValueThread(
ThreadIdType threadID)
const;
538 virtual inline void GetValueThreadPreProcess(
540 bool itkNotUsed(withinSampleThread) )
const
542 virtual inline bool GetValueThreadProcessSample(
546 double itkNotUsed(movingImageValue) )
const
548 virtual inline void GetValueThreadPostProcess(
550 bool itkNotUsed(withinSampleThread) )
const
553 void GetValueAndDerivativeMultiThreadedPreProcessInitiate(
void)
const;
555 void GetValueAndDerivativeMultiThreadedInitiate(
void)
const;
557 void GetValueAndDerivativeMultiThreadedPostProcessInitiate(
void)
const;
565 virtual inline void GetValueAndDerivativeThread(
ThreadIdType threadID)
const;
567 virtual inline void GetValueAndDerivativeThreadPreProcess(
569 bool itkNotUsed(withinSampleThread) )
const
571 virtual inline bool GetValueAndDerivativeThreadProcessSample(
575 double itkNotUsed(movingImageValue),
578 virtual inline void GetValueAndDerivativeThreadPostProcess(
580 bool itkNotUsed(withinSampleThread) )
const
586 virtual void SynchronizeTransforms()
const;
590 void operator=(
const Self &);
596 #ifndef ITK_MANUAL_INSTANTIATION
597 #include "itkImageToImageMetric.hxx"