18 #ifndef __itkParallelSparseFieldLevelSetImageFilter_h
19 #define __itkParallelSparseFieldLevelSetImageFilter_h
36 template<
typename TNodeIndexType >
74 template<
typename TNeighborhoodType >
82 itkStaticConstMacro(
Dimension,
unsigned int, NeighborhoodType::Dimension);
117 void Print(std::ostream & os)
const;
248 template<
typename TInputImage,
typename TOutputImage >
319 itkGetConstMacro(IsoSurfaceValue,
ValueType);
333 #ifdef ITK_USE_CONCEPT_CHECKING
470 const StatusType& promote,
unsigned int InOrOut);
532 return ( value + static_cast< ValueType >( dt ) * change );
585 unsigned int InOrOut,
586 unsigned int BufferLayerNumber);
592 unsigned int BufferLayerNumber);
602 unsigned int InputLayerNumber,
603 unsigned int OutputLayerNumber,
605 unsigned int InOrOut,
606 unsigned int BufferLayerNumber,
615 unsigned int InputLayerNumber,
616 unsigned int OutputLayerNumber,
619 unsigned int InOrOut,
620 unsigned int BufferLayerNumber,
627 unsigned int InputLayerNumber,
629 unsigned int InOrOut,
630 unsigned int BufferLayerNumber,
638 unsigned int InorOut,
792 #ifndef ITK_MANUAL_INSTANTIATION
793 #include "itkParallelSparseFieldLevelSetImageFilter.hxx"
virtual void ThreadedInitializeIteration(ThreadIdType ThreadId)
void ComputeInitialThreadBoundaries()
A convenience class for storing indices which reference neighbor pixels within a neighborhood.
TOutputImage OutputImageType
bool m_InterpolateSurfaceLocation
std::vector< TimeStepType > TimeStepList
const OffsetType & GetNeighborhoodOffset(unsigned int i) const
unsigned int m_StrideTable[Dimension]
virtual void GenerateData()
const RadiusType & GetRadius() const
void SignalNeighbor(unsigned int SemaphoreArrayNumber, ThreadIdType ThreadId)
virtual void InitializeBackgroundPixels()
void ThreadedAllocateData(ThreadIdType ThreadId)
LayerNodeStorageType::Pointer m_LayerNodeStore
Barrier::Pointer m_Barrier
void GetThreadRegionSplitUniformly(ThreadIdType ThreadId, ThreadRegionType &ThreadRegion)
ParallelSparseFieldLevelSetImageFilter * Filter
OutputImageType::Pointer m_OutputImageTemp
static StatusType m_StatusNull
ThreadIdType m_NumOfThreads
void PropagateAllLayerValues()
static StatusType m_StatusChanging
static StatusType m_StatusBoundaryPixel
void ApplyUpdate(const TimeStepType &)
Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
unsigned int GetStride(unsigned int i)
void ClearInterNeighborNodeTransferBufferLayers(ThreadIdType ThreadId, unsigned int InOrOut, unsigned int BufferLayerNumber)
StatusImageType::Pointer m_StatusImageTemp
SmartPointer< Self > Pointer
bool m_BoundsCheckingActive
NeighborhoodType::RadiusType RadiusType
ParallelSparseFieldLevelSetNode< IndexType > LayerNodeType
TNeighborhoodType NeighborhoodType
ParallelSparseFieldCityBlockNeighborList< NeighborhoodIterator< OutputImageType > > m_NeighborList
void operator=(const Self &)
OutputImageType::Pointer m_OutputImage
ParallelSparseFieldLevelSetImageFilter Self
LayerNodeStorageType::Pointer m_LayerNodeStore
TimeStepType CalculateChange()
ValueType m_IsoSurfaceValue
void ProcessStatusList(LayerType *InputList, const StatusType &ChangeToStatus, const StatusType &SearchForStatus, ThreadIdType ThreadId)
Base class for all process objects that output image data.
void ThreadedProcessFirstLayerStatusLists(unsigned int InputLayerNumber, unsigned int OutputLayerNumber, const StatusType &SearchForStatus, unsigned int InOrOut, unsigned int BufferLayerNumber, ThreadIdType ThreadId)
void ConstructActiveLayer()
SmartPointer< const Self > ConstPointer
Offset< itkGetStaticConstMacro(ImageDimension) > OffsetType
OutputImageType::IndexType IndexType
virtual void ThreadedProcessPixelEnteringActiveLayer(const IndexType &, const ValueType &, ThreadIdType)
void Print(std::ostream &os) const
#define ITK_THREAD_RETURN_TYPE
int * m_ZCumulativeFrequency
void ClearList(ThreadIdType ThreadId, LayerPointerType ListPtr)
~ParallelSparseFieldCityBlockNeighborList()
static ITK_THREAD_RETURN_TYPE IterateThreaderCallback(void *arg)
static StatusType m_StatusActiveChangingUp
void CopyInsertList(ThreadIdType ThreadId, LayerPointerType FromListPtr, LayerPointerType ToListPtr)
OutputImageType::PixelType PixelType
void GetThreadRegionSplitByBoundary(ThreadIdType ThreadId, ThreadRegionType &ThreadRegion)
const unsigned int & GetArrayIndex(unsigned int i) const
OutputImageType::ValueType ValueType
ParallelSparseFieldLevelSetNode * Previous
virtual TimeStepType ThreadedCalculateChange(ThreadIdType ThreadId)
ParallelSparseFieldLevelSetNode * Next
LayerPointerType UpList[2]
FiniteDifferenceFunctionType::NeighborhoodScalesType NeighborhoodScalesType
ConditionVariable::Pointer m_Condition[2]
static StatusType m_StatusActiveChangingDown
virtual ValueType ThreadedCalculateUpdateValue(const ThreadIdType, const IndexType, const TimeStepType &dt, const ValueType &value, const ValueType &change)
This class implements a finite difference partial differential equation solver for evolving surfaces ...
LayerListType * m_LoadTransferBufferLayers
Superclass::NeighborhoodScalesType NeighborhoodScalesType
ParallelSparseFieldCityBlockNeighborList()
std::vector< bool > ValidTimeStepList
void ConstructLayer(const StatusType &from, const StatusType &to)
FiniteDifferenceFunctionType::RadiusType RadiusType
void InitializeActiveLayerValues()
FiniteDifferenceImageFilter< TInputImage, TOutputImage > Superclass
std::vector< unsigned int > m_ArrayIndex
LayerPointerType ** m_InterNeighborNodeTransferBufferLayers[2]
void ThreadedPostProcessOutput(const ThreadRegionType ®ionToProcess)
virtual void CheckLoadBalance()
static const unsigned int ImageDimension
ThreadRegionType ThreadRegion
void PropagateLayerValues(const StatusType &from, const StatusType &to, const StatusType &promote, unsigned int InOrOut)
OutputImageType::Pointer m_ShiftedImage
virtual void PrintSelf(std::ostream &os, Indent indent) const
void ThreadedInitializeData(ThreadIdType ThreadId, const ThreadRegionType &ThreadRegion)
std::vector< LayerPointerType > LayerListType
Superclass::RadiusType RadiusType
void CopyInsertInterNeighborNodeTransferBufferLayers(ThreadIdType ThreadId, LayerPointerType InputList, unsigned int InOrOut, unsigned int BufferLayerNumber)
static ValueType m_ValueZero
unsigned int m_SemaphoreArrayNumber
SimpleMutexLock m_Lock[2]
LayerPointerType DownList[2]
void ThreadedProcessStatusList(unsigned int InputLayerNumber, unsigned int OutputLayerNumber, const StatusType &ChangeToStatus, const StatusType &SearchForStatus, unsigned int InOrOut, unsigned int BufferLayerNumber, ThreadIdType ThreadId)
virtual void ThreadedApplyUpdate(const TimeStepType &dt, ThreadIdType ThreadId)
virtual void ThreadedLoadBalance(ThreadIdType ThreadId)
FiniteDifferenceFunctionType::TimeStepType TimeStepType
StatusImageType::Pointer m_StatusImage
NeighborhoodType::OffsetType OffsetType
double m_ConstantGradientValue
LayerType::Pointer LayerPointerType
OutputImageType::RegionType ThreadRegionType
LayerPointerType GetActiveListForIndex(const IndexType index)
std::vector< OffsetType > m_NeighborhoodOffset
ObjectStore< LayerNodeType > LayerNodeStorageType
void AllocateUpdateBuffer()
Control indentation during Print() invocation.
unsigned int * m_MapZToThreadNumber
static ValueType m_ValueOne
void ThreadedPropagateLayerValues(const StatusType &from, const StatusType &to, const StatusType &promote, unsigned int InorOut, ThreadIdType ThreadId)
FiniteDifferenceFunction< TOutputImage > FiniteDifferenceFunctionType
Superclass::TimeStepType TimeStepType
Define additional traits for native types such as int or float.
SparseFieldLayer< LayerNodeType > LayerType
TInputImage InputImageType
~ParallelSparseFieldLevelSetImageFilter()
A very simple linked list that is used to manage nodes in a layer of a sparse field level-set solver...
void ThreadedProcessOutsideList(unsigned int InputLayerNumber, const StatusType &ChangeToStatus, unsigned int InOrOut, unsigned int BufferLayerNumber, ThreadIdType ThreadId)
#define itkConceptMacro(name, concept)
Image< StatusType, itkGetStaticConstMacro(ImageDimension) > StatusImageType
const unsigned int & GetSize() const
A specialized memory management object for allocating and destroying contiguous blocks of objects...
void WaitForNeighbor(unsigned int SemaphoreArrayNumber, ThreadIdType ThreadId)
unsigned int GetThreadNumber(unsigned int splitAxisValue)
unsigned int * m_Boundary
ParallelSparseFieldLevelSetImageFilter()
Templated n-dimensional image class.
Superclass::RadiusType RadiusType
void ThreadedUpdateActiveLayerValues(const TimeStepType &dt, LayerType *StatusUpList, LayerType *StatusDownList, ThreadIdType ThreadId)
static const unsigned int Dimension
unsigned int ThreadIdType
StatusType m_NumberOfLayers
Simple mutual exclusion locking class.
void SignalNeighborsAndWait(ThreadIdType ThreadId)