28 #ifndef __itkProcessObject_h
29 #define __itkProcessObject_h
141 typedef std::vector< DataObjectIdentifierType >
NameArray;
236 itkSetMacro(AbortGenerateData,
bool);
240 itkGetConstReferenceMacro(AbortGenerateData,
bool);
243 itkBooleanMacro(AbortGenerateData);
249 itkSetClampMacro(Progress,
float, 0.0f, 1.0f);
254 itkGetConstReferenceMacro(Progress,
float);
261 void UpdateProgress(
float amount);
281 virtual void Update();
289 virtual void UpdateLargestPossibleRegion();
303 virtual void UpdateOutputInformation();
307 virtual void PropagateRequestedRegion(
DataObject *output);
310 virtual void UpdateOutputData(
DataObject *output);
324 virtual void ResetPipeline();
340 virtual DataObjectPointer MakeOutput(
const DataObjectIdentifierType & );
347 virtual void SetReleaseDataFlag(
bool flag);
348 virtual bool GetReleaseDataFlag()
const;
365 itkSetMacro(ReleaseDataBeforeUpdateFlag,
bool);
366 itkGetConstReferenceMacro(ReleaseDataBeforeUpdateFlag,
bool);
367 itkBooleanMacro(ReleaseDataBeforeUpdateFlag);
372 itkGetConstReferenceMacro(NumberOfThreads,
ThreadIdType);
376 MultiThreader * GetMultiThreader()
const
377 {
return m_Threader; }
385 virtual void PrepareOutputs();
401 template<
class TDomainPartitioner,
class TAssociate >
423 virtual void DetermineNumberOfThreadsUsed();
427 void operator=(
const Self & );
430 void PrintSelf(std::ostream & os,
Indent indent)
const;
444 {
return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second :
NULL; }
446 {
return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second :
NULL; }
450 virtual void SetInput(
const DataObjectIdentifierType & key,
DataObject *input);
454 virtual void SetNthInput(DataObjectPointerArraySizeType num,
DataObject *input);
464 virtual void PushBackInput(
const DataObject *input);
465 virtual void PopBackInput();
466 virtual void PushFrontInput(
const DataObject *input);
467 virtual void PopFrontInput();
476 virtual void RemoveInput(
const DataObjectIdentifierType & key);
477 virtual void RemoveInput(DataObjectPointerArraySizeType);
481 {
return m_IndexedInputs[0]->second; }
483 {
return m_IndexedInputs[0]->second; }
487 virtual void SetPrimaryInputName(
const DataObjectIdentifierType & key);
488 virtual const char *GetPrimaryInputName(
void )
const
489 {
return this->m_IndexedInputs[0]->first.c_str(); }
493 virtual void SetPrimaryInput(
DataObject *input);
499 void SetNumberOfIndexedInputs(DataObjectPointerArraySizeType num);
507 virtual void SetNumberOfRequiredInputs(DataObjectPointerArraySizeType);
508 itkGetConstReferenceMacro(NumberOfRequiredInputs, DataObjectPointerArraySizeType);
513 bool AddRequiredInputName(
const DataObjectIdentifierType & );
514 bool AddRequiredInputName(
const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx );
515 bool RemoveRequiredInputName(
const DataObjectIdentifierType & );
516 bool IsRequiredInputName(
const DataObjectIdentifierType & )
const;
517 void SetRequiredInputNames(
const NameArray & );
525 DataObject * GetOutput(
const DataObjectIdentifierType & key);
526 const DataObject * GetOutput(
const DataObjectIdentifierType & key)
const;
530 virtual void SetPrimaryOutputName(
const DataObjectIdentifierType & key);
531 virtual const char *GetPrimaryOutputName(
void )
const
532 {
return this->m_IndexedOutputs[0]->first.c_str(); }
536 DataObject * GetOutput(DataObjectPointerArraySizeType idx);
537 const DataObject * GetOutput(DataObjectPointerArraySizeType idx)
const;
541 virtual void SetOutput(
const DataObjectIdentifierType & key,
DataObject *output);
544 virtual void RemoveOutput(
const DataObjectIdentifierType & key);
548 {
return m_IndexedOutputs[0]->second; }
550 {
return m_IndexedOutputs[0]->second; }
554 virtual void SetPrimaryOutput(
DataObject *output);
558 virtual void SetNthOutput(DataObjectPointerArraySizeType num,
DataObject *output);
562 virtual void RemoveOutput(DataObjectPointerArraySizeType idx);
564 itkSetMacro(NumberOfRequiredOutputs, DataObjectPointerArraySizeType);
565 itkGetConstReferenceMacro(NumberOfRequiredOutputs, DataObjectPointerArraySizeType);
568 void SetNumberOfIndexedOutputs(DataObjectPointerArraySizeType num);
571 DataObjectIdentifierType MakeNameFromInputIndex( DataObjectPointerArraySizeType idx )
const;
572 DataObjectIdentifierType MakeNameFromOutputIndex( DataObjectPointerArraySizeType idx )
const;
573 DataObjectPointerArraySizeType MakeIndexFromInputName(
const DataObjectIdentifierType & name )
const;
574 DataObjectPointerArraySizeType MakeIndexFromOutputName(
const DataObjectIdentifierType & name )
const;
575 bool IsIndexedInputName(
const DataObjectIdentifierType & )
const;
576 bool IsIndexedOutputName(
const DataObjectIdentifierType & )
const;
579 itkLegacyMacro(
virtual void RemoveOutput(
DataObject *output));
582 itkLegacyMacro(
void SetNumberOfOutputs(DataObjectPointerArraySizeType num));
587 itkLegacyMacro(
virtual void RemoveInput(
DataObject *input));
590 itkLegacyMacro(
void SetNumberOfInputs(DataObjectPointerArraySizeType num));
607 virtual void VerifyPreconditions();
619 virtual void VerifyInputInformation();
634 virtual void GenerateInputRequestedRegion();
647 virtual void GenerateOutputRequestedRegion(
DataObject *output);
659 virtual void GenerateOutputInformation();
668 virtual void PropagateResetPipeline();
681 virtual void ReleaseInputs();
691 virtual void CacheInputReleaseDataFlags();
696 virtual void RestoreInputReleaseDataFlags();
710 void operator=(
const Self &);
734 typedef std::set< DataObjectIdentifierType >
NameSet;
762 friend class TestProcessObject;