ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkSimplexSpectralProjectionsDecompositionImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright RTK 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 * https://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 rtkSimplexSpectralProjectionsDecompositionImageFilter_h
20#define rtkSimplexSpectralProjectionsDecompositionImageFilter_h
21
24#include <itkAmoebaOptimizer.h>
26
28
29namespace rtk
30{
41
42template <typename DecomposedProjectionsType,
43 typename MeasuredProjectionsType,
44 typename IncidentSpectrumImageType = itk::Image<float, 3>,
45 typename DetectorResponseImageType = itk::Image<float, 2>,
46 typename MaterialAttenuationsImageType = itk::Image<float, 2>>
48 : public itk::ImageToImageFilter<DecomposedProjectionsType, DecomposedProjectionsType>
49{
50public:
52
58
60 using InputImageType = DecomposedProjectionsType;
61 using OutputImageType = DecomposedProjectionsType;
62
66 using DetectorResponseType = vnl_matrix<double>;
67 using MaterialAttenuationsType = vnl_matrix<double>;
69 using DecomposedProjectionsDataType = typename DecomposedProjectionsType::PixelType::ValueType;
70 using MeasuredProjectionsDataType = typename MeasuredProjectionsType::PixelType::ValueType;
71
72#ifndef ITK_FUTURE_LEGACY_REMOVE
74 using VectorSpectrumImageType = itk::VectorImage<float, 2>;
77#endif
78
80 itkNewMacro(Self);
81
84
86 void
88 const typename itk::ImageBase<DecomposedProjectionsType::ImageDimension> * DecomposedProjections);
89 template <unsigned int VNumberOfMaterials>
90 void
93 DecomposedProjectionsType::ImageDimension> * DecomposedProjections);
94 typename DecomposedProjectionsType::ConstPointer
96
98 void
100 const typename itk::ImageBase<MeasuredProjectionsType::ImageDimension> * MeasuredProjections);
101 template <unsigned int VNumberOfSpectralBins>
102 void
105 MeasuredProjectionsType::ImageDimension> * MeasuredProjections);
106 typename MeasuredProjectionsType::ConstPointer
108
109
111 void
112 SetDetectorResponse(const DetectorResponseImageType * DetectorResponse);
113 typename DetectorResponseImageType::ConstPointer
115
117 void
118 SetMaterialAttenuations(const MaterialAttenuationsImageType * MaterialAttenuations);
119 typename MaterialAttenuationsImageType::ConstPointer
121
123 void
124 SetInputIncidentSpectrum(const IncidentSpectrumImageType * IncidentSpectrum);
125#ifndef ITK_FUTURE_LEGACY_REMOVE
126 void
127 SetInputIncidentSpectrum(const VectorSpectrumImageType * IncidentSpectrum);
128#endif
129 typename IncidentSpectrumImageType::ConstPointer
131
133 itkGetMacro(NumberOfIterations, unsigned int);
134 itkSetMacro(NumberOfIterations, unsigned int);
135
136 itkSetMacro(NumberOfEnergies, unsigned int);
137 itkGetMacro(NumberOfEnergies, unsigned int);
138
139 itkSetMacro(NumberOfMaterials, unsigned int);
140 itkGetMacro(NumberOfMaterials, unsigned int);
141
142 itkSetMacro(OptimizeWithRestarts, bool);
143 itkGetMacro(OptimizeWithRestarts, bool);
144
146 itkGetMacro(Thresholds, ThresholdsType);
147
148 itkSetMacro(NumberOfSpectralBins, unsigned int);
149 itkGetMacro(NumberOfSpectralBins, unsigned int);
150
151 itkSetMacro(OutputInverseCramerRaoLowerBound, bool);
152 itkGetMacro(OutputInverseCramerRaoLowerBound, bool);
153
154 itkSetMacro(OutputFischerMatrix, bool);
155 itkGetMacro(OutputFischerMatrix, bool);
156
157 itkSetMacro(LogTransformEachBin, bool);
158 itkGetMacro(LogTransformEachBin, bool);
159
160 itkSetMacro(GuessInitialization, bool);
161 itkGetMacro(GuessInitialization, bool);
162
163protected:
166
167 void
169
170 void
172
173 void
175 void
176 DynamicThreadedGenerateData(const typename DecomposedProjectionsType::RegionType & outputRegionForThread) override;
177
183
186 void
187 VerifyInputInformation() const override
188 {}
189
202 unsigned int m_NumberOfEnergies;
204
211
212#ifndef ITK_FUTURE_LEGACY_REMOVE
214 typename FlattenVectorFilterType::Pointer m_FlattenFilter;
215 typename PermuteFilterType::Pointer m_PermuteFilter;
216#endif
217}; // end of class
218
219} // end namespace rtk
220
221
222#ifndef ITK_MANUAL_INSTANTIATION
223# include "rtkSimplexSpectralProjectionsDecompositionImageFilter.hxx"
224#endif
225
226#endif
SmartPointer< Self > Pointer
Base class for templated image classes.
SmartPointer< Self > Pointer
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Definition itkImage.h:89
Permutes the image axes according to a user specified order.
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Make a DataObject of the correct type to used as the specified output.
Implements transparent reference counting.
A templated class holding a M x N size Matrix.
Templated n-dimensional vector image class.
A templated class holding a n-Dimensional vector.
Definition itkVector.h:63
void DynamicThreadedGenerateData(const typename DecomposedProjectionsType::RegionType &outputRegionForThread) override
DetectorResponseImageType::ConstPointer GetDetectorResponse()
void SetInputFixedVectorLengthMeasuredProjections(const itk::Image< itk::Vector< MeasuredProjectionsDataType, VNumberOfSpectralBins >, MeasuredProjectionsType::ImageDimension > *MeasuredProjections)
MaterialAttenuationsImageType::ConstPointer GetMaterialAttenuations()
MeasuredProjectionsType::ConstPointer GetInputMeasuredProjections()
itk::DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) override
itk::ImageSource< DecomposedProjectionsType >::Pointer m_CastDecomposedProjectionsPointer
void SetInputMeasuredProjections(const typename itk::ImageBase< MeasuredProjectionsType::ImageDimension > *MeasuredProjections)
void SetInputDecomposedProjections(const typename itk::ImageBase< DecomposedProjectionsType::ImageDimension > *DecomposedProjections)
DecomposedProjectionsType::ConstPointer GetInputDecomposedProjections()
void SetDetectorResponse(const DetectorResponseImageType *DetectorResponse)
typename DecomposedProjectionsType::PixelType::ValueType DecomposedProjectionsDataType
itk::ImageToImageFilter< DecomposedProjectionsType, DecomposedProjectionsType > Superclass
void SetInputFixedVectorLengthDecomposedProjections(const itk::Image< itk::Vector< DecomposedProjectionsDataType, VNumberOfMaterials >, DecomposedProjectionsType::ImageDimension > *DecomposedProjections)
IncidentSpectrumImageType::ConstPointer GetInputIncidentSpectrum()
void SetMaterialAttenuations(const MaterialAttenuationsImageType *MaterialAttenuations)
void SetInputIncidentSpectrum(const IncidentSpectrumImageType *IncidentSpectrum)
Re-writes a vector image as an image.
#define itkSetMacro(name, type)