template<class TInputImage, class TOutputImage>
class itk::ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
This class implements a finite difference partial differential equation solver for evolving surfaces embedded in volumes as level-sets.
- The ``sparse field'' approach to the level-set model is a logical extension of the classical narrow band technique, which seeks to minimize computational effort by restricting calculations to those pixels in a region of interest around the moving surface (the -level curve). The sparse field method uses a narrow band that is exactly the width needed to calculate changes on the level curve for the next time step. Because the band of grid points under consideration is so sparse, this approach has several advantages: the algorithm does exactly the number of calculations needed to determine the next position of the -level curve, and the distance transform around the level curve can be recomputed at each iteration.
- The sparse field algorithm works by constructing a linked list of indices that are adjacent to the -level set. These indices are called the ``active set''. The values at these active set indices define the position of the -level curve. The active set indices are shifted to follow the distance transform embedding of the -level curve as their values move in and out of a fixed numerical range about . In this way, the active set is maintained as only those pixels adjacent to the evolving surface. Calculations are then done only at indices contained in the active set.
- The city-block neighborhoods of the active set indices are maintained as separate lists called ``layers''. At each iteration, the values at the layers are reinitialized as the distance transform from the active set. The number of layers can be adjusted according to the footprint needed for the calculations on the level curve.
- Briefly, the sparse field solver algorithm is as follows:
- For each active layer index : Compute the change at , the grid point in the embedding, based on local geometry and external forces and using a stable numerical scheme.
- For each active layer index , add the change to the grid point value and redefine the active set indices and those of its layers based on any value changes which have moved outside of the numerical range allowed for the active set.
- Starting with the first layers adjacent to the active set and moving outwards, reconstruct the distance transform by setting values in the layers according to their neighbors. At the very outer layers, add or remove indices which have come into or moved out of the sparse field.
- HOW TO USE THIS CLASS
- Typically, this class should be subclassed with additional functionality for specific applications. It is possible, however to use this solver as a filter directly by instantiating it and supplying it with an appropriate LevelSetFunction object via the SetDifferenceFunction method. See the subclasses and their associated documentation for more information on using this class. Also see the FiniteDifferenceImageFilter documentation for a general overview of this class of solvers.
- INPUTS
- This filter takes an itk::Image as input. The appropriate type of input image is entirely determined by the application. As a rule, however, the input type is immediately converted to the output type before processing. This is because the input is not assumed to be a real value type and must be converted to signed, real values for the calculations. The input values will also be shifted by the isosurface value so that the algorithm only needs to consider the zero level set.
- OUTPUTS
- The output of the filter is the distance transform embedding of the isosurface as the zero level set. Values outside the surface will be negative and values inside the surface will be positive. The distance transform only holds for those indices in layers around the active layer. Elsewhere, the values are a fixed positive or negative that is one greater than the layer of greatest magnitude. In other words, if there are three layers, then inside values increase only to 4.0 and outside values only to -4.0.
- PARAMETERS
- The NumberOfLayers parameter controls the number of layers inside and outside of the active set (see description above). The sparse field will contain 2*NumberOfLayers+1 lists of indices: the active set and city block neighbors inside and outside the active set. It is important to specify enough layers to cover the footprint of your calculations. Curvature calculations in three dimensions, for example, require 3 layers. In two dimensions, a minimum of 2 layers is probably required. Higher order derivatives and other geometrical measures may require more layers. If too few layers are specified, then the calculations will pull values from the background, which may consist of arbitrary or random values.
- The IsoSurfaceValue indicates which value in the input represents the interface of interest. By default, this value is zero. When the solver initializes, it will subtract the IsoSurfaceValue from all values, in the input, shifting the isosurface of interest to zero in the output.
- IMPORTANT!
- Read the documentation for FiniteDifferenceImageFilter before attempting to use this filter. The solver requires that you specify a FiniteDifferenceFunction to use for calculations. This is set using the method SetDifferenceFunction in the parent class.
- REFERENCES
- Whitaker, Ross. A Level-Set Approach to 3D Reconstruction from Range Data. International Journal of Computer Vision. V. 29 No. 3, 203-231. 1998.
- Sethian, J.A. Level Set Methods. Cambridge University Press. 1996.
Definition at line 249 of file itkParallelSparseFieldLevelSetImageFilter.h.
|
void | AllocateUpdateBuffer () |
|
void | ApplyUpdate (const TimeStepType &) |
|
TimeStepType | CalculateChange () |
|
virtual void | CheckLoadBalance () |
|
void | ClearInterNeighborNodeTransferBufferLayers (ThreadIdType ThreadId, unsigned int InOrOut, unsigned int BufferLayerNumber) |
|
void | ClearList (ThreadIdType ThreadId, LayerPointerType ListPtr) |
|
void | ComputeInitialThreadBoundaries () |
|
void | ConstructActiveLayer () |
|
void | ConstructLayer (const StatusType &from, const StatusType &to) |
|
void | CopyInputToOutput () |
|
void | CopyInsertInterNeighborNodeTransferBufferLayers (ThreadIdType ThreadId, LayerPointerType InputList, unsigned int InOrOut, unsigned int BufferLayerNumber) |
|
void | CopyInsertList (ThreadIdType ThreadId, LayerPointerType FromListPtr, LayerPointerType ToListPtr) |
|
void | DeallocateData () |
|
virtual void | GenerateData () |
|
unsigned int | GetThreadNumber (unsigned int splitAxisValue) |
|
void | GetThreadRegionSplitByBoundary (ThreadIdType ThreadId, ThreadRegionType &ThreadRegion) |
|
void | GetThreadRegionSplitUniformly (ThreadIdType ThreadId, ThreadRegionType &ThreadRegion) |
|
void | Initialize () |
|
void | InitializeActiveLayerValues () |
|
virtual void | InitializeBackgroundPixels () |
|
void | Iterate () |
|
| ParallelSparseFieldLevelSetImageFilter () |
|
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
|
void | ProcessStatusList (LayerType *InputList, const StatusType &ChangeToStatus, const StatusType &SearchForStatus, ThreadIdType ThreadId) |
|
void | PropagateAllLayerValues () |
|
void | PropagateLayerValues (const StatusType &from, const StatusType &to, const StatusType &promote, unsigned int InOrOut) |
|
void | SignalNeighbor (unsigned int SemaphoreArrayNumber, ThreadIdType ThreadId) |
|
void | SignalNeighborsAndWait (ThreadIdType ThreadId) |
|
void | ThreadedAllocateData (ThreadIdType ThreadId) |
|
virtual void | ThreadedApplyUpdate (const TimeStepType &dt, ThreadIdType ThreadId) |
|
virtual TimeStepType | ThreadedCalculateChange (ThreadIdType ThreadId) |
|
virtual ValueType | ThreadedCalculateUpdateValue (const ThreadIdType, const IndexType, const TimeStepType &dt, const ValueType &value, const ValueType &change) |
|
void | ThreadedInitializeData (ThreadIdType ThreadId, const ThreadRegionType &ThreadRegion) |
|
virtual void | ThreadedInitializeIteration (ThreadIdType ThreadId) |
|
virtual void | ThreadedLoadBalance (ThreadIdType ThreadId) |
|
void | ThreadedPostProcessOutput (const ThreadRegionType ®ionToProcess) |
|
void | ThreadedProcessFirstLayerStatusLists (unsigned int InputLayerNumber, unsigned int OutputLayerNumber, const StatusType &SearchForStatus, unsigned int InOrOut, unsigned int BufferLayerNumber, ThreadIdType ThreadId) |
|
void | ThreadedProcessOutsideList (unsigned int InputLayerNumber, const StatusType &ChangeToStatus, unsigned int InOrOut, unsigned int BufferLayerNumber, ThreadIdType ThreadId) |
|
virtual void | ThreadedProcessPixelEnteringActiveLayer (const IndexType &, const ValueType &, ThreadIdType) |
|
void | ThreadedProcessStatusList (unsigned int InputLayerNumber, unsigned int OutputLayerNumber, const StatusType &ChangeToStatus, const StatusType &SearchForStatus, unsigned int InOrOut, unsigned int BufferLayerNumber, ThreadIdType ThreadId) |
|
void | ThreadedPropagateLayerValues (const StatusType &from, const StatusType &to, const StatusType &promote, unsigned int InorOut, ThreadIdType ThreadId) |
|
void | ThreadedUpdateActiveLayerValues (const TimeStepType &dt, LayerType *StatusUpList, LayerType *StatusDownList, ThreadIdType ThreadId) |
|
void | WaitForAll () |
|
void | WaitForNeighbor (unsigned int SemaphoreArrayNumber, ThreadIdType ThreadId) |
|
| ~ParallelSparseFieldLevelSetImageFilter () |
|
| FiniteDifferenceImageFilter () |
|
virtual void | GenerateInputRequestedRegion () |
|
virtual bool | Halt () |
|
virtual void | InitializeIteration () |
|
virtual void | PostProcessOutput () |
|
virtual TimeStepType | ResolveTimeStep (const std::vector< TimeStepType > &timeStepList, const std::vector< bool > &valid) const |
|
virtual void | SetElapsedIterations (IdentifierType _arg) |
|
virtual bool | ThreadedHalt (void *) |
|
virtual | ~FiniteDifferenceImageFilter () |
|
virtual void | AllocateOutputs () |
|
virtual bool | GetRunningInPlace () const |
|
| InPlaceImageFilter () |
|
virtual void | ReleaseInputs () |
|
| ~InPlaceImageFilter () |
|
virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
|
virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
|
virtual void | VerifyInputInformation () |
|
void | PushBackInput (const DataObject *input) |
|
void | PushFrontInput (const DataObject *input) |
|
| ImageToImageFilter () |
|
| ~ImageToImageFilter () |
|
virtual void | AfterThreadedGenerateData () |
|
virtual void | BeforeThreadedGenerateData () |
|
| ImageSource () |
|
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int num, OutputImageRegionType &splitRegion) |
|
virtual void | ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) |
|
virtual | ~ImageSource () |
|
virtual void | AddInput (DataObject *input) |
|
virtual void | AddOutput (DataObject *output) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &) |
|
virtual void | CacheInputReleaseDataFlags () |
|
virtual void | GenerateOutputInformation () |
|
virtual void | GenerateOutputRequestedRegion (DataObject *output) |
|
virtual const
DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () |
|
bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
|
bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
|
bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
|
| itkLegacyMacro (virtual void RemoveInput(DataObject *input)) |
|
| itkLegacyMacro (virtual void RemoveOutput(DataObject *output)) |
|
| itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num)) |
|
| itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num)) |
|
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 | 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 num, DataObject *input) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual void | SetOutput (const DataObjectIdentifierType &key, DataObject *output) |
|
virtual void | SetPrimaryInput (DataObject *input) |
|
virtual void | SetPrimaryOutput (DataObject *output) |
|
void | SetRequiredInputNames (const NameArray &) |
|
virtual void | VerifyPreconditions () |
|
| ~ProcessObject () |
|
DataObject * | GetInput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
|
DataObject * | GetInput (DataObjectPointerArraySizeType) |
|
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 idx) |
|
const DataObject * | GetOutput (DataObjectPointerArraySizeType idx) const |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual const
DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () |
|
| Object () |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &time) |
|
virtual | ~Object () |
|
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 () |
|