#include <itkHoughTransform2DCirclesImageFilter.h>
Performs the Hough Transform to find circles in a 2D image.
This filter derives from the base class ImageToImageFilter. The input is an image, and all pixels above some threshold are those we want to consider during the process.
This filter produces two output: 1) The accumulator array, which represents probability of centers. 2) The array or radii, which has the radius value at each coordinate point.
When the filter finds a "correct" point, it computes the gradient at this point and draws a regular narrow-banded circle using the minimum and maximum radius given by the user, and fills in the array of radii. The SweepAngle value can be adjusted to improve the segmentation.
The filter will detect ring-shaped objects in the image, but it also finds discs. For a disc to be found, the intensity values within the disc must be higher than the surrounding of the disc.
TOutputPixelType is the pixel type of the accumulator image. An unsigned integer type (like 'unsigned long') is usually the best choice for this pixel type.
TRadiusPixelType is the pixel type of the radius image. A floating point type is recommended, as the estimation of the radius involves floating point calculations. Usually, 'double' is the best choice for this pixel type.
Definition at line 61 of file itkHoughTransform2DCirclesImageFilter.h.
Public Member Functions | |
virtual::itk::LightObject::Pointer | CreateAnother () const |
void | GenerateData () override |
CirclesListType & | GetCircles () |
virtual RadiusImageType * | GetModifiableRadiusImage () |
const char * | GetNameOfClass () const override |
virtual const RadiusImageType * | GetRadiusImage () const |
virtual double | GetSigmaGradient () const |
virtual double | GetThreshold () const |
void | SetRadius (double radius) |
virtual void | SetSigmaGradient (double _arg) |
virtual void | SetThreshold (double _arg) |
void | VerifyPreconditions () const override |
virtual void | SetMinimumRadius (double _arg) |
virtual double | GetMinimumRadius () const |
virtual void | SetMaximumRadius (double _arg) |
virtual double | GetMaximumRadius () const |
virtual void | SetGradientNormThreshold (double _arg) |
virtual double | GetGradientNormThreshold () const |
virtual void | SetNumberOfCircles (CirclesListSizeType _arg) |
virtual CirclesListSizeType | GetNumberOfCircles () const |
virtual void | SetDiscRadiusRatio (double _arg) |
virtual double | GetDiscRadiusRatio () const |
virtual void | SetVariance (double _arg) |
virtual double | GetVariance () const |
virtual void | SetSweepAngle (double _arg) |
virtual double | GetSweepAngle () const |
virtual void | SetUseImageSpacing (bool _arg) |
virtual bool | GetUseImageSpacing () const |
![]() | |
const InputImageType * | GetInput () const |
const InputImageType * | GetInput () const |
const InputImageType * | GetInput (unsigned int idx) const |
const InputImageType * | GetInput (unsigned int idx) const |
const char * | GetNameOfClass () const override |
const char * | GetNameOfClass () const override |
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 Image< TInputPixelType, 2 > *image) |
virtual void | SetInput (unsigned int, const Image< TInputPixelType, 2 > *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 |
![]() | |
OutputImageType * | GetOutput (unsigned int idx) |
OutputImageType * | GetOutput () |
const OutputImageType * | GetOutput () const |
virtual void | GraftOutput (DataObject *graft) |
virtual void | GraftOutput (const DataObjectIdentifierType &key, DataObject *graft) |
virtual void | GraftNthOutput (unsigned int idx, DataObject *graft) |
ProcessObject::DataObjectPointer | MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override |
ProcessObject::DataObjectPointer | MakeOutput (const ProcessObject::DataObjectIdentifierType &) override |
![]() | |
virtual void | AbortGenerateDataOff () |
virtual void | AbortGenerateDataOn () |
virtual const bool & | GetAbortGenerateData () const |
DataObjectPointerArray | GetIndexedInputs () |
DataObjectPointerArray | GetIndexedOutputs () |
NameArray | GetInputNames () const |
DataObjectPointerArray | GetInputs () |
MultiThreaderType * | GetMultiThreader () const |
const char * | GetNameOfClass () const override |
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 (MultiThreaderType *threader) |
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 _arg) |
virtual const ThreadIdType & | GetNumberOfWorkUnits () const |
![]() | |
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 |
![]() | |
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 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 bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
![]() | |
static void | BreakOnError () |
static Pointer | New () |
Private Attributes | |
CirclesListType | m_CirclesList {} |
double | m_DiscRadiusRatio { 1 } |
double | m_GradientNormThreshold { 1.0 } |
double | m_MaximumRadius { 10.0 } |
double | m_MinimumRadius { 0.0 } |
CirclesListSizeType | m_NumberOfCircles { 1 } |
ModifiedTimeType | m_OldModifiedTime { 0 } |
RadiusImagePointer | m_RadiusImage {} |
double | m_SigmaGradient { 1.0 } |
double | m_SweepAngle { 0.0 } |
double | m_Threshold { 0.0 } |
bool | m_UseImageSpacing { true } |
double | m_Variance { 10 } |
Additional Inherited Members | |
![]() | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
static constexpr unsigned int | OutputImageDimension |
![]() | |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
![]() | |
using | InputToOutputRegionCopierType |
using | OutputToInputRegionCopierType |
![]() | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
![]() | |
template<typename TSourceObject> | |
static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
static constexpr float | progressFixedToFloat (uint32_t fixed) |
static uint32_t | progressFloatToFixed (float f) |
![]() | |
bool | m_DynamicMultiThreading { true } |
![]() | |
TimeStamp | m_OutputInformationMTime {} |
bool | m_Updating {} |
![]() | |
std::atomic< int > | m_ReferenceCount {} |
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::CirclePointer = typename CircleType::Pointer |
Definition at line 97 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::CirclesListSizeType = typename CirclesListType::size_type |
Definition at line 100 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::CirclesListType = std::list<CirclePointer> |
Definition at line 98 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::CircleType = EllipseSpatialObject<2> |
Circle type alias.
Definition at line 96 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::ConstPointer = SmartPointer<const Self> |
Definition at line 71 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::IndexType = typename InputImageType::IndexType |
Image index type alias.
Definition at line 87 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::InputImageConstPointer = typename InputImageType::ConstPointer |
Definition at line 76 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::InputImagePointer = typename InputImageType::Pointer |
Definition at line 75 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::InputImageType = Image<TInputPixelType, 2> |
Input Image type alias.
Definition at line 74 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::OutputImagePointer = typename OutputImageType::Pointer |
Definition at line 80 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::OutputImageRegionType = typename InputImageType::RegionType |
Typedef to describe the output image region type.
Definition at line 93 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::OutputImageType = Image<TOutputPixelType, 2> |
Output Image type alias.
Definition at line 79 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::PixelType = typename InputImageType::PixelType |
Image pixel value type alias.
Definition at line 90 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::Pointer = SmartPointer<Self> |
Definition at line 70 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::RadiusImagePointer = typename RadiusImageType::Pointer |
Definition at line 84 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::RadiusImageType = Image<TRadiusPixelType, 2> |
Radius Image type alias.
Definition at line 83 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::Self = HoughTransform2DCirclesImageFilter |
Standard class type aliases.
Definition at line 68 of file itkHoughTransform2DCirclesImageFilter.h.
using itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::Superclass = ImageToImageFilter<Image<TInputPixelType, 2>, Image<TOutputPixelType, 2>> |
Definition at line 69 of file itkHoughTransform2DCirclesImageFilter.h.
|
protected |
Referenced by GetNameOfClass().
|
overrideprotecteddefault |
|
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 |
HoughTransform2DCirclesImageFilter's produces all the output. Therefore, it must provide an implementation of EnlargeOutputRequestedRegion.
Reimplemented from itk::ProcessObject.
|
overridevirtual |
Method for evaluating the implicit function over the image.
Reimplemented from itk::ProcessObject.
|
overrideprotectedvirtual |
HoughTransform2DCirclesImageFilter needs the entire input. Therefore it must provide an implementation GenerateInputRequestedRegion().
Reimplemented from itk::ProcessObject.
CirclesListType & itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::GetCircles | ( | ) |
Get the list of circles. This recomputes the circles, if necessary. The pixel grid coordinates of the center of a circle from the list can be retrieved by calling circle->GetCenterPoint().
|
virtual |
Set/Get the radius of the disc to remove from the accumulator for each circle found.
|
virtual |
Threshold for the norm of the gradient: Only pixels whose gradient norm is above this threshold are processed by the filter. The threshold must be >= 0.
|
virtual |
Set the maximum radius value the filter should look for.
|
virtual |
Set the minimum radius value the filter should look for.
|
virtual |
Get the radius image.
|
overridevirtual |
Reimplemented from itk::LightObject.
References HoughTransform2DCirclesImageFilter().
|
virtual |
Set/Get the number of circles to extract.
|
virtual |
|
virtual |
Get the scale value.
|
virtual |
Set/Get the sweep angle.
|
virtual |
Get the threshold value.
|
virtual |
Specifies whether to use the spacing of the input image internally, when doing Gaussian Derivative calculation and Gaussian image filtering.
|
virtual |
Set/Get the variance of the Gaussian blurring for the accumulator.
|
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 |
Set/Get the radius of the disc to remove from the accumulator for each circle found.
|
virtual |
Threshold for the norm of the gradient: Only pixels whose gradient norm is above this threshold are processed by the filter. The threshold must be >= 0.
|
virtual |
Set the maximum radius value the filter should look for.
|
virtual |
Set the minimum radius value the filter should look for.
|
virtual |
Set/Get the number of circles to extract.
void itk::HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::SetRadius | ( | double | radius | ) |
Set both Minimum and Maximum radius values.
|
virtual |
Set the scale of the derivative function (using DoG).
|
virtual |
Set/Get the sweep angle.
|
virtual |
Set the threshold above which the filter should consider the point as a valid point.
|
virtual |
Specifies whether to use the spacing of the input image internally, when doing Gaussian Derivative calculation and Gaussian image filtering.
|
virtual |
Set/Get the variance of the Gaussian blurring for the accumulator.
|
overridevirtual |
Verifies the preconditions of this filter.
Reimplemented from itk::ProcessObject.
|
private |
Definition at line 220 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 222 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 216 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 214 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 213 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 221 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 225 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 219 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 217 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 212 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 215 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 224 of file itkHoughTransform2DCirclesImageFilter.h.
|
private |
Definition at line 223 of file itkHoughTransform2DCirclesImageFilter.h.