#include <itkBinaryOpenParabolicImageFilter.h>
Class for binary morphological opening operation.
This class uses the parabolic morphology operations to do very efficient erosions by circles/spheres. The operations are efficient because the underlying parabolic operations are separable and the operations are implicitly short circuited in comparison to a full distance transform approach.
The basic idea is that a binary erosion or dilation by a circle/sphere can be carried out by thresholding a distance transform. By using the parabolic filters we can avoid computing the entire distance transform and instead only compute the subset we are interested in.
Note that the circles and spheres may not be quite what you expect, because this class doesn't explicitly use Bresenham circles as most of the others do. A voxel's centre needs to be less than or equal to the circle radius, rather than any part of the voxel inside the circle.
This filter was developed as a result of discussions with M.Starring on the ITK mailing list.
Also note that the inputs must be 0/1 not 0/max for pixel type.
Core methods described in the InsightJournal article: "Morphology with parabolic structuring elements"
https://hdl.handle.net/1926/1370
Definition at line 69 of file itkBinaryOpenParabolicImageFilter.h.
Inheritance diagram for itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >:
Collaboration diagram for itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >:Public Member Functions | |
| virtual void | CircularOff () |
| virtual void | CircularOn () |
| virtual::itk::LightObject::Pointer | CreateAnother () const |
| virtual const bool & | GetCircular () const |
| virtual const char * | GetNameOfClass () const |
| virtual const RadiusType & | GetRadius () const |
| virtual const bool & | GetSafeBorder () const |
| virtual void | SafeBorderOff () |
| virtual void | SafeBorderOn () |
| virtual void | SetCircular (bool _arg) |
| virtual void | SetRadius (RadiusType _arg) |
| void | SetRadius (ScalarRealType radius) |
| virtual void | SetSafeBorder (bool _arg) |
| void | SetUseImageSpacing (bool g) |
Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
| const InputImageType * | GetInput () const |
| const InputImageType * | GetInput () const |
| const InputImageType * | GetInput (unsigned int idx) const |
| const InputImageType * | GetInput (unsigned int idx) const |
| void | PopBackInput () override |
| void | PopBackInput () override |
| void | PopFrontInput () override |
| void | PopFrontInput () override |
| virtual void | PushBackInput (const InputImageType *input) |
| virtual void | PushBackInput (const InputImageType *input) |
| virtual void | PushFrontInput (const InputImageType *input) |
| virtual void | PushFrontInput (const InputImageType *input) |
| virtual void | SetInput (const InputImageType *input) |
| virtual void | SetInput (const InputImageType *input) |
| virtual void | SetInput (unsigned int, const TInputImage *image) |
| virtual void | SetInput (unsigned int, const TInputImage *image) |
| virtual void | SetCoordinateTolerance (double _arg) |
| virtual double | GetCoordinateTolerance () const |
| virtual void | SetCoordinateTolerance (double _arg) |
| virtual double | GetCoordinateTolerance () const |
| virtual void | SetDirectionTolerance (double _arg) |
| virtual double | GetDirectionTolerance () const |
| virtual void | SetDirectionTolerance (double _arg) |
| virtual double | GetDirectionTolerance () const |
Public Member Functions inherited from itk::ImageSource< TInputImage > | |
| OutputImageType * | GetOutput (unsigned int idx) |
| virtual void | GraftNthOutput (unsigned int idx, DataObject *graft) |
| virtual void | GraftOutput (const DataObjectIdentifierType &key, DataObject *graft) |
| virtual void | GraftOutput (DataObject *graft) |
| OutputImageType * | GetOutput () |
| const OutputImageType * | GetOutput () const |
| ProcessObject::DataObjectPointer | MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override |
| ProcessObject::DataObjectPointer | MakeOutput (const ProcessObject::DataObjectIdentifierType &) override |
Public Member Functions inherited from itk::ProcessObject | |
| virtual void | AbortGenerateDataOff () |
| virtual void | AbortGenerateDataOn () |
| virtual void | EnlargeOutputRequestedRegion (DataObject *output) |
| virtual const bool & | GetAbortGenerateData () const |
| DataObjectPointerArray | GetIndexedInputs () |
| DataObjectPointerArray | GetIndexedOutputs () |
| NameArray | GetInputNames () const |
| DataObjectPointerArray | GetInputs () |
| MultiThreaderBase * | GetMultiThreader () const |
| DataObjectPointerArraySizeType | GetNumberOfIndexedInputs () const |
| DataObjectPointerArraySizeType | GetNumberOfIndexedOutputs () const |
| DataObjectPointerArraySizeType | GetNumberOfInputs () const |
| DataObjectPointerArraySizeType | GetNumberOfOutputs () const |
| virtual DataObjectPointerArraySizeType | GetNumberOfValidRequiredInputs () const |
| NameArray | GetOutputNames () const |
| DataObjectPointerArray | GetOutputs () |
| virtual float | GetProgress () const |
| NameArray | GetRequiredInputNames () const |
| bool | HasInput (const DataObjectIdentifierType &key) const |
| bool | HasOutput (const DataObjectIdentifierType &key) const |
| void | IncrementProgress (float increment) |
| virtual void | PrepareOutputs () |
| virtual void | PropagateRequestedRegion (DataObject *output) |
| virtual void | ResetPipeline () |
| virtual void | SetAbortGenerateData (bool _arg) |
| void | SetMultiThreader (MultiThreaderBase *threader) |
| virtual void | SetNumberOfWorkUnitsFromThreadRatio (ThreadIdType ratio) |
| virtual void | Update () |
| virtual void | UpdateLargestPossibleRegion () |
| virtual void | UpdateOutputData (DataObject *output) |
| virtual void | UpdateOutputInformation () |
| void | UpdateProgress (float progress) |
| virtual void | SetReleaseDataFlag (bool val) |
| 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 | SetNumberOfWorkUnits (ThreadIdType numberOfWorkUnits) |
| virtual ThreadIdType | GetNumberOfWorkUnits () const |
Public Member Functions inherited from itk::Object | |
| unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
| unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
| LightObject::Pointer | CreateAnother () const override |
| 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 |
| void | Register () const override |
| void | RemoveAllObservers () |
| void | RemoveObserver (unsigned long tag) const |
| void | SetDebug (bool debugFlag) const |
| void | SetReferenceCount (int) override |
| void | UnRegister () const noexcept override |
| void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
| void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
| virtual void | SetObjectName (std::string _arg) |
| virtual const std::string & | GetObjectName () const |
Public Member Functions inherited from itk::LightObject | |
| Pointer | Clone () const |
| virtual void | Delete () |
| virtual int | GetReferenceCount () const |
| void | Print (std::ostream &os, Indent indent=0) const |
Static Public Member Functions | |
| static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
| static double | GetGlobalDefaultCoordinateTolerance () |
| static double | GetGlobalDefaultCoordinateTolerance () |
| static double | GetGlobalDefaultDirectionTolerance () |
| static double | GetGlobalDefaultDirectionTolerance () |
| static void | SetGlobalDefaultCoordinateTolerance (double) |
| static void | SetGlobalDefaultCoordinateTolerance (double) |
| static void | SetGlobalDefaultDirectionTolerance (double) |
| static void | SetGlobalDefaultDirectionTolerance (double) |
Static Public Member Functions inherited from itk::Object | |
| static bool | GetGlobalWarningDisplay () |
| static void | GlobalWarningDisplayOff () |
| static void | GlobalWarningDisplayOn () |
| static Pointer | New () |
| static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
| static void | BreakOnError () |
| static Pointer | New () |
Static Public Attributes | |
| static constexpr unsigned int | ImageDimension = TInputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
| static constexpr unsigned int | InputImageDimension |
| static constexpr unsigned int | InputImageDimension |
| static constexpr unsigned int | OutputImageDimension |
| static constexpr unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageSource< TInputImage > | |
| static constexpr unsigned int | OutputImageDimension |
Private Attributes | |
| CCastTypeA::Pointer | m_CircCastA |
| CCastTypeB::Pointer | m_CircCastB |
| CircDilateType::Pointer | m_CircDilate |
| CircErodeType::Pointer | m_CircErode |
| bool | m_Circular |
| RadiusType | m_Radius |
| RCastTypeA::Pointer | m_RectCastA |
| RCastTypeB::Pointer | m_RectCastB |
| RectDilateType::Pointer | m_RectDilate |
| RectErodeType::Pointer | m_RectErode |
| bool | m_SafeBorder |
Additional Inherited Members | |
Static Protected Member Functions inherited from itk::ImageSource< TInputImage > | |
| static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
| static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
Static Protected Member Functions inherited from itk::ProcessObject | |
| template<typename TSourceObject> | |
| static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
| static constexpr float | progressFixedToFloat (uint32_t fixed) |
| static uint32_t | progressFloatToFixed (float f) |
Protected Attributes inherited from itk::ImageSource< TInputImage > | |
| bool | m_DynamicMultiThreading |
Protected Attributes inherited from itk::ProcessObject | |
| TimeStamp | m_OutputInformationMTime {} |
| bool | m_Updating {} |
Protected Attributes inherited from itk::LightObject | |
| std::atomic< int > | m_ReferenceCount {} |
|
protected |
Definition at line 156 of file itkBinaryOpenParabolicImageFilter.h.
|
protected |
Definition at line 157 of file itkBinaryOpenParabolicImageFilter.h.
|
protected |
Definition at line 153 of file itkBinaryOpenParabolicImageFilter.h.
|
protected |
Definition at line 151 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 78 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::InputImageConstPointer = typename TInputImage::ConstPointer |
Definition at line 96 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::InputImagePointer = typename TInputImage::Pointer |
Smart pointer type alias support.
Definition at line 95 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::InputImageType = TInputImage |
Pixel Type of the input image
Definition at line 87 of file itkBinaryOpenParabolicImageFilter.h.
|
protected |
Definition at line 150 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::InternalIntType = short |
Definition at line 101 of file itkBinaryOpenParabolicImageFilter.h.
|
protected |
Definition at line 149 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::InternalRealType = typename NumericTraits<PixelType>::FloatType |
Definition at line 98 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::OutputImageType = TOutputImage |
Definition at line 88 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::OutputPixelType = typename TOutputImage::PixelType |
Definition at line 92 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::PixelType = typename TInputImage::PixelType |
Definition at line 89 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::Pointer = SmartPointer<Self> |
Definition at line 77 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::RadiusType = typename itk::FixedArray<ScalarRealType, TInputImage::ImageDimension> |
Definition at line 106 of file itkBinaryOpenParabolicImageFilter.h.
|
protected |
Definition at line 159 of file itkBinaryOpenParabolicImageFilter.h.
|
protected |
Definition at line 160 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::RealType = typename NumericTraits<PixelType>::RealType |
Definition at line 90 of file itkBinaryOpenParabolicImageFilter.h.
|
protected |
Definition at line 154 of file itkBinaryOpenParabolicImageFilter.h.
|
protected |
Definition at line 152 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::ScalarRealType = typename NumericTraits<PixelType>::ScalarRealType |
Definition at line 91 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::Self = BinaryOpenParabolicImageFilter |
Standard class type alias.
Definition at line 75 of file itkBinaryOpenParabolicImageFilter.h.
| using itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::Superclass = ImageToImageFilter<TInputImage, TOutputImage> |
Definition at line 76 of file itkBinaryOpenParabolicImageFilter.h.
|
protected |
Referenced by GetNameOfClass().
|
overrideprotecteddefault |
|
virtual |
|
virtual |
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::LightObject.
|
overrideprotectedvirtual |
Image related type alias.
Reimplemented from itk::ProcessObject.
|
virtual |
|
virtual |
Runtime information support.
Reimplemented from itk::ImageToImageFilter< TInputImage, TInputImage >.
References BinaryOpenParabolicImageFilter().
|
virtual |
|
virtual |
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::LightObject.
|
virtual |
|
virtual |
|
virtual |
Set/Get whether the erosion is circular/rectangular - default is true (circular)
|
virtual |
| void itk::BinaryOpenParabolicImageFilter< TInputImage, TOutputImage >::SetRadius | ( | ScalarRealType | radius | ) |
|
virtual |
A safe border is added to input image to avoid borders effects and remove it once the closing is done
|
inline |
Definition at line 115 of file itkBinaryOpenParabolicImageFilter.h.
References m_CircDilate, m_CircErode, m_RectDilate, and m_RectErode.
|
staticconstexpr |
Image dimension.
Definition at line 104 of file itkBinaryOpenParabolicImageFilter.h.
|
private |
Definition at line 170 of file itkBinaryOpenParabolicImageFilter.h.
|
private |
Definition at line 171 of file itkBinaryOpenParabolicImageFilter.h.
|
private |
Definition at line 168 of file itkBinaryOpenParabolicImageFilter.h.
Referenced by SetUseImageSpacing().
|
private |
Definition at line 167 of file itkBinaryOpenParabolicImageFilter.h.
Referenced by SetUseImageSpacing().
|
private |
Definition at line 164 of file itkBinaryOpenParabolicImageFilter.h.
|
private |
Definition at line 163 of file itkBinaryOpenParabolicImageFilter.h.
|
private |
Definition at line 176 of file itkBinaryOpenParabolicImageFilter.h.
|
private |
Definition at line 177 of file itkBinaryOpenParabolicImageFilter.h.
|
private |
Definition at line 174 of file itkBinaryOpenParabolicImageFilter.h.
Referenced by SetUseImageSpacing().
|
private |
Definition at line 173 of file itkBinaryOpenParabolicImageFilter.h.
Referenced by SetUseImageSpacing().
|
private |
Definition at line 165 of file itkBinaryOpenParabolicImageFilter.h.