template<typename TInputImage, typename TFeatureImage, typename TOutputPixelType = float, typename TOutputImage = Image<TOutputPixelType, TInputImage::ImageDimension>>
class itk::NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, TOutputImage >
A base class which defines the API for implementing a special class of image segmentation filters using level set methods.
- OVERVIEW
- This object defines the framework for a class of segmentation filters which use level set methods. These filters work by constructing a "feature image" onto which the evolving level set locks as it moves. In the feature image, values that are close to zero are associated with object boundaries. An original (or preprocessed) image is given to the filter as the feature image and a seed for the level set is given as the input of the filter. The seed is converted into a level set embedding which propagates according to the features calculated from the original image.
- TEMPLATE PARAMETERS
- There are two required and two optional template parameter for these filters. Of the optional parameters, the last, TOutputImage, should not be changed from its default. It is only there to instantiate the parent class correctly.
TInputImage is the image type of the initial model you will input to the filter using SetInput() or SetInitialImage().
TFeatureImage is the image type of the image from which the filter will calculate the speed term for segmentation (see INPUTS).
TOutputPixelType is the data type used for the output image phi, the implicit level set image. This should really only ever be set as float (default) or double.
- INPUTS
- The input to any subclass of this filter is the seed image for the initial level set embedding. As with other subclasses of the SparseLevelSetImageFilter, the type of the input image is is not important. The (RequestedRegion) size of the seed image must, however, match the (RequestedRegion) size of the feature image.
You must identify the initial front (surface) in the input image. You do this by specifying its isovalue through the method SetIsoSurfaceValue(float f). The algorithm will then initialize its solution using the front represented by value f. Note that the front is always represented by isosurface zero in the output and not the isosurface you specified for the input. This is because, for simplicity, the filter will shift your input image so that the active front has zero values.
- Depending on the particular application and filter that you are using, the feature image should be preprocessed with some type of noise reduction filtering. The feature image input can be of any type, but it will be cast to floating point before calculations are done.
- OUTPUTS
- The output of any subclass of this filter is a level set embedding as described in SparseFieldLevelSetImageFilter. The zero crossings of the output image give the pixels closest to the level set boundary. By ITK convention, NEGATIVE values are pixels INSIDE the segmented region and POSITIVE values are pixels OUTSIDE the segmented region.
- PARAMETERS
- The MaximumRMSChange parameter is used to determine when the solution has converged. A lower value will result in a tighter-fitting solution, but will require more computations. Too low a value could put the solver into an infinite loop unless a reasonable NumberOfIterations parameter is set. Values should always be greater than 0.0 and less than 1.0.
- The NumberOfIterations parameter can be used to halt the solution after a specified number of iterations, overriding the MaximumRMSChange halting criteria.
- The standard convention for ITK level-set segmentation filters is that POSITIVE propagation (speed) and advection terms cause the surface to EXPAND while negative terms cause the surface to CONTRACT. When the ReverseExpansionDirection parameter is set to TRUE (on), it tells the function object to reverse the standard ITK convention so that NEGATIVE terms cause EXPANSION and positive terms cause CONTRACTION.
This parameter can be safely changed as appropriate for a particular application or data set to achieve the desired behavior.
- The FeatureScaling parameter controls the magnitude of the features calculated for use in the level set propagation and advection speeds. This value simply sets both parameters to equal values at once. Some filters may only use on of these two terms and this method is a generic way to set either or both without having to know which is in use.
- The CurvatureScaling parameter controls the magnitude of the curvature values which are calculated on the evolving isophote. This is important in controlling the relative effect of curvature in the calculation. Default value is 1.0. Higher values relative to the other level set equation terms (propagation and advection) will give a smoother result.
- The PropagationScaling parameter controls the scaling of the scalar propagation (speed) term relative to other terms in the level set equation. Setting this value will override any value already set by FeatureScaling.
- The AdvectionScaling parameter controls the scaling of the vector advection field term relative to other terms in the level set equation. Setting this value will override any value already set by FeatureScaling.
- See LevelSetFunction for more information.
Definition at line 147 of file itkNarrowBandLevelSetImageFilter.h.
|
virtual const SegmentationFunctionType::VectorImageType * | GetAdvectionImage () const |
|
ValueType | GetAdvectionScaling () const |
|
ValueType | GetCurvatureScaling () const |
|
virtual FeatureImageType * | GetFeatureImage () |
|
unsigned int | GetMaximumIterations () |
|
const char * | GetNameOfClass () const override |
|
ValueType | GetPropagationScaling () const |
|
virtual SegmentationFunctionType * | GetSegmentationFunction () |
|
virtual const SegmentationFunctionType::ImageType * | GetSpeedImage () const |
|
bool | GetUseNegativeFeatures () const |
|
virtual void | SetInitialImage (InputImageType *f) |
|
void | SetMaximumRMSError (const double) override |
|
virtual void | SetSegmentationFunction (SegmentationFunctionType *s) |
|
void | SetUseNegativeFeaturesOff () |
|
|
virtual void | SetFeatureImage (const FeatureImageType *f) |
|
|
void | SetUseNegativeFeaturesOn () |
|
|
void | SetUseNegativeFeatures (bool u) |
|
|
virtual void | SetReverseExpansionDirection (bool _arg) |
|
virtual bool | GetReverseExpansionDirection () const |
|
virtual void | ReverseExpansionDirectionOn () |
|
|
void | SetFeatureScaling (ValueType v) |
|
|
void | SetPropagationScaling (ValueType v) |
|
|
void | SetAdvectionScaling (ValueType v) |
|
|
void | SetCurvatureScaling (ValueType v) |
|
|
void | SetMaximumIterations (unsigned int i) |
|
Public Member Functions inherited from itk::NarrowBandImageFilterBase< TInputImage, TOutputImage > |
void | CopyInputToOutput () override |
|
float | GetNarrowBandInnerRadius () const |
|
float | GetNarrowBandTotalRadius () const |
|
void | InsertNarrowBandNode (const IndexType &index) |
|
void | InsertNarrowBandNode (const IndexType &index, const PixelType &value, const signed char nodestate) |
|
virtual void | SetNarrowBand (NarrowBandType *ptr) |
|
virtual void | SetIsoSurfaceValue (ValueType _arg) |
|
virtual ValueType | GetIsoSurfaceValue () const |
|
void | InsertNarrowBandNode (const BandNodeType &node) |
|
void | SetNarrowBandTotalRadius (const float val) |
|
void | SetNarrowBandInnerRadius (const float val) |
|
virtual const FiniteDifferenceFunctionType ::Pointer & | GetDifferenceFunction () const |
|
virtual const IdentifierType & | GetElapsedIterations () const |
|
virtual bool | GetIsInitialized () |
|
virtual void | SetDifferenceFunction (FiniteDifferenceFunctionType *_arg) |
|
virtual void | SetIsInitialized (bool _arg) |
|
void | SetStateToInitialized () |
|
void | SetStateToUninitialized () |
|
virtual void | SetNumberOfIterations (IdentifierType _arg) |
|
virtual const IdentifierType & | GetNumberOfIterations () const |
|
virtual void | SetUseImageSpacing (bool _arg) |
|
virtual void | UseImageSpacingOn () |
|
virtual const bool & | GetUseImageSpacing () const |
|
virtual const double & | GetMaximumRMSError () const |
|
virtual void | SetRMSChange (double _arg) |
|
virtual const double & | GetRMSChange () const |
|
virtual void | SetManualReinitialization (bool _arg) |
|
virtual const bool & | GetManualReinitialization () const |
|
virtual void | ManualReinitializationOn () |
|
virtual bool | CanRunInPlace () const |
|
virtual void | SetInPlace (bool _arg) |
|
virtual bool | GetInPlace () const |
|
virtual void | InPlaceOn () |
|
const InputImageType * | GetInput () const |
|
const InputImageType * | GetInput (unsigned int idx) const |
|
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 |
|
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 | AbortGenerateDataOn () |
|
virtual void | EnlargeOutputRequestedRegion (DataObject *) |
|
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 |
|
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 |
|
|
void | CreateNarrowBand () override |
|
void | GenerateData () override |
|
| NarrowBandLevelSetImageFilter () |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
| ~NarrowBandLevelSetImageFilter () override=default |
|
|
void | InitializeIteration () override |
|
Protected Member Functions inherited from itk::NarrowBandImageFilterBase< TInputImage, TOutputImage > |
void | ClearNarrowBand () |
|
void | GetSplitRegion (const vcl_size_t &i, ThreadRegionType &splitRegion) |
|
void | Initialize () override |
|
| NarrowBandImageFilterBase () |
|
void | PostProcessOutput () override |
|
| ~NarrowBandImageFilterBase () override=default |
|
| FiniteDifferenceImageFilter () |
|
void | GenerateInputRequestedRegion () override |
|
virtual bool | Halt () |
|
virtual TimeStepType | ResolveTimeStep (const std::vector< TimeStepType > &timeStepList, const BooleanStdVectorType &valid) const |
|
virtual void | SetElapsedIterations (IdentifierType _arg) |
|
virtual bool | ThreadedHalt (void *) |
|
| ~FiniteDifferenceImageFilter () override=default |
|
virtual bool | GetRunningInPlace () const |
|
| InPlaceImageFilter ()=default |
|
void | ReleaseInputs () override |
|
| ~InPlaceImageFilter () override=default |
|
void | AllocateOutputs () override |
|
virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
|
virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
|
| ImageToImageFilter () |
|
void | VerifyInputInformation () const override |
|
| ~ImageToImageFilter () override=default |
|
virtual void | PushBackInput (const DataObject *input) |
|
virtual void | PushFrontInput (const DataObject *input) |
|
virtual void | AfterThreadedGenerateData () |
|
virtual void | BeforeThreadedGenerateData () |
|
void | ClassicMultiThread (ThreadFunctionType callbackFunction) |
|
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 | GenerateOutputInformation () |
|
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 | 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 () |
|