15 #ifndef itkMatrixBasedSimulReconRegnMetric_h
16 #define itkMatrixBasedSimulReconRegnMetric_h
18 #include <itkConceptChecking.h>
19 #include <itkSingleValuedCostFunction.h>
21 #include <itkForwardAndBackwardProjectionMatrix.h>
22 #include <itkEulerAffineTransformMatrixAndItsVariations.h>
36 template <
class IntensityType =
double>
84 typedef typename SingleValuedCostFunction::MeasureType
MeasureType;
88 void SetInputVolume( InputVolumePointer inVolume ) { m_inVolume = inVolume; }
98 { m_inProjOne = inProjectionOne; m_inProjTwo = inProjectionTwo; }
104 void SetEulerTransform( EulerAffineTransformPointer inEuler ) { m_EulerAffineTransform = inEuler; }
116 void SetTotalVoxel(
const unsigned long int &totalSize3D ) { m_totalSize3D = totalSize3D; }
119 void SetTotalPixel(
const unsigned long int &totalSize2D ) { m_totalSize2D = totalSize2D; }
137 unsigned int GetNumberOfParameters(
void)
const;
140 const InputVolumeType *GetReconstructedVolume(
void) {
142 return m_FwdAndBackProjDiffFilter->GetPointerToInputVolume();
147 void SetParametersAddress(
const ParametersType & parameters )
const;
150 void SetDerivativesAddress(
const DerivativeType & derivatives )
const;
153 void SetParameters(
const ParametersType & parameters )
const;
157 void SetIterativeReconEstimateFile(
std::string filename ) {
158 fileOutputCurrentEstimate = filename;
163 void SetIterativeReconEstimateSuffix(
std::string suffix ) {
164 suffixOutputCurrentEstimate = suffix;
170 virtual void GetValueAndDerivative(
const ParametersType & parameters,
172 DerivativeType & derivative )
const;
180 virtual MeasureType GetValue(
const ParametersType & parameters )
const;
188 virtual void GetDerivative(
const ParametersType & parameters,
189 DerivativeType & derivative )
const;
194 MatrixBasedSimulReconRegnMetric();
197 void PrintSelf(std::ostream& os, Indent indent)
const;
239 void operator=(
const Self&);
245 #ifndef ITK_MANUAL_INSTANTIATION
246 #include "itkMatrixBasedSimulReconRegnMetric.txx"
void SetTotalProjectionNumber(const unsigned int &projNumber)
Set the total number of the pixels of the projection.
Definition: itkMatrixBasedSimulReconRegnMetric.h:122
InputImageType::PointType InputImagePointType
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:62
SmartPointer< Self > Pointer
Definition: itkMatrixBasedSimulReconRegnMetric.h:44
InputVolumeSpacingType m_InVolumeSpacing
Definition: itkMatrixBasedSimulReconRegnMetric.h:229
MatrixProjectorType::InputImageSpacingType InputVolumeSpacingType
Definition: itkMatrixBasedSimulReconRegnMetric.h:66
SingleValuedCostFunction::ParametersType ParametersType
Definition: itkMatrixBasedSimulReconRegnMetric.h:83
OutputImageType::SizeType OutputImageSizeType
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:70
itk::ForwardAndBackwardProjectionMatrix< double, double > MatrixProjectorType
Definition: itkMatrixBasedSimulReconRegnMetric.h:58
void SetInputVolume(InputVolumePointer inVolume)
Set the 3D reconstruction estimate input volume.
Definition: itkMatrixBasedSimulReconRegnMetric.h:88
ProjectionGeometryType::Pointer m_Geometry
Definition: itkMatrixBasedSimulReconRegnMetric.h:234
SmartPointer< Self > Pointer
Definition: itkProjectionGeometry.h:36
MatrixProjectorType::Pointer MatrixProjectorPointerType
Definition: itkMatrixBasedSimulReconRegnMetric.h:59
unsigned int m_paraNumber
Definition: itkMatrixBasedSimulReconRegnMetric.h:220
AffineTransformerType::EulerAffineTransformType EulerAffineTransformType
Definition: itkMatrixBasedSimulReconRegnMetric.h:76
void SetInputTempProjections(InputProjectionPointer tempProjection)
Set the temporary projection image.
Definition: itkMatrixBasedSimulReconRegnMetric.h:101
MatrixProjectorType::InputImageRegionType InputVolumeRegionType
Definition: itkMatrixBasedSimulReconRegnMetric.h:64
Class to apply the affine transformation matrix to a 3D image.
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:37
Definition: niftkITKAffineResampleImage.cxx:74
void SetParameterVector(VectorType ¶Vector)
Set the transformation parameters as a vector form.
Definition: itkMatrixBasedSimulReconRegnMetric.h:107
MatrixProjectorType::InputImageType InputVolumeType
Definition: itkMatrixBasedSimulReconRegnMetric.h:61
SingleValuedCostFunction::MeasureType MeasureType
Definition: itkMatrixBasedSimulReconRegnMetric.h:84
Class to compute the difference between a reconstruction estimate and the target set of 2D projection...
Definition: itkMatrixBasedSimulReconRegnMetric.h:37
vnl_matrix< double > FullMatrixType
Definition: itkMatrixBasedSimulReconRegnMetric.h:55
unsigned int m_ProjectionNumber
Definition: itkMatrixBasedSimulReconRegnMetric.h:223
void SetEulerTransform(EulerAffineTransformPointer inEuler)
Set the transformation parameters.
Definition: itkMatrixBasedSimulReconRegnMetric.h:104
InputVolumePointType m_InVolumeOrigin
Definition: itkMatrixBasedSimulReconRegnMetric.h:230
InputVolumeSizeType m_InVolumeSize
Definition: itkMatrixBasedSimulReconRegnMetric.h:228
MatrixProjectorType::InputImageIndexType InputVolumeIndexType
Definition: itkMatrixBasedSimulReconRegnMetric.h:68
unsigned long int m_totalSize3D
Definition: itkMatrixBasedSimulReconRegnMetric.h:221
void SetInputTwoProjectionVectors(VectorType &inProjectionOne, VectorType &inProjectionTwo)
Set the input projection images.
Definition: itkMatrixBasedSimulReconRegnMetric.h:97
Abstract class to calculate the geometry of a CT or tomo machine.
Definition: itkProjectionGeometry.h:29
MatrixProjectorType::InputImageConstPointer InputVolumeConstPointer
Definition: itkMatrixBasedSimulReconRegnMetric.h:63
GLsizei const GLfloat * value
Definition: glew.h:1833
InputImageType::IndexType InputImageIndexType
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:63
MatrixProjectorType::InputImageSizeType InputVolumeSizeType
Definition: itkMatrixBasedSimulReconRegnMetric.h:65
InputImageType::Pointer InputImagePointer
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:56
vnl_sparse_matrix< double > SparseMatrixType
Definition: itkMatrixBasedSimulReconRegnMetric.h:56
void SetTotalVoxel(const unsigned long int &totalSize3D)
Set the total number of the voxels of the volume.
Definition: itkMatrixBasedSimulReconRegnMetric.h:116
VectorType m_inProjTwo
Definition: itkMatrixBasedSimulReconRegnMetric.h:211
unsigned long int m_totalSize2D
Definition: itkMatrixBasedSimulReconRegnMetric.h:222
VectorType m_EstimatedVolumeVector
Vectors of the image.
Definition: itkMatrixBasedSimulReconRegnMetric.h:209
virtual ~MatrixBasedSimulReconRegnMetric()
Definition: itkMatrixBasedSimulReconRegnMetric.h:195
SmartPointer< const Self > ConstPointer
Definition: itkMatrixBasedSimulReconRegnMetric.h:45
InputImageType::SpacingType InputImageSpacingType
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:61
MatrixProjectorType::OutputImagePointer InputProjectionPointer
Definition: itkMatrixBasedSimulReconRegnMetric.h:71
EulerAffineTransformType::Pointer EulerAffineTransformPointer
Definition: itkMatrixBasedSimulReconRegnMetric.h:78
vnl_vector< double > VectorType
Definition: itkMatrixBasedSimulReconRegnMetric.h:51
InputProjectionPointer m_inProjTemp
Definition: itkMatrixBasedSimulReconRegnMetric.h:218
double m_FDMDiff
Definition: itkMatrixBasedSimulReconRegnMetric.h:225
void SetInputVolumeSize(InputVolumeSizeType &inVolumeSize)
Set the size, resolution and origin of the input volume.
Definition: itkMatrixBasedSimulReconRegnMetric.h:132
void SetTotalPixel(const unsigned long int &totalSize2D)
Set the total number of the pixels of the projection.
Definition: itkMatrixBasedSimulReconRegnMetric.h:119
itk::ProjectionGeometry< double > ProjectionGeometryType
Definition: itkMatrixBasedSimulReconRegnMetric.h:80
MatrixProjectorType::InputImagePointType InputVolumePointType
Definition: itkMatrixBasedSimulReconRegnMetric.h:67
void SetInputVolumeSpacing(InputVolumeSpacingType &inVolumeSpacing)
Definition: itkMatrixBasedSimulReconRegnMetric.h:133
InputVolumePointer m_inVolume
Definition: itkMatrixBasedSimulReconRegnMetric.h:217
itk::EulerAffineTransformMatrixAndItsVariations< double > AffineTransformerType
Definition: itkMatrixBasedSimulReconRegnMetric.h:75
MatrixProjectorType::InputImagePointer InputVolumePointer
Definition: itkMatrixBasedSimulReconRegnMetric.h:62
void SetParameterNumber(const unsigned int ¶Number)
Set the number of the transformation parameters.
Definition: itkMatrixBasedSimulReconRegnMetric.h:91
MatrixBasedSimulReconRegnMetric Self
Definition: itkMatrixBasedSimulReconRegnMetric.h:42
AffineTransformerType::Pointer AffineTransformerPointer
Definition: itkMatrixBasedSimulReconRegnMetric.h:77
SingleValuedCostFunction Superclass
Definition: itkMatrixBasedSimulReconRegnMetric.h:43
InputImageType::RegionType InputImageRegionType
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:58
OutputImageType::ConstPointer OutputImageConstPointer
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:67
MatrixProjectorPointerType m_MatrixProjector
Definition: itkMatrixBasedSimulReconRegnMetric.h:213
double m_lambdaVal
Definition: itkMatrixBasedSimulReconRegnMetric.h:224
InputImageType::ConstPointer InputImageConstPointer
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:57
MatrixProjectorType::OutputImageSizeType InputProjectionSizeType
Definition: itkMatrixBasedSimulReconRegnMetric.h:73
void SetInputVolumeVector(VectorType &inVolumeVector)
Set the 3D reconstruction estimate input volume as a vector form.
Definition: itkMatrixBasedSimulReconRegnMetric.h:94
InputProjectionSizeType m_InProjectionSize
Definition: itkMatrixBasedSimulReconRegnMetric.h:232
void SetEulerTransformFDMDifferenceEpsilon(double &epsilonVal)
Definition: itkMatrixBasedSimulReconRegnMetric.h:112
OutputImageType::Pointer OutputImagePointer
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:66
Simultaneous itk::Image and itk::Array (and hence vnl_vector) class.
void SetEulerTransformFDMLambda(double &lambdaVal)
Set the Finite Difference Method (FDM) lambda value, difference value, and epsilon value...
Definition: itkMatrixBasedSimulReconRegnMetric.h:110
SingleValuedCostFunction::DerivativeType DerivativeType
Definition: itkMatrixBasedSimulReconRegnMetric.h:85
MatrixProjectorType::OutputImageConstPointer InputProjectionConstPointer
Definition: itkMatrixBasedSimulReconRegnMetric.h:72
EulerAffineTransformPointer m_EulerAffineTransform
Definition: itkMatrixBasedSimulReconRegnMetric.h:215
InputImageType::SizeType InputImageSizeType
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:60
double m_epsilonVal
Definition: itkMatrixBasedSimulReconRegnMetric.h:226
VectorType m_TransformationParameterVector
Definition: itkMatrixBasedSimulReconRegnMetric.h:210
SmartPointer< Self > Pointer
Definition: Projection/itkForwardAndBackwardProjectionMatrix.h:43
void SetProjectionGeometry(ProjectionGeometryType::Pointer pGeometry)
Set the projection geometry.
Definition: itkMatrixBasedSimulReconRegnMetric.h:129
MatrixProjectorType::OutputImageType InputProjectionType
Definition: itkMatrixBasedSimulReconRegnMetric.h:70
void SetEulerTransformFDMDifference(double &diffFDMVal)
Definition: itkMatrixBasedSimulReconRegnMetric.h:111
GLsizei const GLcharARB ** string
Definition: glew.h:5194
void SetInputVolumeOrigin(InputVolumePointType &inVolumeOrigin)
Definition: itkMatrixBasedSimulReconRegnMetric.h:134
AffineTransformerPointer m_AffineTransformer
Definition: itkMatrixBasedSimulReconRegnMetric.h:214
void SetTotalProjectionSize(InputProjectionSizeType &projSize)
Set the total number of the pixels of the projection.
Definition: itkMatrixBasedSimulReconRegnMetric.h:125