ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkObjectToObjectMultiMetricv4.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef itkObjectToObjectMultiMetricv4_h
20 #define itkObjectToObjectMultiMetricv4_h
21 
23 #include "itkArray.h"
24 #include <deque>
25 
26 namespace itk
27 {
92 template<unsigned int TFixedDimension, unsigned int TMovingDimension, typename TVirtualImage = Image<double, TFixedDimension>, class TInternalComputationValueType = double >
94  public ObjectToObjectMetric<TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType>
95 {
96 public:
102 
105 
107  itkNewMacro( Self );
108 
110  typedef typename Superclass::MeasureType MeasureType;
119 
124  typedef std::deque<MetricBasePointer> MetricQueueType;
125 
127 
128  typedef typename DerivativeType::ValueType WeightValueType;
131 
132  itkSetMacro(MetricWeights,WeightsArrayType);
133  itkGetMacro(MetricWeights,WeightsArrayType);
134 
136  void AddMetric( MetricType* metric );
137 
139  void ClearMetricQueue();
140 
143 
144  void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE;
145 
147  virtual void SetFixedObject( const ObjectType *itkNotUsed( object ) ) ITK_OVERRIDE
148  {
149  itkExceptionMacro( "A single object should not be specified for the multi metric.");
150  }
151 
153  virtual void SetMovingObject( const ObjectType *itkNotUsed( object ) ) ITK_OVERRIDE
154  {
155  itkExceptionMacro( "A single object should not be specified for the multi metric.");
156  }
157 
159  virtual void SetMovingTransform( MovingTransformType * ) ITK_OVERRIDE;
160 
162  virtual void SetFixedTransform( FixedTransformType * ) ITK_OVERRIDE;
163 
168  MeasureType GetValue() const ITK_OVERRIDE;
169 
170  virtual void GetDerivative( DerivativeType & ) const ITK_OVERRIDE;
171 
178  void GetValueAndDerivative(MeasureType & value, DerivativeType & derivative) const ITK_OVERRIDE;
179 
183 
187 
189  const MetricQueueType & GetMetricQueue() const;
190 
191  virtual bool SupportsArbitraryVirtualDomainSamples( void ) const ITK_OVERRIDE;
192 
194 
196  virtual MetricCategoryType GetMetricCategory() const ITK_OVERRIDE
197  {
199  }
200 
201 protected:
202 
205  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
206 
207 private:
208  ObjectToObjectMultiMetricv4(const Self &) ITK_DELETE_FUNCTION;
209  void operator=(const Self &) ITK_DELETE_FUNCTION;
210 
214 };
215 
216 } //end namespace itk
217 
218 #ifndef ITK_MANUAL_INSTANTIATION
219 #include "itkObjectToObjectMultiMetricv4.hxx"
220 #endif
221 
222 #endif
virtual void SetFixedTransform(FixedTransformType *) override
Transform< TInternalComputationValueType, TVirtualImage::ImageDimension, TMovingDimension > MovingTransformType
Light weight base class for most itk classes.
ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType > Superclass
virtual void GetDerivative(DerivativeType &) const override
SizeValueType GetNumberOfMetrics() const
This class takes one ore more ObjectToObject metrics and assigns weights to their derivatives to comp...
Transform< TInternalComputationValueType, TVirtualImage::ImageDimension, TFixedDimension > FixedTransformType
Superclass::ParametersValueType ParametersValueType
MeasureType GetValue() const override
TInternalComputationValueType ParametersValueType
virtual void SetFixedObject(const ObjectType *) override
Computes similarity between regions of two objects.
void GetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const override
unsigned long SizeValueType
Definition: itkIntTypes.h:143
Superclass::CoordinateRepresentationType CoordinateRepresentationType
void PrintSelf(std::ostream &os, Indent indent) const override
void Initialize(void) override
virtual void SetMovingTransform(MovingTransformType *) override
virtual bool SupportsArbitraryVirtualDomainSamples(void) const override
virtual void SetMovingObject(const ObjectType *) override
Superclass::FixedTransformType FixedTransformType
virtual MetricCategoryType GetMetricCategory() const override
Standard exception handling object.
MetricValueArrayType GetValueArray() const
void AddMetric(MetricType *metric)
Superclass::MovingTransformType MovingTransformType
Superclass::NumberOfParametersType NumberOfParametersType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
MeasureType GetWeightedValue() const
std::deque< MetricBasePointer > MetricQueueType
Base class for most ITK classes.
Definition: itkObject.h:57
const MetricQueueType & GetMetricQueue() const
Superclass::DerivativeValueType DerivativeValueType