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) >
168 return this->GetNumberOfPixelsCounted();
171 itkGetConstReferenceMacro(NumberOfPixelsCounted,
SizeValueType);
174 void SetFixedImageRegion(
const FixedImageRegionType reg);
177 itkGetConstReferenceMacro(FixedImageRegion, FixedImageRegionType);
180 itkSetObjectMacro(MovingImageMask, MovingImageMaskType);
181 itkSetConstObjectMacro(MovingImageMask, MovingImageMaskType);
182 itkGetConstObjectMacro(MovingImageMask, MovingImageMaskType);
186 itkSetObjectMacro(FixedImageMask, FixedImageMaskType);
187 itkSetConstObjectMacro(FixedImageMask, FixedImageMaskType);
188 itkGetConstObjectMacro(FixedImageMask, FixedImageMaskType);
193 void SetFixedImageIndexes(
const FixedImageIndexContainer & indexes);
195 void SetUseFixedImageIndexes(
bool useIndex);
197 itkGetConstReferenceMacro(UseFixedImageIndexes,
bool);
201 itkGetConstReferenceMacro(NumberOfThreads,
ThreadIdType);
205 itkSetMacro(ComputeGradient,
bool);
206 itkGetConstReferenceMacro(ComputeGradient,
bool);
207 itkBooleanMacro(ComputeGradient);
211 virtual void ComputeGradient(
void);
214 itkGetModifiableObjectMacro(GradientImage, GradientImageType);
217 void SetTransformParameters(
const ParametersType & parameters)
const;
220 unsigned int GetNumberOfParameters(
void)
const
222 return m_Transform->GetNumberOfParameters();
227 virtual void Initialize(
void)
231 virtual
void MultiThreadingInitialize(
void) throw ( ExceptionObject );
235 virtual
void SetNumberOfFixedImageSamples(
SizeValueType numSamples);
236 itkGetConstReferenceMacro(NumberOfFixedImageSamples,
SizeValueType);
241 void SetNumberOfSpatialSamples(SizeValueType num)
243 this->SetNumberOfFixedImageSamples(num);
248 return this->GetNumberOfFixedImageSamples();
253 void SetFixedImageSamplesIntensityThreshold(
const FixedImagePixelType & thresh);
255 itkGetConstReferenceMacro(FixedImageSamplesIntensityThreshold, FixedImagePixelType);
257 void SetUseFixedImageSamplesIntensityThreshold(
bool useThresh);
259 itkGetConstReferenceMacro(UseFixedImageSamplesIntensityThreshold,
bool);
264 void SetUseAllPixels(
bool useAllPixels);
266 void UseAllPixelsOn(
void)
268 this->SetUseAllPixels(
true);
271 void UseAllPixelsOff(
void)
273 this->SetUseAllPixels(
false);
276 itkGetConstReferenceMacro(UseAllPixels,
bool);
282 void SetUseSequentialSampling(
bool sequentialSampling);
284 itkGetConstReferenceMacro(UseSequentialSampling,
bool);
295 void ReinitializeSeed();
296 void ReinitializeSeed(
int seed);
315 itkSetMacro(UseCachingOfBSplineWeights,
bool);
316 itkGetConstReferenceMacro(UseCachingOfBSplineWeights,
bool);
317 itkBooleanMacro(UseCachingOfBSplineWeights);
325 return m_ThreaderTransform;
333 void PrintSelf(std::ostream & os,
Indent indent)
const;
427 itkStaticConstMacro(DeformationSplineOrder,
unsigned int, 3);
430 FixedImageType ::ImageDimension,
478 virtual void PreComputeTransformValues(
void);
482 virtual void TransformPoint(
unsigned int sampleNumber,
484 bool & sampleWithinSupportRegion,
485 double & movingImageValue,
488 virtual void TransformPointWithDerivatives(
unsigned int sampleNumber,
490 bool & sampleWithinSupportRegion,
491 double & movingImageValue,
523 void GetValueMultiThreadedPreProcessInitiate(
void)
const;
525 void GetValueMultiThreadedInitiate(
void)
const;
527 void GetValueMultiThreadedPostProcessInitiate(
void)
const;
535 virtual inline void GetValueThread(
ThreadIdType threadID)
const;
537 virtual inline void GetValueThreadPreProcess(
539 bool itkNotUsed(withinSampleThread) )
const
541 virtual inline bool GetValueThreadProcessSample(
545 double itkNotUsed(movingImageValue) )
const
547 virtual inline void GetValueThreadPostProcess(
549 bool itkNotUsed(withinSampleThread) )
const
552 void GetValueAndDerivativeMultiThreadedPreProcessInitiate(
void)
const;
554 void GetValueAndDerivativeMultiThreadedInitiate(
void)
const;
556 void GetValueAndDerivativeMultiThreadedPostProcessInitiate(
void)
const;
564 virtual inline void GetValueAndDerivativeThread(
ThreadIdType threadID)
const;
566 virtual inline void GetValueAndDerivativeThreadPreProcess(
568 bool itkNotUsed(withinSampleThread) )
const
570 virtual inline bool GetValueAndDerivativeThreadProcessSample(
574 double itkNotUsed(movingImageValue),
577 virtual inline void GetValueAndDerivativeThreadPostProcess(
579 bool itkNotUsed(withinSampleThread) )
const
585 virtual void SynchronizeTransforms()
const;
589 void operator=(
const Self &);
595 #ifndef ITK_MANUAL_INSTANTIATION
596 #include "itkImageToImageMetric.hxx"