#include <itkHoughTransform2DLinesImageFilter.h>
Performs the Hough Transform to find 2D straight lines in a 2D image.
This filter derives from ImageToImageFilter. The input is an image, and all pixels above some threshold are those to be extracted. The output is the image of the accumulator. GetLines() returns a list of LinesSpatialObjects.
Lines are parameterized in the form:
\( R = x \cos(\theta) + y \sin(\theta) \) where \(R\) is the perpendicular distance from the origin and \(\theta\) the angle with the normal.
The output is the accumulator array:
The size of the array depends on the AngleAxisSize that could be set (500 by default) for the angle axis. The distance axis depends on the size of the diagonal of the input image.
Definition at line 62 of file itkHoughTransform2DLinesImageFilter.h.
Public Member Functions | |
virtual::itk::LightObject::Pointer | CreateAnother () const |
void | GenerateData () override |
LinesListType & | GetLines () |
virtual OutputImageType * | GetModifiableSimplifyAccumulator () |
const char * | GetNameOfClass () const override |
virtual const OutputImageType * | GetSimplifyAccumulator () const |
void | Simplify () |
virtual void | SetThreshold (double _arg) |
virtual double | GetThreshold () const |
virtual void | SetAngleResolution (double _arg) |
virtual double | GetAngleResolution () const |
virtual void | SetNumberOfLines (LinesListSizeType _arg) |
virtual LinesListSizeType | GetNumberOfLines () const |
virtual void | SetDiscRadius (double _arg) |
virtual double | GetDiscRadius () const |
virtual void | SetVariance (double _arg) |
virtual double | GetVariance () 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 | |
double | m_AngleResolution { 500 } |
double | m_DiscRadius { 10 } |
LinesListType | m_LinesList {} |
LinesListSizeType | m_NumberOfLines { 1 } |
ModifiedTimeType | m_OldModifiedTime { 0 } |
OutputImagePointer | m_SimplifyAccumulator {} |
double | m_Threshold { 0 } |
double | m_Variance { 5 } |
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::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::ConstPointer = SmartPointer<const Self> |
Definition at line 82 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::IndexType = typename InputImageType::IndexType |
Image index type alias
Definition at line 96 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::InputImageConstPointer = typename InputImageType::ConstPointer |
Definition at line 74 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::InputImagePointer = typename InputImageType::Pointer |
Definition at line 73 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::InputImageType = Image<TInputPixelType, 2> |
Input Image type alias
Definition at line 72 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::LinePointer = typename LineType::Pointer |
Definition at line 86 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::LinePointType = LineType::LinePointType |
Definition at line 88 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::LinesListSizeType = typename LinesListType::size_type |
Definition at line 90 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::LinesListType = std::list<LinePointer> |
Definition at line 87 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::LineType = LineSpatialObject<2> |
Line type alias
Definition at line 85 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::OutputImagePointer = typename OutputImageType::Pointer |
Definition at line 78 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::OutputImageRegionType = typename InputImageType::RegionType |
Typedef to describe the output image region type.
Definition at line 102 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::OutputImageType = Image<TOutputPixelType, 2> |
Output Image type alias
Definition at line 77 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::PixelType = typename InputImageType::PixelType |
Image pixel value type alias
Definition at line 99 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::Pointer = SmartPointer<Self> |
Smart pointer type alias support
Definition at line 81 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::Self = HoughTransform2DLinesImageFilter |
Standard "Self" type alias.
Definition at line 69 of file itkHoughTransform2DLinesImageFilter.h.
using itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::Superclass = ImageToImageFilter<InputImageType, OutputImageType> |
Standard "Superclass" type alias.
Definition at line 93 of file itkHoughTransform2DLinesImageFilter.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 |
HoughTransform2DLinesImageFilter must produce the entire output.
Reimplemented from itk::ProcessObject.
|
overridevirtual |
Method for evaluating the implicit function over the image.
Reimplemented from itk::ProcessObject.
|
overrideprotectedvirtual |
HoughTransform2DLinesImageFilter needs the entire input. Therefore it must provide an implementation GenerateInputRequestedRegion().
Reimplemented from itk::ProcessObject.
|
overrideprotectedvirtual |
HoughTransform2DLinesImageFilter's output is the accumulator array. The size of the output is a function of the size of the input and the AngleAxisSize. Since this output is a different size than the input, it must provide an implementation of GenerateOutputInformation.
Reimplemented from itk::ProcessObject.
|
virtual |
Set/Get the resolution angle. The Hough space describes (in the angle direction) [-PI,PI[ with a constant step AngleResolution.
|
virtual |
Set/Get the radius of the disc to remove from the accumulator for each line found.
LinesListType & itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::GetLines | ( | ) |
Get the list of lines. This recomputes the lines.
|
virtual |
Get the Simplified accumulator.
|
overridevirtual |
Reimplemented from itk::LightObject.
References HoughTransform2DLinesImageFilter().
|
virtual |
Set/Get the number of lines to extract
|
virtual |
|
virtual |
Set/Get the threshold above which the filter should consider the point as a valid point.
|
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 resolution angle. The Hough space describes (in the angle direction) [-PI,PI[ with a constant step AngleResolution.
|
virtual |
Set/Get the radius of the disc to remove from the accumulator for each line found.
|
virtual |
Set/Get the number of lines to extract
|
virtual |
Set/Get the threshold above which the filter should consider the point as a valid point.
|
virtual |
Set/Get the variance of the Gaussian blurring for the accumulator.
void itk::HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::Simplify | ( | ) |
Simplify the accumulator. Performs the same iteration process as the Update() method, but finds the maximum along the curve and then removes the curve.
|
private |
Definition at line 187 of file itkHoughTransform2DLinesImageFilter.h.
|
private |
Definition at line 193 of file itkHoughTransform2DLinesImageFilter.h.
|
private |
Definition at line 191 of file itkHoughTransform2DLinesImageFilter.h.
|
private |
Definition at line 192 of file itkHoughTransform2DLinesImageFilter.h.
|
private |
Definition at line 195 of file itkHoughTransform2DLinesImageFilter.h.
|
private |
Definition at line 190 of file itkHoughTransform2DLinesImageFilter.h.
|
private |
Definition at line 188 of file itkHoughTransform2DLinesImageFilter.h.
|
private |
Definition at line 194 of file itkHoughTransform2DLinesImageFilter.h.