SimpleITK
|
Enhance M-dimensional objects in N-dimensional images. More...
#include <sitkObjectnessMeasureImageFilter.h>
Enhance M-dimensional objects in N-dimensional images.
This filter is a generalization of Frangi's vesselness measurement for detecting M-dimensional object in N-dimensional space. For example a vessel is a 1-D object in 3-D space. The filter can enhance blob-like structures (M=0), vessel-like structures (M=1), 2D plate-like structures (M=2), hyper-plate-like structures (M=3) in N-dimensional images, with M<N.
This filter takes a scalar image as input and produces a real valued image as output which contains the objectness measure at each pixel. Internally, it computes a Hessian via discrete central differences. Before applying this filter it is expected that a Gaussian smoothing filter at an appropriate scale (sigma) was applied to the input image.
The enhancement is based on the eigenvalues of the Hessian matrix. For the Frangi's vesselness case were M=1 and N=3 we have the 3 eigenvalues such that \( | \lambda_1 | < | \lambda_2 | < |\lambda_3 | \) . The formula follows:
\[ R_A = \frac{|\lambda_2|}{|\lambda_3|}, \; R_B = \frac{|\lambda_2|}{|\lambda_2\lambda_3|}, \; S = \sqrt{\lambda_1^2+\lambda_2^2+\lambda_3^2} \]
\[ V_{\sigma}= \begin{cases} (1-e^{-\frac{R_A^2}{2\alpha^2}}) \cdot e^{\frac{R_B^2}{2\beta^2}} \cdot (1-e^{-\frac{S^2}{2\gamma^2}}) & \text{if } \lambda_2<0 \text{ and } \lambda_3<0 \text{,}\\ 0 & \text{otherwise} \end{cases} \]
Definition at line 55 of file sitkObjectnessMeasureImageFilter.h.
Public Types | |
using | PixelIDTypeList = RealPixelIDTypeList |
using | Self = ObjectnessMeasureImageFilter |
Public Types inherited from itk::simple::ImageFilter | |
using | Self = ImageFilter |
Public Types inherited from itk::simple::ProcessObject | |
using | Self = ProcessObject |
Public Member Functions | |
Self & | BrightObjectOff () |
Self & | BrightObjectOn () |
Image | Execute (const Image &image1) |
double | GetAlpha () const |
double | GetBeta () const |
bool | GetBrightObject () const |
double | GetGamma () const |
std::string | GetName () const |
unsigned int | GetObjectDimension () const |
bool | GetScaleObjectnessMeasure () const |
ObjectnessMeasureImageFilter () | |
Self & | ScaleObjectnessMeasureOff () |
Self & | ScaleObjectnessMeasureOn () |
Self & | SetAlpha (double Alpha) |
Self & | SetBeta (double Beta) |
Self & | SetBrightObject (bool BrightObject) |
Self & | SetGamma (double Gamma) |
Self & | SetObjectDimension (unsigned int ObjectDimension) |
Self & | SetScaleObjectnessMeasure (bool ScaleObjectnessMeasure) |
std::string | ToString () const |
virtual | ~ObjectnessMeasureImageFilter () |
Public Member Functions inherited from itk::simple::ImageFilter | |
ImageFilter () | |
virtual | ~ImageFilter ()=0 |
Public Member Functions inherited from itk::simple::ProcessObject | |
virtual void | Abort () |
virtual int | AddCommand (itk::simple::EventEnum event, const std::function< void()> &func) |
Directly add a callback to observe an event. More... | |
virtual int | AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd) |
Add a Command Object to observer the event. More... | |
virtual float | GetProgress () const |
An Active Measurement of the progress of execution. More... | |
virtual bool | HasCommand (itk::simple::EventEnum event) const |
Query of this object has any registered commands for event. More... | |
ProcessObject () | |
virtual void | RemoveAllCommands () |
Remove all registered commands. More... | |
virtual | ~ProcessObject () |
virtual void | DebugOn () |
virtual void | DebugOff () |
virtual bool | GetDebug () const |
virtual void | SetDebug (bool debugFlag) |
virtual void | SetNumberOfThreads (unsigned int n) |
virtual unsigned int | GetNumberOfThreads () const |
virtual void | SetNumberOfWorkUnits (unsigned int n) |
virtual unsigned int | GetNumberOfWorkUnits () const |
Private Types | |
using | MemberFunctionType = Image(Self::*)(const Image &image1) |
Private Member Functions | |
template<class TImageType > | |
Image | ExecuteInternal (const Image &image1) |
Private Attributes | |
double | m_Alpha {0.5} |
double | m_Beta {0.5} |
bool | m_BrightObject {true} |
double | m_Gamma {5.0} |
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > | m_MemberFactory |
unsigned int | m_ObjectDimension {1u} |
bool | m_ScaleObjectnessMeasure {true} |
Friends | |
struct | detail::MemberFunctionAddressor< MemberFunctionType > |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::simple::ProcessObject | |
static bool | GetGlobalDefaultDebug () |
static void | GlobalDefaultDebugOff () |
static void | GlobalDefaultDebugOn () |
static void | SetGlobalDefaultDebug (bool debugFlag) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static void | SetGlobalWarningDisplay (bool flag) |
static bool | GetGlobalWarningDisplay () |
static double | GetGlobalDefaultCoordinateTolerance () |
Access the global tolerance to determine congruent spaces. More... | |
static void | SetGlobalDefaultCoordinateTolerance (double) |
Access the global tolerance to determine congruent spaces. More... | |
static double | GetGlobalDefaultDirectionTolerance () |
Access the global tolerance to determine congruent spaces. More... | |
static void | SetGlobalDefaultDirectionTolerance (double) |
Access the global tolerance to determine congruent spaces. More... | |
static bool | SetGlobalDefaultThreader (const std::string &threader) |
Set/Get the default threader used for process objects. More... | |
static std::string | GetGlobalDefaultThreader () |
Set/Get the default threader used for process objects. More... | |
static void | SetGlobalDefaultNumberOfThreads (unsigned int n) |
static unsigned int | GetGlobalDefaultNumberOfThreads () |
Set/Get the default threader used for process objects. More... | |
Protected Member Functions inherited from itk::simple::ImageFilter | |
void | CheckImageMatchingDimension (const Image &image1, const Image &image2, const std::string &image2Name) |
void | CheckImageMatchingPixelType (const Image &image1, const Image &image2, const std::string &image2Name) |
void | CheckImageMatchingSize (const Image &image1, const Image &image2, const std::string &image2Name) |
Protected Member Functions inherited from itk::simple::ProcessObject | |
virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
virtual itk::ProcessObject * | GetActiveProcess () |
virtual void | OnActiveProcessDelete () |
virtual void | onCommandDelete (const itk::simple::Command *cmd) noexcept |
virtual void | PreUpdate (itk::ProcessObject *p) |
virtual void | RemoveITKObserver (EventCommand &e) |
Protected Member Functions inherited from itk::simple::NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
Static Protected Member Functions inherited from itk::simple::ImageFilter | |
template<class TImageType > | |
static void | FixNonZeroIndex (TImageType *img) |
Static Protected Member Functions inherited from itk::simple::ProcessObject | |
template<class TImageType > | |
static TImageType::ConstPointer | CastImageToITK (const Image &img) |
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector> | |
static Image | CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img) |
template<unsigned int VImageDimension, unsigned int VLength, template< unsigned int > class TVector> | |
static Image | CastITKToImage (itk::Image< TVector< VLength >, VImageDimension > *img) |
template<class TImageType > | |
static Image | CastITKToImage (TImageType *img) |
static const itk::EventObject & | GetITKEventObject (EventEnum e) |
template<typename T > | |
static std::ostream & | ToStringHelper (std::ostream &os, const T &v) |
static std::ostream & | ToStringHelper (std::ostream &os, const char &v) |
static std::ostream & | ToStringHelper (std::ostream &os, const signed char &v) |
static std::ostream & | ToStringHelper (std::ostream &os, const unsigned char &v) |
|
private |
Setup for member function dispatching
Definition at line 153 of file sitkObjectnessMeasureImageFilter.h.
Define the pixels types supported by this filter
Definition at line 67 of file sitkObjectnessMeasureImageFilter.h.
Definition at line 57 of file sitkObjectnessMeasureImageFilter.h.
|
virtual |
Destructor
itk::simple::ObjectnessMeasureImageFilter::ObjectnessMeasureImageFilter | ( | ) |
Default Constructor that takes no arguments and initializes default parameters
|
inline |
Definition at line 131 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Set the value of BrightObject to true or false respectfully.
Definition at line 130 of file sitkObjectnessMeasureImageFilter.h.
Execute the filter on the input image
|
private |
|
inline |
Set/Get Alpha, the weight corresponding to R_A (the ratio of the smallest eigenvalue that has to be large to the larger ones). Smaller values lead to increased sensitivity to the object dimensionality.
Definition at line 78 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Set/Get Beta, the weight corresponding to R_B (the ratio of the largest eigenvalue that has to be small to the larger ones). Smaller values lead to increased sensitivity to the object dimensionality.
Definition at line 88 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Enhance bright structures on a dark background if true, the opposite if false.
Definition at line 136 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Set/Get Gamma, the weight corresponding to S (the Frobenius norm of the Hessian matrix, or second-order structureness)
Definition at line 98 of file sitkObjectnessMeasureImageFilter.h.
|
inlinevirtual |
Name of this class
Implements itk::simple::ProcessObject.
Definition at line 139 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Set/Get the dimensionality of the object (0: points (blobs), 1: lines (vessels), 2: planes (plate-like structures), 3: hyper-planes. ObjectDimension must be smaller than ImageDimension.
Definition at line 122 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Toggle scaling the objectness measure with the magnitude of the largest absolute eigenvalue
Definition at line 112 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Definition at line 107 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Set the value of ScaleObjectnessMeasure to true or false respectfully.
Definition at line 106 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Set/Get Alpha, the weight corresponding to R_A (the ratio of the smallest eigenvalue that has to be large to the larger ones). Smaller values lead to increased sensitivity to the object dimensionality.
Definition at line 73 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Set/Get Beta, the weight corresponding to R_B (the ratio of the largest eigenvalue that has to be small to the larger ones). Smaller values lead to increased sensitivity to the object dimensionality.
Definition at line 83 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Enhance bright structures on a dark background if true, the opposite if false.
Definition at line 127 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Set/Get Gamma, the weight corresponding to S (the Frobenius norm of the Hessian matrix, or second-order structureness)
Definition at line 93 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Set/Get the dimensionality of the object (0: points (blobs), 1: lines (vessels), 2: planes (plate-like structures), 3: hyper-planes. ObjectDimension must be smaller than ImageDimension.
Definition at line 117 of file sitkObjectnessMeasureImageFilter.h.
|
inline |
Toggle scaling the objectness measure with the magnitude of the largest absolute eigenvalue
Definition at line 103 of file sitkObjectnessMeasureImageFilter.h.
|
virtual |
Print ourselves out
Reimplemented from itk::simple::ProcessObject.
|
friend |
Definition at line 157 of file sitkObjectnessMeasureImageFilter.h.
|
private |
Definition at line 162 of file sitkObjectnessMeasureImageFilter.h.
|
private |
Definition at line 165 of file sitkObjectnessMeasureImageFilter.h.
|
private |
Definition at line 173 of file sitkObjectnessMeasureImageFilter.h.
|
private |
Definition at line 167 of file sitkObjectnessMeasureImageFilter.h.
|
private |
Definition at line 159 of file sitkObjectnessMeasureImageFilter.h.
|
private |
Definition at line 171 of file sitkObjectnessMeasureImageFilter.h.
|
private |
Definition at line 169 of file sitkObjectnessMeasureImageFilter.h.