ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkMaximumIntensityProjectionImageFilter.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 rtkMaximumIntensityProjectionImageFilter_h
20#define rtkMaximumIntensityProjectionImageFilter_h
21
23
24namespace rtk
25{
26namespace Functor
27{
28
36template <class TInput, class TOutput>
37class ITK_TEMPLATE_EXPORT MaximumIntensityAlongRay
38{
39public:
41
44 bool
46 {
47 return false;
48 }
49 bool
51 {
52 return !(*this != other);
53 }
54
55 void
56 operator()(const ThreadIdType itkNotUsed(threadId),
57 TOutput & mipValue,
58 const TInput volumeValue,
59 const VectorType & itkNotUsed(stepInMM))
60 {
61 auto tmp = static_cast<TOutput>(volumeValue);
62 if (tmp > mipValue)
63 {
64 mipValue = tmp;
65 }
66 }
67};
68
76template <class TInput, class TOutput>
78{
79public:
82
83 bool
85 {
86 return false;
87 }
88 bool
90 {
91 return !(*this != other);
92 }
93
94 void
95 operator()(const ThreadIdType itkNotUsed(threadId),
96 const TInput & input,
97 TOutput & output,
98 const TOutput & rayCastValue,
99 const VectorType & stepInMM,
100 const PointType & itkNotUsed(source),
101 const VectorType & itkNotUsed(sourceToPixel),
102 const PointType & itkNotUsed(nearestPoint),
103 const PointType & itkNotUsed(farthestPoint)) const
104 {
105 auto tmp = static_cast<TOutput>(input);
106 if (tmp < rayCastValue)
107 {
108 tmp = rayCastValue;
109 }
110 output = tmp * stepInMM.GetNorm();
111 }
112};
113
114} // end namespace Functor
115
116
127
128template <class TInputImage,
129 class TOutputImage,
130 class TInterpolationWeightMultiplication = Functor::InterpolationWeightMultiplication<
131 typename TInputImage::PixelType,
133 class TProjectedValueAccumulation =
134 Functor::MaximumIntensityProjectedValueAccumulation<typename TInputImage::PixelType,
135 typename TOutputImage::PixelType>,
136 class TSumAlongRay =
137 Functor::MaximumIntensityAlongRay<typename TInputImage::PixelType, typename TOutputImage::PixelType>>
139 : public JosephForwardProjectionImageFilter<TInputImage,
140 TOutputImage,
141 TInterpolationWeightMultiplication,
142 TProjectedValueAccumulation,
143 TSumAlongRay>
144{
145public:
146 ITK_DISALLOW_COPY_AND_MOVE(MaximumIntensityProjectionImageFilter);
147
151
153 itkNewMacro(Self);
154
156 itkOverrideGetNameOfClassMacro(MaximumIntensityProjectionImageFilter);
157
158protected:
161};
162} // end namespace rtk
163
164#endif
Traits for a pixel that define the dimension and component type.
A templated class holding a geometric point in n-Dimensional space.
Definition itkPoint.h:54
Implements transparent reference counting.
A templated class holding a n-Dimensional vector.
Definition itkVector.h:63
RealValueType GetNorm() const
bool operator!=(const MaximumIntensityAlongRay &) const
void operator()(const ThreadIdType threadId, TOutput &mipValue, const TInput volumeValue, const VectorType &stepInMM)
bool operator==(const MaximumIntensityAlongRay &other) const
Function to calculate maximum intensity step along the ray projection.
void operator()(const ThreadIdType threadId, const TInput &input, TOutput &output, const TOutput &rayCastValue, const VectorType &stepInMM, const PointType &source, const VectorType &sourceToPixel, const PointType &nearestPoint, const PointType &farthestPoint) const
bool operator!=(const MaximumIntensityProjectedValueAccumulation &) const
bool operator==(const MaximumIntensityProjectedValueAccumulation &other) const
~MaximumIntensityProjectionImageFilter() override=default
unsigned int ThreadIdType
Definition itkIntTypes.h:98