NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkMammogramFatEstimationFitMetric.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef __itkMammogramFatEstimationFitMetric_h
16 #define __itkMammogramFatEstimationFitMetric_h
17 
18 #include <itkSingleValuedCostFunction.h>
19 #include <itkImageRegionIterator.h>
20 #include <itkImageRegionIteratorWithIndex.h>
21 #include <itkImageRegionConstIterator.h>
22 #include <itkImageRegionConstIteratorWithIndex.h>
23 
24 namespace itk {
25 
34  public SingleValuedCostFunction
35 {
36 // Software Guide : EndCodeSnippet
37 public:
39  typedef SingleValuedCostFunction Superclass;
40  typedef SmartPointer< Self > Pointer;
41  typedef SmartPointer< const Self > ConstPointer;
42 
44  itkTypeMacro( MammogramFatEstimationFitMetric, SingleValuedCostFunction );
45 
47  itkNewMacro(Self);
48 
49 
50  typedef Superclass::ParametersType ParametersType;
51  typedef Superclass::DerivativeType DerivativeType;
52  typedef Superclass::MeasureType MeasureType;
53 
54  itkStaticConstMacro( ParametricSpaceDimension, unsigned int, 0 );
55 
56  virtual unsigned int GetNumberOfParameters(void) const override
57  {
58  return ParametricSpaceDimension;
59  }
60 
61  void GetDerivative( const ParametersType &parameters,
62  DerivativeType &Derivative ) const override
63  {
64  return;
65  }
66 
67  virtual MeasureType GetValue( const ParametersType &parameters ) const override;
68 
69  void GetValueAndDerivative( const ParametersType &parameters,
70  MeasureType &Value,
71  DerivativeType &Derivative ) const override
72  {
73  Value = this->GetValue( parameters );
74  this->GetDerivative( parameters, Derivative );
75  }
76 
77  virtual void WriteIntensityVsEdgeDistToFile( std::string fileOutputIntensityVsEdgeDist );
78  virtual void WriteFitToFile( std::string fileOutputFit,
79  const ParametersType &parameters );
80 
81 
82 protected:
83 
87  void operator=(const Self &) {}
88  void PrintSelf(std::ostream & os, Indent indent) const override;
89 
90 };
91 
92 } // end namespace itk
93 
94 #ifndef ITK_MANUAL_INSTANTIATION
95 #include "itkMammogramFatEstimationFitMetric.txx"
96 #endif
97 
98 #endif
MammogramFatEstimationFitMetric Self
Definition: itkMammogramFatEstimationFitMetric.h:38
An abstract metric to compute the fit of a model of mammographic fat.
Definition: itkMammogramFatEstimationFitMetric.h:33
virtual unsigned int GetNumberOfParameters(void) const override
Definition: itkMammogramFatEstimationFitMetric.h:56
MammogramFatEstimationFitMetric(const Self &)
Definition: itkMammogramFatEstimationFitMetric.h:86
void GetValueAndDerivative(const ParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const override
Definition: itkMammogramFatEstimationFitMetric.h:69
SingleValuedCostFunction Superclass
Definition: itkMammogramFatEstimationFitMetric.h:39
Definition: niftkITKAffineResampleImage.cxx:74
Superclass::DerivativeType DerivativeType
Definition: itkMammogramFatEstimationFitMetric.h:51
void operator=(const Self &)
Definition: itkMammogramFatEstimationFitMetric.h:87
SmartPointer< const Self > ConstPointer
Definition: itkMammogramFatEstimationFitMetric.h:41
Superclass::MeasureType MeasureType
Definition: itkMammogramFatEstimationFitMetric.h:52
Superclass::ParametersType ParametersType
Definition: itkMammogramFatEstimationFitMetric.h:47
SmartPointer< Self > Pointer
Definition: itkMammogramFatEstimationFitMetric.h:40
GLsizei const GLcharARB ** string
Definition: glew.h:5194
void GetDerivative(const ParametersType &parameters, DerivativeType &Derivative) const override
Definition: itkMammogramFatEstimationFitMetric.h:61