template<typename TInputImage1, typename TInputImage2 = TInputImage1, typename TOutputImage = TInputImage1>
class itk::SubtractImageFilter< TInputImage1, TInputImage2, TOutputImage >
Pixel-wise subtraction of two images.
Subtract each pixel from image2 from its corresponding pixel in image1:
* Output = Input1 - Input2.
*
This is done using
This class is templated over the types of the two input images and the type of the output image. Numeric conversions (castings) are done by the C++ defaults.
Additionally, a constant can be subtracted from every pixel in an image using:
- Note
- The result of AddImageFilter with a negative constant is not necessarily the same as SubtractImageFilter. This would be the case when the PixelType defines an operator-() that is not the inverse of operator+()
- Wiki Examples:
-
- Examples:
- Examples/RegistrationITKv3/ImageRegistration1.cxx, Examples/RegistrationITKv3/ImageRegistration20.cxx, Examples/RegistrationITKv3/ImageRegistration5.cxx, Examples/RegistrationITKv3/ImageRegistration6.cxx, Examples/RegistrationITKv3/ImageRegistration7.cxx, Examples/RegistrationITKv3/ImageRegistration8.cxx, Examples/RegistrationITKv3/ImageRegistration9.cxx, Examples/RegistrationITKv4/ImageRegistration1.cxx, Examples/RegistrationITKv4/ImageRegistration20.cxx, Examples/RegistrationITKv4/ImageRegistration5.cxx, Examples/RegistrationITKv4/ImageRegistration6.cxx, Examples/RegistrationITKv4/ImageRegistration7.cxx, Examples/RegistrationITKv4/ImageRegistration8.cxx, Examples/RegistrationITKv4/ImageRegistration9.cxx, WikiExamples/ImageProcessing/ImageFilterOnARegion.cxx, WikiExamples/ImageProcessing/LaplacianSharpeningImageFilter.cxx, WikiExamples/ImageProcessing/SubtractImageFilter.cxx, WikiExamples/ImageProcessing/SubtractImageFilter_Constant.cxx, WikiExamples/Morphology/BinaryMorphologicalClosingImageFilter.cxx, WikiExamples/Morphology/BinaryMorphologicalOpeningImageFilter.cxx, WikiExamples/Morphology/GrayscaleDilateImageFilter.cxx, WikiExamples/Morphology/GrayscaleErodeImageFilter.cxx, WikiExamples/Smoothing/BilateralImageFilter.cxx, WikiExamples/Smoothing/BinaryMinMaxCurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/CurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/MeanImageFilter.cxx, WikiExamples/Smoothing/MedianImageFilter.cxx, and WikiExamples/Smoothing/MinMaxCurvatureFlowImageFilter.cxx.
Definition at line 94 of file itkSubtractImageFilter.h.
|
virtual ::itk::LightObject::Pointer | CreateAnother () const |
|
virtual const char * | GetNameOfClass () const |
|
| typedef (Concept::AdditiveOperators< typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType >) Input1Input2OutputAdditiveOperatorsCheck |
|
virtual ::itk::LightObject::Pointer | CreateAnother () const |
|
virtual const
Input1ImagePixelType & | GetConstant1 () const |
|
virtual const
Input2ImagePixelType & | GetConstant2 () const |
|
FunctorType & | GetFunctor () |
|
const FunctorType & | GetFunctor () const |
|
virtual void | SetConstant1 (const Input1ImagePixelType &input1) |
|
| typedef (Concept::SameDimension< itkGetStaticConstMacro(InputImage1Dimension), itkGetStaticConstMacro(InputImage2Dimension) >) SameDimensionCheck1 |
|
| typedef (Concept::SameDimension< itkGetStaticConstMacro(InputImage1Dimension), itkGetStaticConstMacro(OutputImageDimension) >) SameDimensionCheck2 |
|
virtual void | SetInput1 (const TInputImage1 *image1) |
|
virtual void | SetInput1 (const DecoratedInput1ImagePixelType *input1) |
|
virtual void | SetInput1 (const Input1ImagePixelType &input1) |
|
virtual void | SetInput2 (const TInputImage2 *image2) |
|
virtual void | SetInput2 (const DecoratedInput2ImagePixelType *input2) |
|
virtual void | SetInput2 (const Input2ImagePixelType &input2) |
|
virtual void | SetConstant2 (const Input2ImagePixelType &input2) |
|
void | SetConstant (Input2ImagePixelType ct) |
|
const Input2ImagePixelType & | GetConstant () const |
|
void | SetFunctor (const FunctorType &functor) |
|
virtual bool | CanRunInPlace () const |
|
virtual void | SetInPlace (bool _arg) |
|
virtual bool | GetInPlace () const |
|
virtual void | InPlaceOn () |
|
virtual void | InPlaceOff () |
|
const InputImageType * | GetInput () const |
|
const InputImageType * | GetInput (unsigned int idx) const |
|
virtual void | PopBackInput () override |
|
virtual void | PopFrontInput () override |
|
virtual void | PushBackInput (const InputImageType *image) |
|
virtual void | PushFrontInput (const InputImageType *image) |
|
virtual void | SetInput (const InputImageType *image) |
|
virtual void | SetInput (unsigned int, const TInputImage1 *image) |
|
virtual void | SetCoordinateTolerance (double _arg) |
|
virtual double | GetCoordinateTolerance () const |
|
virtual void | SetDirectionTolerance (double _arg) |
|
virtual double | GetDirectionTolerance () const |
|
OutputImageType * | GetOutput (unsigned int idx) |
|
virtual void | GraftNthOutput (unsigned int idx, DataObject *output) |
|
virtual void | GraftOutput (const DataObjectIdentifierType &key, DataObject *output) |
|
OutputImageType * | GetOutput () |
|
const OutputImageType * | GetOutput () const |
|
virtual void | GraftOutput (DataObject *output) |
|
virtual
ProcessObject::DataObjectPointer | MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override |
|
virtual
ProcessObject::DataObjectPointer | MakeOutput (const ProcessObject::DataObjectIdentifierType &) override |
|
virtual void | AbortGenerateDataOff () |
|
virtual void | AbortGenerateDataOn () |
|
virtual void | EnlargeOutputRequestedRegion (DataObject *) |
|
virtual const bool & | GetAbortGenerateData () const |
|
DataObjectPointerArray | GetIndexedInputs () |
|
DataObjectPointerArray | GetIndexedOutputs () |
|
NameArray | GetInputNames () const |
|
DataObjectPointerArray | GetInputs () |
|
MultiThreader * | GetMultiThreader () const |
|
DataObjectPointerArraySizeType | GetNumberOfIndexedInputs () const |
|
DataObjectPointerArraySizeType | GetNumberOfIndexedOutputs () const |
|
DataObjectPointerArraySizeType | GetNumberOfInputs () const |
|
DataObjectPointerArraySizeType | GetNumberOfOutputs () const |
|
virtual
DataObjectPointerArraySizeType | GetNumberOfValidRequiredInputs () const |
|
NameArray | GetOutputNames () const |
|
DataObjectPointerArray | GetOutputs () |
|
virtual const float & | GetProgress () const |
|
NameArray | GetRequiredInputNames () const |
|
bool | HasInput (const DataObjectIdentifierType &key) const |
|
bool | HasOutput (const DataObjectIdentifierType &key) const |
|
virtual void | PrepareOutputs () |
|
virtual void | PropagateRequestedRegion (DataObject *output) |
|
virtual void | ResetPipeline () |
|
virtual void | SetAbortGenerateData (bool _arg) |
|
virtual void | Update () |
|
virtual void | UpdateLargestPossibleRegion () |
|
virtual void | UpdateOutputData (DataObject *output) |
|
virtual void | UpdateOutputInformation () |
|
void | UpdateProgress (float progress) |
|
void | SetProgress (float progress) |
|
virtual void | SetReleaseDataFlag (bool flag) |
|
virtual bool | GetReleaseDataFlag () const |
|
void | ReleaseDataFlagOn () |
|
void | ReleaseDataFlagOff () |
|
virtual void | SetReleaseDataBeforeUpdateFlag (bool _arg) |
|
virtual const bool & | GetReleaseDataBeforeUpdateFlag () const |
|
virtual void | ReleaseDataBeforeUpdateFlagOn () |
|
virtual void | ReleaseDataBeforeUpdateFlagOff () |
|
virtual void | SetNumberOfThreads (ThreadIdType _arg) |
|
virtual const ThreadIdType & | GetNumberOfThreads () const |
|
unsigned long | AddObserver (const EventObject &event, Command *) |
|
unsigned long | AddObserver (const EventObject &event, Command *) const |
|
virtual void | DebugOff () const |
|
virtual void | DebugOn () const |
|
Command * | GetCommand (unsigned long tag) |
|
bool | GetDebug () const |
|
MetaDataDictionary & | GetMetaDataDictionary () |
|
const MetaDataDictionary & | GetMetaDataDictionary () const |
|
virtual ModifiedTimeType | GetMTime () const |
|
virtual const TimeStamp & | GetTimeStamp () const |
|
bool | HasObserver (const EventObject &event) const |
|
void | InvokeEvent (const EventObject &) |
|
void | InvokeEvent (const EventObject &) const |
|
virtual void | Modified () const |
|
virtual void | Register () const override |
|
void | RemoveAllObservers () |
|
void | RemoveObserver (unsigned long tag) |
|
void | SetDebug (bool debugFlag) const |
|
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
|
virtual void | SetReferenceCount (int) override |
|
virtual void | UnRegister () const noexceptoverride |
|
virtual void | SetObjectName (std::string _arg) |
|
virtual const std::string & | GetObjectName () const |
|
virtual void | Delete () |
|
virtual int | GetReferenceCount () const |
|
| itkCloneMacro (Self) |
|
void | Print (std::ostream &os, Indent indent=0) const |
|
|
| SubtractImageFilter () |
|
virtual | ~SubtractImageFilter () |
|
| BinaryFunctorImageFilter () |
|
virtual void | GenerateOutputInformation () override |
|
void | ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override |
|
virtual | ~BinaryFunctorImageFilter () |
|
virtual void | AllocateOutputs () override |
|
virtual bool | GetRunningInPlace () const |
|
| InPlaceImageFilter () |
|
virtual void | PrintSelf (std::ostream &os, Indent indent) const override |
|
virtual void | ReleaseInputs () override |
|
| ~InPlaceImageFilter () |
|
virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
|
virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
|
virtual void | GenerateInputRequestedRegion () override |
|
| ImageToImageFilter () |
|
virtual void | VerifyInputInformation () override |
|
| ~ImageToImageFilter () |
|
void | PushBackInput (const DataObject *input) override |
|
void | PushFrontInput (const DataObject *input) override |
|
virtual void | AfterThreadedGenerateData () |
|
virtual void | BeforeThreadedGenerateData () |
|
virtual void | GenerateData () override |
|
virtual const
ImageRegionSplitterBase * | GetImageRegionSplitter () const |
|
| ImageSource () |
|
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion) |
|
virtual | ~ImageSource () |
|
virtual void | AddInput (DataObject *input) |
|
virtual void | AddOutput (DataObject *output) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
virtual void | CacheInputReleaseDataFlags () |
|
virtual void | GenerateOutputRequestedRegion (DataObject *output) |
|
DataObject * | GetInput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
|
virtual const
DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
|
virtual const
DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
|
bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
|
bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
|
bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
|
| itkLegacyMacro (virtual void RemoveOutput(DataObject *output)) |
|
| itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num)) |
|
| itkLegacyMacro (virtual void RemoveInput(DataObject *input)) |
|
| itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num)) |
|
DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
|
DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
|
DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
|
| ProcessObject () |
|
virtual void | PropagateResetPipeline () |
|
virtual void | RemoveInput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveInput (DataObjectPointerArraySizeType) |
|
virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
|
bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
|
virtual void | RestoreInputReleaseDataFlags () |
|
virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
|
virtual void | SetNthInput (DataObjectPointerArraySizeType num, DataObject *input) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual void | SetOutput (const DataObjectIdentifierType &key, DataObject *output) |
|
virtual void | SetPrimaryInput (DataObject *input) |
|
virtual void | SetPrimaryOutput (DataObject *output) |
|
void | SetRequiredInputNames (const NameArray &) |
|
virtual void | VerifyPreconditions () |
|
| ~ProcessObject () |
|
DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
|
DataObject * | GetPrimaryInput () |
|
const DataObject * | GetPrimaryInput () const |
|
virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryInputName (void) const |
|
DataObject * | GetOutput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
|
virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryOutputName (void) const |
|
DataObject * | GetOutput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetOutput (DataObjectPointerArraySizeType idx) const |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
| Object () |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &time) |
|
virtual | ~Object () |
|
virtual LightObject::Pointer | InternalClone () const |
|
| LightObject () |
|
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
|
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
|
virtual | ~LightObject () |
|