28 #ifndef itkProcessObject_h
29 #define itkProcessObject_h
159 typedef std::vector< DataObjectIdentifierType >
NameArray;
272 itkSetMacro(AbortGenerateData,
bool);
275 itkGetConstReferenceMacro(AbortGenerateData,
bool);
278 itkBooleanMacro(AbortGenerateData);
292 #if ! defined ( ITK_FUTURE_LEGACY_REMOVE )
296 m_Progress = std::max(progress, 0.0f);
297 m_Progress = std::min(m_Progress, 1.0f);
307 itkGetConstReferenceMacro(Progress,
float);
315 void UpdateProgress(
float progress);
349 virtual void UpdateLargestPossibleRegion();
435 itkSetMacro(ReleaseDataBeforeUpdateFlag,
bool);
436 itkGetConstReferenceMacro(ReleaseDataBeforeUpdateFlag,
bool);
437 itkBooleanMacro(ReleaseDataBeforeUpdateFlag);
442 itkGetConstReferenceMacro(NumberOfThreads,
ThreadIdType);
447 {
return m_Threader; }
455 virtual void PrepareOutputs();
471 template<
typename TDomainPartitioner,
typename TAssociate >
493 virtual void DetermineNumberOfThreadsUsed();
499 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
515 {
return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second.GetPointer() : ITK_NULLPTR; }
517 {
return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second.GetPointer() : ITK_NULLPTR; }
540 virtual void PushBackInput(
const DataObject *input);
541 virtual void PopBackInput();
542 virtual void PushFrontInput(
const DataObject *input);
543 virtual void PopFrontInput();
556 {
return m_IndexedInputs[0]->second; }
558 {
return m_IndexedInputs[0]->second; }
564 {
return this->m_IndexedInputs[0]->first.c_str(); }
568 virtual void SetPrimaryInput(
DataObject *input);
607 void SetRequiredInputNames(
const NameArray & );
625 {
return this->m_IndexedOutputs[0]->first.c_str(); }
641 {
return m_IndexedOutputs[0]->second; }
643 {
return m_IndexedOutputs[0]->second; }
647 virtual void SetPrimaryOutput(
DataObject *output);
672 itkLegacyMacro(
virtual void RemoveOutput(
DataObject *output));
680 itkLegacyMacro(
virtual void RemoveInput(
DataObject *input));
700 virtual void VerifyPreconditions();
712 virtual void VerifyInputInformation();
727 virtual void GenerateInputRequestedRegion();
740 virtual void GenerateOutputRequestedRegion(
DataObject *output);
752 virtual void GenerateOutputInformation();
774 virtual void ReleaseInputs();
784 virtual void CacheInputReleaseDataFlags();
789 virtual void RestoreInputReleaseDataFlags();
825 typedef std::set< DataObjectIdentifierType >
NameSet;
853 friend class TestProcessObject;
DataObjectPointerMap m_Inputs
DataObjectPointerArraySizeType m_NumberOfRequiredInputs
Superclass::DomainType DomainType
DataObject::DataObjectIdentifierType DataObjectIdentifierType
Multi-threaded processing on a domain by processing sub-domains per thread.
virtual void PrintSelf(std::ostream &os, Indent indent) const override
virtual const bool & GetReleaseDataFlag() const
NameSet m_RequiredInputNames
bool m_ReleaseDataBeforeUpdateFlag
DataObject * GetPrimaryOutput()
Multi-threaded processing on a domain by processing sub-domains per thread.
std::vector< DataObjectIdentifierType > NameArray
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
virtual void UpdateOutputInformation()
MultiThreader * GetMultiThreader() const
virtual const char * GetPrimaryInputName(void) const
const DataObject * GetPrimaryInput() const
A forward iterator over outputs of a ProcessObject.
DomainThreader< TDomainPartitioner, ProcessObject::Self > Superclass
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
std::vector< Pointer >::size_type DataObjectPointerArraySizeType
std::map< DataObjectIdentifierType, bool > m_CachedInputReleaseDataFlags
DataObject::Pointer DataObjectPointer
DataObjectPointerMap m_Outputs
std::string DataObjectIdentifierType
DataObject * GetPrimaryInput()
MultiThreader::Pointer m_Threader
TimeStamp m_OutputInformationMTime
SmartPointer< Self > Pointer
ProcessObjectDomainThreader Self
const DataObject * GetInput(DataObjectPointerArraySizeType idx) const
SmartPointer< Self > Pointer
void ReleaseDataFlagOff()
virtual void ResetPipeline()
A forward iterator over the DataObject of a ProcessObject.
virtual void PropagateResetPipeline()
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
DataObject * GetInput(DataObjectPointerArraySizeType idx)
SmartPointer< const Self > ConstPointer
virtual void EnlargeOutputRequestedRegion(DataObject *)
class ITK_FORWARD_EXPORT ProcessObject
Generate a unique, increasing time value.
std::map< DataObjectIdentifierType, DataObjectPointer > DataObjectPointerMap
virtual const char * GetPrimaryOutputName(void) const
unsigned int ThreadIdType
ThreadIdType m_NumberOfThreads
Base class for all data objects in ITK.
virtual void PropagateRequestedRegion()
A forward iterator over outputs of a ProcessObject.
DataObjectPointerArraySizeType m_NumberOfRequiredOutputs
std::vector< DataObjectPointer > DataObjectPointerArray
virtual void GenerateData()
Control indentation during Print() invocation.
std::vector< DataObjectPointerMap::iterator > m_IndexedOutputs
A forward iterator over the DataObject of a ProcessObject.
Superclass::DomainPartitionerType DomainPartitionerType
void SetReleaseDataFlag(bool flag)
const DataObject * GetPrimaryOutput() const
Base class for most ITK classes.
std::set< DataObjectIdentifierType > NameSet
std::vector< DataObjectPointerMap::iterator > m_IndexedInputs
virtual void UpdateOutputData()
void SetProgress(float progress)