ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkDenseFiniteDifferenceImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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#ifndef itkDenseFiniteDifferenceImageFilter_h
19#define itkDenseFiniteDifferenceImageFilter_h
20
21#include "itkBooleanStdVector.h"
24
25namespace itk
26{
69template <typename TInputImage, typename TOutputImage>
70class ITK_TEMPLATE_EXPORT DenseFiniteDifferenceImageFilter
71 : public FiniteDifferenceImageFilter<TInputImage, TOutputImage>
72{
73public:
74 ITK_DISALLOW_COPY_AND_MOVE(DenseFiniteDifferenceImageFilter);
75
79
82
84 itkOverrideGetNameOfClassMacro(DenseFiniteDifferenceImageFilter);
85
87 using typename Superclass::InputImageType;
88 using typename Superclass::OutputImageType;
90
93 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
94
97 using typename Superclass::PixelType;
98
100 using typename Superclass::TimeStepType;
101
104
106 itkConceptMacro(OutputAdditiveOperatorsCheck, (Concept::AdditiveOperators<PixelType>));
107 itkConceptMacro(OutputAdditiveAndAssignOperatorsCheck, (Concept::AdditiveAndAssignOperators<PixelType>));
109
110protected:
111 DenseFiniteDifferenceImageFilter() { m_UpdateBuffer = UpdateBufferType::New(); }
113 void
114 PrintSelf(std::ostream & os, Indent indent) const override;
115
119 void
121
125 void
126 ApplyUpdate(const TimeStepType & dt) override;
127
130 virtual UpdateBufferType *
132 {
133 return m_UpdateBuffer;
134 }
135
139 TimeStepType
140 CalculateChange() override;
141
144 void
146
148 using ThreadRegionType = typename UpdateBufferType::RegionType;
149
154 virtual void
155 ThreadedApplyUpdate(const TimeStepType & dt, const ThreadRegionType & regionToProcess, ThreadIdType threadId);
156
161 virtual TimeStepType
162 ThreadedCalculateChange(const ThreadRegionType & regionToProcess, ThreadIdType threadId);
163
164private:
175
180
185
187 typename UpdateBufferType::Pointer m_UpdateBuffer{};
188};
189} // end namespace itk
190
191#ifndef ITK_MANUAL_INSTANTIATION
192# include "itkDenseFiniteDifferenceImageFilter.hxx"
193#endif
194
195#endif
void ApplyUpdate(const TimeStepType &dt) override
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
virtual void ThreadedApplyUpdate(const TimeStepType &dt, const ThreadRegionType &regionToProcess, ThreadIdType threadId)
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ApplyUpdateThreaderCallback(void *arg)
TimeStepType CalculateChange() override
virtual TimeStepType ThreadedCalculateChange(const ThreadRegionType &regionToProcess, ThreadIdType threadId)
FiniteDifferenceImageFilter< TInputImage, TOutputImage > Superclass
typename UpdateBufferType::RegionType ThreadRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
~DenseFiniteDifferenceImageFilter() override=default
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION CalculateChangeThreaderCallback(void *arg)
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
FiniteDifferenceFunction< TOutputImage > FiniteDifferenceFunctionType
Control indentation during Print() invocation.
Definition itkIndent.h:50
Implements transparent reference counting.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType
std::vector< Boolean > BooleanStdVectorType
itk::ITK_THREAD_RETURN_TYPE ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION