|
static constexpr unsigned int | ImageDimension = TOutputImage::ImageDimension |
|
static constexpr unsigned int | ImageDimension = OutputImageType::ImageDimension |
|
static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
|
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
|
static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
|
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
|
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
|
ParallelSparseFieldCityBlockNeighborList< NeighborhoodIterator< OutputImageType > > | m_NeighborList |
|
double | m_ConstantGradientValue { 1.0 } |
|
OutputImageType::Pointer | m_ShiftedImage |
|
LayerListType | m_Layers |
|
StatusType | m_NumberOfLayers |
|
StatusImageType::Pointer | m_StatusImage |
|
OutputImageType::Pointer | m_OutputImage |
|
StatusImageType::Pointer | m_StatusImageTemp |
|
OutputImageType::Pointer | m_OutputImageTemp |
|
LayerNodeStorageType::Pointer | m_LayerNodeStore |
|
ValueType | m_IsoSurfaceValue |
|
std::vector< TimeStepType > | m_TimeStepList |
|
std::vector< bool > | m_ValidTimeStepList |
|
TimeStepType | m_TimeStep |
|
ThreadIdType | m_NumOfThreads { 0 } |
|
unsigned int | m_SplitAxis { 0 } |
|
unsigned int | m_ZSize { 0 } |
|
bool | m_BoundaryChanged { false } |
|
unsigned int * | m_Boundary { nullptr } |
|
int * | m_GlobalZHistogram { nullptr } |
|
unsigned int * | m_MapZToThreadNumber { nullptr } |
|
int * | m_ZCumulativeFrequency { nullptr } |
|
ThreadData * | m_Data { nullptr } |
|
bool | m_Stop { false } |
|
bool | m_InterpolateSurfaceLocation { true } |
|
static ValueType | m_ValueOne |
|
static ValueType | m_ValueZero |
|
static StatusType | m_StatusActiveChangingUp |
|
static StatusType | m_StatusActiveChangingDown |
|
static StatusType | m_StatusNull |
|
static StatusType | m_StatusChanging |
|
static StatusType | m_StatusBoundaryPixel |
|
bool | m_BoundsCheckingActive { false } |
|
virtual void | SetNumberOfLayers (StatusType _arg) |
|
virtual StatusType | GetNumberOfLayers () const |
|
virtual void | SetIsoSurfaceValue (ValueType _arg) |
|
virtual ValueType | GetIsoSurfaceValue () const |
|
LayerPointerType | GetActiveListForIndex (const IndexType index) |
|
| ParallelSparseFieldLevelSetImageFilter () |
|
| ~ParallelSparseFieldLevelSetImageFilter () override=default |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
void | GenerateData () override |
|
void | CopyInputToOutput () override |
|
void | AllocateUpdateBuffer () override |
|
void | Initialize () override |
|
void | ConstructActiveLayer () |
|
void | InitializeActiveLayerValues () |
|
void | ConstructLayer (const StatusType &from, const StatusType &to) |
|
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) |
|
virtual void | InitializeBackgroundPixels () |
|
void | ThreadedAllocateData (ThreadIdType ThreadId) |
|
void | ThreadedInitializeData (ThreadIdType ThreadId, const ThreadRegionType &ThreadRegion) |
|
void | ComputeInitialThreadBoundaries () |
|
unsigned int | GetThreadNumber (unsigned int splitAxisValue) |
|
void | GetThreadRegionSplitByBoundary (ThreadIdType ThreadId, ThreadRegionType &ThreadRegion) |
|
void | DeallocateData () |
|
void | Iterate () |
|
virtual ValueType | ThreadedCalculateUpdateValue (const ThreadIdType, const IndexType, const TimeStepType &dt, const ValueType &value, const ValueType &change) |
|
virtual void | ThreadedProcessPixelEnteringActiveLayer (const IndexType &, const ValueType &, ThreadIdType) |
|
void | ApplyUpdate (const TimeStepType &) override |
|
virtual void | ThreadedApplyUpdate (const TimeStepType &dt, ThreadIdType ThreadId) |
|
TimeStepType | CalculateChange () override |
|
virtual TimeStepType | ThreadedCalculateChange (ThreadIdType ThreadId) |
|
void | ThreadedUpdateActiveLayerValues (const TimeStepType &dt, LayerType *UpList, LayerType *DownList, ThreadIdType ThreadId) |
|
void | CopyInsertList (ThreadIdType ThreadId, LayerPointerType FromListPtr, LayerPointerType ToListPtr) |
|
void | ClearList (ThreadIdType ThreadId, LayerPointerType ListPtr) |
|
void | CopyInsertInterNeighborNodeTransferBufferLayers (ThreadIdType ThreadId, LayerPointerType List, unsigned int InOrOut, unsigned int BufferLayerNumber) |
|
void | ClearInterNeighborNodeTransferBufferLayers (ThreadIdType ThreadId, unsigned int InOrOut, unsigned int BufferLayerNumber) |
|
void | ThreadedProcessFirstLayerStatusLists (unsigned int InputLayerNumber, unsigned int OutputLayerNumber, const StatusType &SearchForStatus, unsigned int InOrOut, unsigned int BufferLayerNumber, ThreadIdType ThreadId) |
|
void | ThreadedProcessStatusList (unsigned int InputLayerNumber, unsigned int OutputLayerNumber, const StatusType &ChangeToStatus, 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) |
|
void | ThreadedPropagateLayerValues (const StatusType &from, const StatusType &to, const StatusType &promote, unsigned int InOrOut, ThreadIdType ThreadId) |
|
void | GetThreadRegionSplitUniformly (ThreadIdType ThreadId, ThreadRegionType &ThreadRegion) |
|
void | ThreadedPostProcessOutput (const ThreadRegionType ®ionToProcess) |
|
virtual void | CheckLoadBalance () |
|
void | ThreadedLoadBalance1 (ThreadIdType ThreadId) |
|
void | ThreadedLoadBalance2 (ThreadIdType ThreadId) |
|
void | SignalNeighborsAndWait (ThreadIdType ThreadId) |
|
void | SignalNeighbor (unsigned int SemaphoreArrayNumber, ThreadIdType ThreadId) |
|
void | WaitForNeighbor (unsigned int SemaphoreArrayNumber, ThreadIdType ThreadId) |
|
virtual void | ThreadedInitializeIteration (ThreadIdType ThreadId) |
|
| itkPadStruct (ITK_CACHE_LINE_ALIGNMENT, ThreadDataUnaligned, ThreadDataPadded) |
|
| itkAlignedTypedef (ITK_CACHE_LINE_ALIGNMENT, ThreadDataPadded, ThreadData) |
|
|
using | InputToOutputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::OutputImageDimension, Self::InputImageDimension > |
|
using | OutputToInputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::InputImageDimension, Self::OutputImageDimension > |
|
| FiniteDifferenceImageFilter () |
|
| ~FiniteDifferenceImageFilter () override=default |
|
void | GenerateInputRequestedRegion () override |
|
virtual bool | Halt () |
|
virtual bool | ThreadedHalt (void *) |
|
virtual void | InitializeIteration () |
|
virtual TimeStepType | ResolveTimeStep (const std::vector< TimeStepType > &timeStepList, const std::vector< bool > &valid) const |
|
virtual void | SetElapsedIterations (IdentifierType _arg) |
|
virtual void | PostProcessOutput () |
|
| InPlaceImageFilter ()=default |
|
| ~InPlaceImageFilter () override=default |
|
void | AllocateOutputs () override |
|
void | ReleaseInputs () override |
|
virtual bool | GetRunningInPlace () const |
|
| ImageToImageFilter () |
|
| ~ImageToImageFilter () override=default |
|
void | VerifyInputInformation () ITKv5_CONST override |
|
virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
|
virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
|
void | PushBackInput (const DataObject *input) override |
|
void | PushFrontInput (const DataObject *input) override |
|
| ImageSource () |
|
| ~ImageSource () override=default |
|
void | ClassicMultiThread (ThreadFunctionType callbackFunction) |
|
virtual void | ThreadedGenerateData (const OutputImageRegionType ®ion, ThreadIdType threadId) |
|
virtual void | DynamicThreadedGenerateData (const OutputImageRegionType &outputRegionForThread) |
|
virtual void | BeforeThreadedGenerateData () |
|
virtual void | AfterThreadedGenerateData () |
|
virtual const ImageRegionSplitterBase * | GetImageRegionSplitter () const |
|
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion) |
|
virtual bool | GetDynamicMultiThreading () const |
|
virtual void | SetDynamicMultiThreading (bool _arg) |
|
virtual void | DynamicMultiThreadingOn () |
|
virtual void | DynamicMultiThreadingOff () |
|
| ProcessObject () |
|
| ~ProcessObject () override |
|
DataObject * | GetInput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
|
DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
|
virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
|
virtual void | SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input) |
|
virtual void | AddInput (DataObject *input) |
|
virtual void | RemoveInput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveInput (DataObjectPointerArraySizeType) |
|
DataObject * | GetPrimaryInput () |
|
const DataObject * | GetPrimaryInput () const |
|
virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryInputName () const |
|
virtual void | SetPrimaryInput (DataObject *object) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
|
bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
|
bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
|
void | SetRequiredInputNames (const NameArray &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
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 |
|
virtual void | SetOutput (const DataObjectIdentifierType &name, DataObject *output) |
|
virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
virtual void | SetPrimaryOutput (DataObject *object) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output) |
|
virtual void | AddOutput (DataObject *output) |
|
virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
|
DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
|
bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
|
bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
|
virtual void | VerifyPreconditions () ITKv5_CONST |
|
virtual void | GenerateOutputRequestedRegion (DataObject *output) |
|
virtual void | GenerateOutputInformation () |
|
virtual void | PropagateResetPipeline () |
|
virtual void | CacheInputReleaseDataFlags () |
|
virtual void | RestoreInputReleaseDataFlags () |
|
virtual bool | GetThreaderUpdateProgress () const |
|
virtual void | ThreaderUpdateProgressOn () |
|
virtual void | ThreaderUpdateProgressOff () |
|
virtual void | SetThreaderUpdateProgress (bool arg) |
|
| Object () |
|
| ~Object () override |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
|
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 () |
|
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
|
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
|
static constexpr float | progressFixedToFloat (uint32_t fixed) |
|
static uint32_t | progressFloatToFixed (float f) |
|
bool | m_IsInitialized |
|
IdentifierType | m_NumberOfIterations |
|
IdentifierType | m_ElapsedIterations |
|
bool | m_ManualReinitialization |
|
double | m_RMSChange |
|
double | m_MaximumRMSError |
|
bool | m_DynamicMultiThreading |
|
bool | m_Updating |
|
TimeStamp | m_OutputInformationMTime |
|
std::atomic< int > | m_ReferenceCount |
|
template<typename TInputImage, typename 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 255 of file itkParallelSparseFieldLevelSetImageFilter.h.