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;
429 itkStaticConstMacro(DeformationSplineOrder,
unsigned int, 3);
432 FixedImageType ::ImageDimension,
480 virtual void PreComputeTransformValues(
void);
484 virtual void TransformPoint(
unsigned int sampleNumber,
486 bool & sampleWithinSupportRegion,
487 double & movingImageValue,
490 virtual void TransformPointWithDerivatives(
unsigned int sampleNumber,
492 bool & sampleWithinSupportRegion,
493 double & movingImageValue,
525 void GetValueMultiThreadedPreProcessInitiate(
void)
const;
527 void GetValueMultiThreadedInitiate(
void)
const;
529 void GetValueMultiThreadedPostProcessInitiate(
void)
const;
537 virtual inline void GetValueThread(
ThreadIdType threadID)
const;
539 virtual inline void GetValueThreadPreProcess(
541 bool itkNotUsed(withinSampleThread) )
const
543 virtual inline bool GetValueThreadProcessSample(
547 double itkNotUsed(movingImageValue) )
const
549 virtual inline void GetValueThreadPostProcess(
551 bool itkNotUsed(withinSampleThread) )
const
554 void GetValueAndDerivativeMultiThreadedPreProcessInitiate(
void)
const;
556 void GetValueAndDerivativeMultiThreadedInitiate(
void)
const;
558 void GetValueAndDerivativeMultiThreadedPostProcessInitiate(
void)
const;
566 virtual inline void GetValueAndDerivativeThread(
ThreadIdType threadID)
const;
568 virtual inline void GetValueAndDerivativeThreadPreProcess(
570 bool itkNotUsed(withinSampleThread) )
const
572 virtual inline bool GetValueAndDerivativeThreadProcessSample(
576 double itkNotUsed(movingImageValue),
579 virtual inline void GetValueAndDerivativeThreadPostProcess(
581 bool itkNotUsed(withinSampleThread) )
const
587 virtual void SynchronizeTransforms()
const;
591 void operator=(
const Self &);
597 #ifndef ITK_MANUAL_INSTANTIATION
598 #include "itkImageToImageMetric.hxx"