ITK
6.0.0
Insight Toolkit
|
#include <itkRGBGibbsPriorFilter.h>
The RGBGibbsPriorFilter applies Gibbs Prior model for the segmentation of MRF images.
The core of the method is based on the minimization of a Gibbsian energy function. This energy function f can be divided into three part:
\[ f = f_1 + f_2 + f_3 \]
where \(f_1\) is related to the object homogeneity, \(f_2\) is related to the boundary smoothness, \(f_3\) is related to the constraint of the observation (or the noise model).
The two force components \(f_1\) and \(f_3\) are minimized by the GradientEnergy method while \(f_2\) is minimized by the GibbsTotalEnergy method.
This filter only works with 3D images.
Definition at line 56 of file itkRGBGibbsPriorFilter.h.
Public Member Functions | |
virtual unsigned int | GetBoundaryGradient () const |
LabelledImageType | GetLabelledImage () |
unsigned int | GetMaximumNumberOfIterations () const override |
const char * | GetNameOfClass () const override |
unsigned int | GetNumberOfClasses () const override |
virtual double | GetObjectThreshold () const |
virtual IndexType | GetStartPoint () const |
virtual void | SetBoundaryGradient (unsigned int _arg) |
void | SetClassifier (typename ClassifierType::Pointer ptrToClassifier) |
void | SetLabelledImage (LabelledImageType image) |
virtual void | SetObjectThreshold (double _arg) |
virtual void | SetStartPoint (IndexType _arg) |
virtual void | SetTrainingImage (TrainingImageType _arg) |
virtual TrainingImageType | GetTrainingImage () const |
void | SetNumberOfClasses (const unsigned int numberOfClasses) override |
void | SetMaximumNumberOfIterations (const unsigned int numberOfIterations) override |
virtual void | SetClusterSize (unsigned int _arg) |
virtual unsigned int | GetClusterSize () const |
virtual void | SetObjectLabel (LabelType _arg) |
virtual LabelType | GetObjectLabel () const |
virtual void | SetCliqueWeight_1 (double _arg) |
virtual double | GetCliqueWeight_1 () const |
virtual void | SetCliqueWeight_2 (double _arg) |
virtual double | GetCliqueWeight_2 () const |
virtual void | SetCliqueWeight_3 (double _arg) |
virtual double | GetCliqueWeight_3 () const |
virtual void | SetCliqueWeight_4 (double _arg) |
virtual double | GetCliqueWeight_4 () const |
virtual void | SetCliqueWeight_5 (double _arg) |
virtual double | GetCliqueWeight_5 () const |
virtual void | SetCliqueWeight_6 (double _arg) |
virtual double | GetCliqueWeight_6 () const |
Public Member Functions inherited from itk::MRFImageFilter< TInputImage, TClassifiedImage > | |
virtual std::vector< double > | GetMRFNeighborhoodWeight () |
const NeighborhoodRadiusType | GetNeighborhoodRadius () const |
virtual const unsigned int & | GetNumberOfIterations () const |
virtual const MRFStopEnum & | GetStopCondition () const |
void | SetClassifier (typename ClassifierType::Pointer ptrToClassifier) |
virtual void | SetMRFNeighborhoodWeight (std::vector< double > betaMatrix) |
void | SetNeighborhoodRadius (const NeighborhoodRadiusType &) |
void | SetNeighborhoodRadius (const SizeValueType *radiusArray) |
void | SetNeighborhoodRadius (const SizeValueType) |
virtual void | SetErrorTolerance (double _arg) |
virtual double | GetErrorTolerance () const |
virtual void | SetSmoothingFactor (double _arg) |
virtual double | GetSmoothingFactor () const |
Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TClassifiedImage > | |
const InputImageType * | GetInput () const |
const InputImageType * | GetInput (unsigned int idx) const |
const char * | GetNameOfClass () const override |
void | PopBackInput () override |
void | PopFrontInput () override |
virtual void | PushBackInput (const InputImageType *input) |
virtual void | PushFrontInput (const InputImageType *input) |
virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
virtual void | SetInput (const InputImageType *input) |
virtual void | SetInput (unsigned int, const TInputImage *image) |
virtual void | SetCoordinateTolerance (double _arg) |
virtual double | GetCoordinateTolerance () const |
virtual void | SetDirectionTolerance (double _arg) |
virtual double | GetDirectionTolerance () const |
Public Member Functions inherited from itk::ImageSource< TClassifiedImage > | |
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 |
Public Member Functions inherited from itk::ProcessObject | |
virtual void | AbortGenerateDataOn () |
virtual const bool & | GetAbortGenerateData () const |
DataObjectPointerArray | GetIndexedInputs () |
DataObjectPointerArray | GetIndexedOutputs () |
NameArray | GetInputNames () const |
DataObjectPointerArray | GetInputs () |
MultiThreaderType * | 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 (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 | SetNumberOfWorkUnits (ThreadIdType _arg) |
virtual const 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::MRFImageFilter< TInputImage, TClassifiedImage > | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TClassifiedImage > | |
static double | GetGlobalDefaultCoordinateTolerance () |
static double | GetGlobalDefaultDirectionTolerance () |
static void | SetGlobalDefaultCoordinateTolerance (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::MRFImageFilter< TInputImage, TClassifiedImage > | |
static constexpr unsigned int | ClassifiedImageDimension = TClassifiedImage::ImageDimension |
static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TClassifiedImage > | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageSource< TClassifiedImage > | |
static constexpr unsigned int | OutputImageDimension |
Private Types | |
using | InputImageSizeType = typename TInputImage::SizeType |
Private Member Functions | |
void | GenerateMediumImage () |
double | GibbsEnergy (unsigned int i, unsigned int k, unsigned int k1) |
void | GibbsTotalEnergy (int i) |
void | GreyScalarBoundary (LabelledImageIndexType Index3D) |
unsigned int | LabelRegion (int i, int l, int change) |
void | RegionEraser () |
int | Sim (int a, int b) |
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::ClassifiedImageType = TClassifiedImage |
Type definitions for the training image.
Definition at line 90 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::ClassifierType = ImageClassifierBase<TInputImage, TClassifiedImage> |
Type definitions for classifier to be used for the MRF labeling.
Definition at line 106 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 65 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::IndexType = typename TInputImage::IndexType |
Definition at line 110 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::InputImageConstPointer = typename TInputImage::ConstPointer |
Definition at line 84 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::InputImagePointer = typename TInputImage::Pointer |
Definition at line 83 of file itkRGBGibbsPriorFilter.h.
|
private |
Definition at line 246 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::InputImageType = TInputImage |
A smart pointer to the input image type.
Definition at line 82 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::InputImageVecType = typename TInputImage::PixelType |
Input pixel type.
Definition at line 109 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::InputPixelType = typename TInputImage::PixelType |
Type definition for the input image pixel type.
Definition at line 87 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::LabelledImageIndexType = typename TClassifiedImage::IndexType |
Type definition for the classified image index type.
Definition at line 98 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::LabelledImageType = typename TClassifiedImage::Pointer |
Type definitions for the labelled image. Derived from the training image.
Definition at line 95 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::LabelType = unsigned int |
Type used as identifier for the labels.
Definition at line 103 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::MatrixType = vnl_matrix<double> |
Type of matrix to use.
Definition at line 212 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::Pointer = SmartPointer<Self> |
Definition at line 64 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::Self = RGBGibbsPriorFilter |
Standard "Self" type alias.
Definition at line 62 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::Superclass = MRFImageFilter<TInputImage, TClassifiedImage> |
Definition at line 63 of file itkRGBGibbsPriorFilter.h.
using itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::TrainingImageType = typename TClassifiedImage::Pointer |
Definition at line 91 of file itkRGBGibbsPriorFilter.h.
|
protected |
|
overrideprotecteddefault |
|
protected |
Allocate memory for classified image pixel status.
|
protectedvirtual |
|
protectedvirtual |
|
overrideprotectedvirtual |
This method causes the filter to generate its output.
Reimplemented from itk::MRFImageFilter< TInputImage, TClassifiedImage >.
|
private |
Create the intermediate image.
|
virtual |
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the threshold for the object size.
|
inline |
Get the labelled image.
Definition at line 123 of file itkRGBGibbsPriorFilter.h.
|
inlineoverridevirtual |
Get the number of iterations of the Iterated Conditional Mode (ICM) algorithm.
Reimplemented from itk::MRFImageFilter< TInputImage, TClassifiedImage >.
Definition at line 169 of file itkRGBGibbsPriorFilter.h.
|
overridevirtual |
Reimplemented from itk::MRFImageFilter< TInputImage, TClassifiedImage >.
|
inlineoverridevirtual |
Get the number of classes.
Reimplemented from itk::MRFImageFilter< TInputImage, TClassifiedImage >.
Definition at line 147 of file itkRGBGibbsPriorFilter.h.
|
virtual |
Set/Get the label for the object region.
|
virtual |
|
virtual |
|
virtual |
Set/Get the image required for training type classifiers.
|
private |
Calculate the energy in each cluster.
|
private |
Minimize the local characteristic \(f_2\) term in the energy function. Calculates \(H_2\).
|
private |
Smooth the image in piecewise fashion. Calculates \(H_1\).
|
private |
Label a region.
|
overrideprotectedvirtual |
Minimize the functional to be used.
Reimplemented from itk::MRFImageFilter< TInputImage, TClassifiedImage >.
|
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::MRFImageFilter< TInputImage, TClassifiedImage >.
|
private |
Erase small regions. Removes the tiny bias inside the object region.
|
virtual |
void itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::SetClassifier | ( | typename ClassifierType::Pointer | ptrToClassifier | ) |
Set the classifier.
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the value for clique weights.
|
virtual |
Set/Get the threshold for the object size.
void itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >::SetLabelledImage | ( | LabelledImageType | image | ) |
Set the labelled image.
|
inlineoverridevirtual |
Set/Get the number of iteration of the Iterated Conditional Mode (ICM) algorithm. A default value is set at 50 iterations.
Reimplemented from itk::MRFImageFilter< TInputImage, TClassifiedImage >.
Definition at line 155 of file itkRGBGibbsPriorFilter.h.
|
inlineoverridevirtual |
Set the number of classes.
Reimplemented from itk::MRFImageFilter< TInputImage, TClassifiedImage >.
Definition at line 134 of file itkRGBGibbsPriorFilter.h.
|
virtual |
Set/Get the label for the object region.
|
virtual |
|
virtual |
|
virtual |
Set/Get the image required for training type classifiers.
|
private |
Check if the values are identical.
|
staticconstexpr |
Extract the input image dimension.
Definition at line 185 of file itkRGBGibbsPriorFilter.h.
|
private |
Threshold for the existence of a boundary.
Definition at line 266 of file itkRGBGibbsPriorFilter.h.
|
private |
Weight for \(H_1\).
Definition at line 269 of file itkRGBGibbsPriorFilter.h.
|
private |
Definition at line 263 of file itkRGBGibbsPriorFilter.h.
|
private |
Weight for cliques that v/h smooth boundary.
Definition at line 322 of file itkRGBGibbsPriorFilter.h.
|
private |
Weight for clique that has an intermediate smooth boundary.
Definition at line 325 of file itkRGBGibbsPriorFilter.h.
|
private |
Weight for clique that has a diagonal smooth boundary.
Definition at line 328 of file itkRGBGibbsPriorFilter.h.
|
private |
Weight for clique consists only object pixels.
Definition at line 331 of file itkRGBGibbsPriorFilter.h.
|
private |
Weight for clique consists only background pixels.
Definition at line 334 of file itkRGBGibbsPriorFilter.h.
|
private |
Weight for other cliques.
Definition at line 337 of file itkRGBGibbsPriorFilter.h.
|
private |
Region sizes smaller than this threshold value will be erased.
Definition at line 302 of file itkRGBGibbsPriorFilter.h.
|
private |
Weight for \(H_2\).
Definition at line 272 of file itkRGBGibbsPriorFilter.h.
|
private |
Image depth.
Definition at line 299 of file itkRGBGibbsPriorFilter.h.
|
private |
Image height.
Definition at line 296 of file itkRGBGibbsPriorFilter.h.
|
private |
Image width.
Definition at line 293 of file itkRGBGibbsPriorFilter.h.
|
private |
Input.
Definition at line 249 of file itkRGBGibbsPriorFilter.h.
|
private |
Output.
Definition at line 255 of file itkRGBGibbsPriorFilter.h.
|
private |
Array to store the state of each pixel.
Definition at line 281 of file itkRGBGibbsPriorFilter.h.
|
private |
Point giving lowest value of \(H_1\) in neighborhood.
Definition at line 311 of file itkRGBGibbsPriorFilter.h.
|
private |
Maximum number of iterations.
Definition at line 261 of file itkRGBGibbsPriorFilter.h.
|
private |
Intermediate result image.
Definition at line 284 of file itkRGBGibbsPriorFilter.h.
|
private |
Number of classes that need to be classified.
Definition at line 258 of file itkRGBGibbsPriorFilter.h.
|
private |
Label for object region.
Definition at line 305 of file itkRGBGibbsPriorFilter.h.
|
private |
Definition at line 370 of file itkRGBGibbsPriorFilter.h.
|
private |
Number of SA iterations.
Definition at line 278 of file itkRGBGibbsPriorFilter.h.
|
private |
Used for erasing regions.
Definition at line 314 of file itkRGBGibbsPriorFilter.h.
|
private |
Used for erasing regions.
Definition at line 317 of file itkRGBGibbsPriorFilter.h.
|
private |
Seed.
Definition at line 290 of file itkRGBGibbsPriorFilter.h.
|
private |
Start region of the object.
Definition at line 275 of file itkRGBGibbsPriorFilter.h.
|
private |
Used by the SA algorithm.
Definition at line 287 of file itkRGBGibbsPriorFilter.h.
|
private |
Image to train the filter.
Definition at line 252 of file itkRGBGibbsPriorFilter.h.
|
private |
Number of channels in the image.
Definition at line 308 of file itkRGBGibbsPriorFilter.h.