ITK
4.2.0
Insight Segmentation and Registration Toolkit
|
#include <itkCannyEdgeDetectionImageFilter.h>
Classes | |
struct | CannyThreadStruct |
Static Public Member Functions | |
static Pointer | New () |
Static Public Attributes | |
static const unsigned int | ImageDimension = TInputImage::ImageDimension |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
static const unsigned int | InputImageDimension = TInputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageSource< TOutputImage > |
Protected Types | |
typedef DiscreteGaussianImageFilter < InputImageType, OutputImageType > | GaussianImageFilterType |
typedef MultiplyImageFilter < OutputImageType, OutputImageType, OutputImageType > | MultiplyImageFilterType |
Protected Types inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(OutputImageDimension), itkGetStaticConstMacro(InputImageDimension) > | InputToOutputRegionCopierType |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) > | OutputToInputRegionCopierType |
Private Member Functions | |
void | AllocateUpdateBuffer () |
CannyEdgeDetectionImageFilter (const Self &) | |
void | Compute2ndDerivative () |
void | Compute2ndDerivativePos () |
OutputImagePixelType | ComputeCannyEdge (const NeighborhoodType &it, void *globalData) |
void | FollowEdge (IndexType index) |
void | HysteresisThresholding () |
void | operator= (const Self &) |
void | ThreadedCompute2ndDerivative (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) |
void | ThreadedCompute2ndDerivativePos (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) |
virtual | ~CannyEdgeDetectionImageFilter () |
Static Private Member Functions | |
static ITK_THREAD_RETURN_TYPE | Compute2ndDerivativePosThreaderCallback (void *arg) |
static ITK_THREAD_RETURN_TYPE | Compute2ndDerivativeThreaderCallback (void *arg) |
Private Attributes | |
SizeValueType | m_Center |
std::slice | m_ComputeCannyEdgeSlice [ImageDimension] |
GaussianImageFilterType::Pointer | m_GaussianFilter |
OutputImagePixelType | m_LowerThreshold |
ArrayType | m_MaximumError |
MultiplyImageFilterType::Pointer | m_MultiplyImageFilter |
ListPointerType | m_NodeList |
ListNodeStorageType::Pointer | m_NodeStore |
SizeValueType | m_Stride [ImageDimension] |
OutputImageType::Pointer | m_UpdateBuffer1 |
OutputImagePixelType | m_UpperThreshold |
ArrayType | m_Variance |
DerivativeOperator < OutputImagePixelType, itkGetStaticConstMacro(ImageDimension) > | m_ComputeCannyEdge1stDerivativeOper |
DerivativeOperator < OutputImagePixelType, itkGetStaticConstMacro(ImageDimension) > | m_ComputeCannyEdge2ndDerivativeOper |
This filter is an implementation of a Canny edge detector for scalar-valued images. Based on John Canny's paper "A Computational Approach to Edge Detection"(IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. PAMI-8, No.6, November 1986), there are four major steps used in the edge-detection scheme: (1) Smooth the input image with Gaussian filter. (2) Calculate the second directional derivatives of the smoothed image. (3) Non-Maximum Suppression: the zero-crossings of 2nd derivative are found, and the sign of third derivative is used to find the correct extrema. (4) The hysteresis thresholding is applied to the gradient magnitude (multiplied with zero-crossings) of the smoothed image to find and link edges.
Definition at line 84 of file itkCannyEdgeDetectionImageFilter.h.
typedef FixedArray< double, itkGetStaticConstMacro(ImageDimension) > itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::ArrayType |
Typedef of double containers
Definition at line 140 of file itkCannyEdgeDetectionImageFilter.h.
typedef SmartPointer< const Self > itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::ConstPointer |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 98 of file itkCannyEdgeDetectionImageFilter.h.
typedef ZeroFluxNeumannBoundaryCondition< OutputImageType > itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::DefaultBoundaryConditionType |
The default boundary condition is used unless overridden *in the Evaluate() method.
Definition at line 109 of file itkCannyEdgeDetectionImageFilter.h.
|
protected |
Definition at line 235 of file itkCannyEdgeDetectionImageFilter.h.
typedef TInputImage::IndexType itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::IndexType |
Definition at line 103 of file itkCannyEdgeDetectionImageFilter.h.
typedef TInputImage::PixelType itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::InputImagePixelType |
Define pixel types.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 101 of file itkCannyEdgeDetectionImageFilter.h.
typedef TInputImage::RegionType itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::InputImageRegionType |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 127 of file itkCannyEdgeDetectionImageFilter.h.
typedef TInputImage itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::InputImageType |
Image typedef support
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 93 of file itkCannyEdgeDetectionImageFilter.h.
typedef ObjectStore< ListNodeType > itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::ListNodeStorageType |
Definition at line 118 of file itkCannyEdgeDetectionImageFilter.h.
typedef ListNode< IndexType > itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::ListNodeType |
Definition at line 117 of file itkCannyEdgeDetectionImageFilter.h.
typedef ListType::Pointer itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::ListPointerType |
Definition at line 120 of file itkCannyEdgeDetectionImageFilter.h.
typedef SparseFieldLayer< ListNodeType > itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::ListType |
Definition at line 119 of file itkCannyEdgeDetectionImageFilter.h.
|
protected |
Definition at line 237 of file itkCannyEdgeDetectionImageFilter.h.
typedef ConstNeighborhoodIterator< OutputImageType, DefaultBoundaryConditionType > itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::NeighborhoodType |
The type of data structure that is passed to this function object to evaluate at a pixel that does not lie on a data set boundary.
Definition at line 115 of file itkCannyEdgeDetectionImageFilter.h.
typedef TOutputImage::PixelType itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::OutputImagePixelType |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 102 of file itkCannyEdgeDetectionImageFilter.h.
typedef TOutputImage::RegionType itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::OutputImageRegionType |
Typedef to describe the output image region type.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 123 of file itkCannyEdgeDetectionImageFilter.h.
typedef TOutputImage itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::OutputImageType |
Some convenient typedefs.
Reimplemented from itk::ImageSource< TOutputImage >.
Definition at line 94 of file itkCannyEdgeDetectionImageFilter.h.
typedef SmartPointer< Self > itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::Pointer |
SmartPointer typedef support
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 97 of file itkCannyEdgeDetectionImageFilter.h.
typedef CannyEdgeDetectionImageFilter itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::Self |
Standard "Self" & Superclass typedef.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 89 of file itkCannyEdgeDetectionImageFilter.h.
typedef TInputImage::SizeValueType itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::SizeValueType |
Definition at line 104 of file itkCannyEdgeDetectionImageFilter.h.
typedef ImageToImageFilter< TInputImage, TOutputImage > itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::Superclass |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 90 of file itkCannyEdgeDetectionImageFilter.h.
|
protected |
End concept checking
|
private |
|
inlineprivatevirtual |
Definition at line 242 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
This allocate storage for m_UpdateBuffer, m_UpdateBuffer1
|
private |
Calculate the second derivative of the smoothed image, it writes the result to m_UpdateBuffer using the ThreadedCompute2ndDerivative() method and multithreading mechanism.
|
private |
Calculate the gradient of the second derivative of the smoothed image, it writes the result to m_UpdateBuffer1 using the ThreadedCompute2ndDerivativePos() method and multithreading mechanism.
|
staticprivate |
This callback method uses ImageSource::SplitRequestedRegion to acquire an output region that it passes to ThreadedCompute2ndDerivative for processing.
|
staticprivate |
This callback method uses ImageSource::SplitRequestedRegion to acquire an output region that it passes to ThreadedCompute2ndDerivative for processing.
|
private |
This methos is used to calculate the 2nd derivative for non-boundary pixels. It is called by the ThreadedCompute2ndDerivative method.
|
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::Object.
|
private |
Edge linking funciton
|
protectedvirtual |
A version of GenerateData() specific for image processing filters. This implementation will split the processing across multiple threads. The buffer is allocated by this method. Then the BeforeThreadedGenerateData() method is called (if provided). Then, a series of threads are spawned each calling ThreadedGenerateData(). After all the threads have completed processing, the AfterThreadedGenerateData() method is called (if provided). If an image processing filter cannot be threaded, the filter should provide an implementation of GenerateData(). That implementation is responsible for allocating the output buffer. If a filter an be threaded, it should NOT provide a GenerateData() method but should provide a ThreadedGenerateData() instead.
Reimplemented from itk::ImageSource< TOutputImage >.
|
virtual |
CannyEdgeDetectionImageFilter needs a larger input requested region than the output requested region ( derivative operators, etc). As such, CannyEdgeDetectionImageFilter needs to provide an implementation for GenerateInputRequestedRegion() in order to inform the pipeline execution model.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
virtual |
|
virtual |
Standard get/set macros for filter parameters.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
inline |
Definition at line 197 of file itkCannyEdgeDetectionImageFilter.h.
|
virtual |
|
virtual |
Standard get/set macros for filter parameters.
|
private |
Implement hysteresis thresholding
|
static |
Method for creation through the object factory.
Reimplemented from itk::Object.
|
private |
PushBackInput(), PushFronInput() in the public section force the input to be the type expected by an ImageToImageFilter. However, these methods end of "hiding" the versions from the superclass (ProcessObject) whose arguments are DataObjects. Here, we re-expose the versions from ProcessObject to avoid warnings about hiding methods from the superclass.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
protectedvirtual |
End concept checking
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
virtual |
|
virtual |
Standard get/set macros for filter parameters.
|
inline |
Set/Get the MaximumError parameter used by the Gaussian smoothing filter in this algorithm
Definition at line 167 of file itkCannyEdgeDetectionImageFilter.h.
|
virtual |
TODO: Document in the ITKv4 migration guide that the SetThreshold member function was removed from the CannyEdgeDetectionImageFilter, and that both UpperThreshold and LowerThreshold need to be set. To get the same results as with the SetThreshold method change "myfilter->SetThrehsold" to "myfilter->SetUpperThreshold", and add "myfilter->SetLowerThreshold(GetUpperThreshold()/2.0)"* Set the Threshold value for detected edges. */
|
virtual |
Standard get/set macros for filter parameters.
|
inline |
Set/Get the Variance parameter used by the Gaussian smoothing filter in this algorithm
Definition at line 151 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Split the input into "num" pieces, returning region "i" as "splitRegion". This method is called "num" times to return non-overlapping regions. The method returns the number of pieces that the input can be split into by the routine. i.e. return value is less than or equal to "num".
|
private |
Does the actual work of calculating of the 2nd derivative over a region supplied by the multithreading mechanism.
itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::typedef | ( | Concept::HasNumericTraits< InputImagePixelType > | ) |
Begin concept checking This class requires InputHasNumericTraitsCheck in the form of ( Concept::HasNumericTraits< InputImagePixelType > )
itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::typedef | ( | Concept::HasNumericTraits< OutputImagePixelType > | ) |
This class requires OutputHasNumericTraitsCheck in the form of ( Concept::HasNumericTraits< OutputImagePixelType > )
itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::typedef | ( | Concept::SameDimension< ImageDimension, OutputImageDimension > | ) |
This class requires SameDimensionCheck in the form of ( Concept::SameDimension< ImageDimension, OutputImageDimension > )
itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::typedef | ( | Concept::IsFloatingPoint< InputImagePixelType > | ) |
This class requires InputIsFloatingPointCheck in the form of ( Concept::IsFloatingPoint< InputImagePixelType > )
itk::CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::typedef | ( | Concept::IsFloatingPoint< OutputImagePixelType > | ) |
This class requires OutputIsFloatingPointCheck in the form of ( Concept::IsFloatingPoint< OutputImagePixelType > )
|
static |
ImageDimension constant
Definition at line 134 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Definition at line 349 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Function objects that are used in the inner loops of derivatiVex calculations.
Definition at line 341 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Function objects that are used in the inner loops of derivatiVex calculations.
Definition at line 343 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Definition at line 346 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Gaussian filter to smooth the input image
Definition at line 332 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Lower threshold value for identifying edges.
Definition at line 326 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
The maximum error of the gaussian blurring kernel in each dimensional direction.
Definition at line 320 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Multiply image filter to multiply with the zero crossings of the second derivative.
Definition at line 336 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Definition at line 352 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Definition at line 351 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Definition at line 348 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Update buffers used during calculation of multiple steps
Definition at line 329 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
Upper threshold value for identifying edges.
Definition at line 323 of file itkCannyEdgeDetectionImageFilter.h.
|
private |
The variance of the Gaussian Filter used in this filter
Definition at line 316 of file itkCannyEdgeDetectionImageFilter.h.
|
static |
ImageDimension constant
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 136 of file itkCannyEdgeDetectionImageFilter.h.