template<typename TInputVectorImage, typename TLabelsType = unsigned char, typename TPosteriorsPrecisionType = double, typename TPriorsPrecisionType = double>
class itk::BayesianClassifierImageFilter< TInputVectorImage, TLabelsType, TPosteriorsPrecisionType, TPriorsPrecisionType >
Performs Bayesian Classification on an image.
- Inputs and Outputs
- The input to this filter is an itk::VectorImage that represents pixel memberships to 'n' classes. This image is conveniently generated by the BayesianClassifierInitializationImageFilter. You may use that filter to generate the membership images or specify your own.
- The output of the filter is a label map (an image of unsigned char's is the default.) with pixel values indicating the classes they correspond to. Pixels with intensity 0 belong to the 0th class, 1 belong to the 1st class etc.... The classification is done by applying a Maximum decision rule to the posterior image.
- Parameters
- The filter optionally allows you to specify a prior image as well. The prior image, if specified must be a VectorImage with as many components as the number of classes. The posterior image is then generated by multiplying the prior image with the membership image. If the prior image is not specified, the posterior image is the same as the membership image. Another way to look at it is that the priors default to having a uniform distribution over the number of classes. Posterior membership of a pixel = Prior * Membership
- The filter optionally accepts a smoothing filter and number of iterations associated with the smoothing filter. The philosophy is that the filter allows you to iteratively smooth the posteriors prior to applying the decision rule. It is hoped that this would yield a better classification. The user will need to plug in his own smoothing filter with all the parameters set.
- Template parameters
- InputVectorImage, datatype of the output labelmap, precision of the posterior image, precision of the prior image.
- Author
- John Melonakos, Georgia Tech
- Note
- This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
- See also
- VectorImage
-
BayesianClassifierInitializationImageFilter
- Examples
- Examples/Statistics/BayesianClassifier.cxx.
Definition at line 84 of file itkBayesianClassifierImageFilter.h.
|
| BayesianClassifierImageFilter () |
|
virtual void | ClassifyBasedOnPosteriors () |
|
virtual void | ComputeBayesRule () |
|
void | GenerateData () override |
|
void | GenerateOutputInformation () override |
|
PosteriorsImageType * | GetPosteriorImage () |
|
virtual void | NormalizeAndSmoothPosteriors () |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
| ~BayesianClassifierImageFilter () override=default |
|
virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
|
virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
|
void | GenerateInputRequestedRegion () override |
|
| ImageToImageFilter () |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
void | VerifyInputInformation () const override |
|
| ~ImageToImageFilter () override=default |
|
virtual void | PushBackInput (const DataObject *input) |
|
virtual void | PushFrontInput (const DataObject *input) |
|
virtual void | AfterThreadedGenerateData () |
|
virtual void | AllocateOutputs () |
|
virtual void | BeforeThreadedGenerateData () |
|
void | ClassicMultiThread (ThreadFunctionType callbackFunction) |
|
void | GenerateData () override |
|
virtual const ImageRegionSplitterBase * | GetImageRegionSplitter () const |
|
| ImageSource () |
|
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion) |
|
| ~ImageSource () override=default |
|
virtual void | ThreadedGenerateData (const OutputImageRegionType ®ion, ThreadIdType threadId) |
|
virtual void | DynamicThreadedGenerateData (const OutputImageRegionType &outputRegionForThread) |
|
virtual bool | GetDynamicMultiThreading () const |
|
virtual void | SetDynamicMultiThreading (bool _arg) |
|
virtual void | DynamicMultiThreadingOn () |
|
virtual void | AddInput (DataObject *input) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
virtual void | AddOutput (DataObject *output) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
virtual void | CacheInputReleaseDataFlags () |
|
virtual void | GenerateOutputRequestedRegion (DataObject *output) |
|
DataObject * | GetInput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
|
bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
|
bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
|
bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
|
DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
|
DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
|
DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
|
| ProcessObject () |
|
virtual void | PropagateResetPipeline () |
|
virtual void | PushBackInput (const DataObject *input) |
|
virtual void | PushFrontInput (const DataObject *input) |
|
virtual void | ReleaseInputs () |
|
virtual void | RemoveInput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveInput (DataObjectPointerArraySizeType) |
|
virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
|
bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
|
virtual void | RestoreInputReleaseDataFlags () |
|
virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
|
virtual void | SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual void | SetOutput (const DataObjectIdentifierType &name, DataObject *output) |
|
virtual void | SetPrimaryInput (DataObject *object) |
|
virtual void | SetPrimaryOutput (DataObject *object) |
|
void | SetRequiredInputNames (const NameArray &) |
|
virtual void | VerifyPreconditions () const |
|
| ~ProcessObject () override |
|
DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
|
DataObject * | GetPrimaryInput () |
|
const DataObject * | GetPrimaryInput () const |
|
virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryInputName () const |
|
DataObject * | GetOutput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
|
virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryOutputName () const |
|
DataObject * | GetOutput (DataObjectPointerArraySizeType i) |
|
const DataObject * | GetOutput (DataObjectPointerArraySizeType i) const |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
virtual bool | GetThreaderUpdateProgress () const |
|
virtual void | ThreaderUpdateProgressOn () |
|
virtual void | SetThreaderUpdateProgress (bool arg) |
|
| Object () |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
|
| ~Object () override |
|
virtual LightObject::Pointer | InternalClone () const |
|
| LightObject () |
|
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
|
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
|
virtual | ~LightObject () |
|
template<typename TInputVectorImage , typename TLabelsType = unsigned char, typename TPosteriorsPrecisionType = double, typename TPriorsPrecisionType = double>
Image Type and Pixel type for the images representing the membership of a pixel to a particular class. This image has arrays as pixels, the number of elements in the array is the same as the number of classes to be used.
Definition at line 134 of file itkBayesianClassifierImageFilter.h.
template<typename TInputVectorImage , typename TLabelsType = unsigned char, typename TPosteriorsPrecisionType = double, typename TPriorsPrecisionType = double>
Image Type and Pixel type for the images representing the Posterior probability of a pixel belonging to a particular class. This image has arrays as pixels, the number of elements in the array is the same as the number of classes to be used.
Definition at line 143 of file itkBayesianClassifierImageFilter.h.
template<typename TInputVectorImage , typename TLabelsType = unsigned char, typename TPosteriorsPrecisionType = double, typename TPriorsPrecisionType = double>
Image Type and Pixel type for the images representing the Prior probability of a pixel belonging to a particular class. This image has arrays as pixels, the number of elements in the array is the same as the number of classes to be used.
Definition at line 126 of file itkBayesianClassifierImageFilter.h.
template<typename TInputVectorImage , typename TLabelsType = unsigned char, typename TPosteriorsPrecisionType = double, typename TPriorsPrecisionType = double>
Compute the posteriors using the Bayes rule. If no priors are available, then the posteriors are just a copy of the memberships. Computes the labeled map for all combinations of conditions.
template<typename TInputVectorImage , typename TLabelsType = unsigned char, typename TPosteriorsPrecisionType = double, typename TPriorsPrecisionType = double>
Generate the information describing the output data. The default implementation of this method will copy information from the input to the output. A filter may override this method if its output will have different information than its input. For instance, a filter that shrinks an image will need to provide an implementation for this method that changes the spacing of the pixels. Such filters should call their superclass' implementation of this method prior to changing the information values they need (i.e. GenerateOutputInformation() should call Superclass::GenerateOutputInformation() prior to changing the information.
Reimplemented from itk::ProcessObject.
template<typename TInputVectorImage , typename TLabelsType = unsigned char, typename TPosteriorsPrecisionType = double, typename TPriorsPrecisionType = double>
template<typename TInputVectorImage , typename TLabelsType = unsigned char, typename TPosteriorsPrecisionType = double, typename TPriorsPrecisionType = double>
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::ProcessObject.