28 #ifndef itkInPlaceImageFilter_h
29 #define itkInPlaceImageFilter_h
32 #include <type_traits>
76 template <
typename TInputImage,
typename TOutputImage = TInputImage>
92 using typename Superclass::OutputImageType;
93 using typename Superclass::OutputImagePointer;
94 using typename Superclass::OutputImageRegionType;
95 using typename Superclass::OutputImagePixelType;
105 static constexpr
unsigned int InputImageDimension = TInputImage::ImageDimension;
106 static constexpr
unsigned int OutputImageDimension = TOutputImage::ImageDimension;
113 itkSetMacro(InPlace,
bool);
114 itkGetConstMacro(InPlace,
bool);
115 itkBooleanMacro(InPlace);
127 CanRunInPlace()
const;
134 PrintSelf(std::ostream & os,
Indent indent)
const override;
151 if (std::is_same_v<TInputImage, TOutputImage>)
153 this->InternalAllocateOutputs();
157 this->m_RunningInPlace =
false;
158 this->Superclass::AllocateOutputs();
173 ReleaseInputs()
override;
179 itkGetConstMacro(RunningInPlace,
bool);
183 InternalAllocateOutputs();
185 bool m_InPlace{
true };
186 bool m_RunningInPlace{
false };
190 #ifndef ITK_MANUAL_INSTANTIATION
191 # include "itkInPlaceImageFilter.hxx"