Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions

mitk::SegmentationSink Class Reference

#include <mitkSegmentationSink.h>

Inheritance diagram for mitk::SegmentationSink:
Inheritance graph
[legend]
Collaboration diagram for mitk::SegmentationSink:
Collaboration graph
[legend]

List of all members.

Public Types

typedef SegmentationSink Self
typedef NonBlockingAlgorithm Superclass
typedef itk::SmartPointer< SelfPointer
typedef itk::SmartPointer
< const Self
ConstPointer

Public Member Functions

virtual const char * GetClassName () const
virtual ::itk::LightObject::Pointer CreateAnother (void) const

Static Public Member Functions

static Pointer New (void)

Protected Member Functions

 SegmentationSink ()
virtual ~SegmentationSink ()
virtual void Initialize (const NonBlockingAlgorithm *other=NULL)
virtual bool ReadyToRun ()
virtual bool ThreadedUpdateFunction ()
void InsertBelowGroupNode (mitk::DataNode *node)
 to be called by subclasses when they want to insert some resulting object (binary image, surface, ...) into the data tree
DataNodeLookForPointerTargetBelowGroupNode (const char *name)
DataNodeGetGroupNode ()

Detailed Description

Definition at line 27 of file mitkSegmentationSink.h.


Member Typedef Documentation

typedef itk::SmartPointer<const Self> mitk::SegmentationSink::ConstPointer

Reimplemented from mitk::NonBlockingAlgorithm.

Reimplemented in mitk::CalculateSegmentationVolume, and mitk::ShowSegmentationAsSurface.

Definition at line 31 of file mitkSegmentationSink.h.

typedef itk::SmartPointer<Self> mitk::SegmentationSink::Pointer

Reimplemented from mitk::NonBlockingAlgorithm.

Reimplemented in mitk::CalculateSegmentationVolume, and mitk::ShowSegmentationAsSurface.

Definition at line 31 of file mitkSegmentationSink.h.

Reimplemented from mitk::NonBlockingAlgorithm.

Reimplemented in mitk::CalculateSegmentationVolume, and mitk::ShowSegmentationAsSurface.

Definition at line 31 of file mitkSegmentationSink.h.

Reimplemented from mitk::NonBlockingAlgorithm.

Reimplemented in mitk::CalculateSegmentationVolume, and mitk::ShowSegmentationAsSurface.

Definition at line 31 of file mitkSegmentationSink.h.


Constructor & Destructor Documentation

mitk::SegmentationSink::SegmentationSink (  ) [protected]

Definition at line 24 of file mitkSegmentationSink.cpp.

{
}
mitk::SegmentationSink::~SegmentationSink (  ) [protected, virtual]

Definition at line 28 of file mitkSegmentationSink.cpp.

{
}

Member Function Documentation

virtual ::itk::LightObject::Pointer mitk::SegmentationSink::CreateAnother ( void   ) const [inline, virtual]
virtual const char* mitk::SegmentationSink::GetClassName (  ) const [virtual]
DataNode * mitk::SegmentationSink::GetGroupNode (  ) [protected]

Definition at line 83 of file mitkSegmentationSink.cpp.

References mitk::NonBlockingAlgorithm::GetPointerParameter().

Referenced by InsertBelowGroupNode().

{
  DataNode::Pointer groupNode;
  GetPointerParameter("Group node", groupNode);

  return groupNode.GetPointer();
}
void mitk::SegmentationSink::Initialize ( const NonBlockingAlgorithm other = NULL ) [protected, virtual]

Reimplemented from mitk::NonBlockingAlgorithm.

Reimplemented in mitk::ShowSegmentationAsSurface.

Definition at line 32 of file mitkSegmentationSink.cpp.

References mitk::NonBlockingAlgorithm::GetParameter(), mitk::NonBlockingAlgorithm::GetPointerParameter(), mitk::NonBlockingAlgorithm::Initialize(), mitk::NonBlockingAlgorithm::SetParameter(), mitk::NonBlockingAlgorithm::SetPointerParameter(), and mitk::NonBlockingAlgorithm::UnDefineTriggerParameter().

{ 
  Superclass::Initialize(other);
  // sinks should be called explicitly from the tool, because otherwise the order of setting "Input" and "Group node" would matter
  UnDefineTriggerParameter("Input");

  // some basedata output
  DataNode::Pointer groupNode;
  bool showResult(true);

  if (other)
  {
    other->GetPointerParameter("Group node", groupNode);
    other->GetParameter("Show result", showResult);
  }

  SetPointerParameter("Group node", groupNode );
  SetParameter("Show result", showResult );
}
void mitk::SegmentationSink::InsertBelowGroupNode ( mitk::DataNode node ) [protected]

to be called by subclasses when they want to insert some resulting object (binary image, surface, ...) into the data tree

Definition at line 69 of file mitkSegmentationSink.cpp.

References mitk::DataNode::GetData(), GetGroupNode(), mitk::RenderingManager::GetInstance(), mitk::WeakPointer< TObjectType >::IsNotNull(), mitk::NonBlockingAlgorithm::m_DataStorage, and mitk::RenderingManager::RequestUpdateAll().

{
  DataNode* groupNode = GetGroupNode();

  if (m_DataStorage.IsNotNull())
  {
    if (node)
      node->GetData()->DisconnectPipeline();
    m_DataStorage->Add( node, groupNode );
  }
    
  RenderingManager::GetInstance()->RequestUpdateAll();
}
DataNode * mitk::SegmentationSink::LookForPointerTargetBelowGroupNode ( const char *  name ) [protected]

Definition at line 91 of file mitkSegmentationSink.cpp.

References mitk::NonBlockingAlgorithm::GetPointerParameter(), mitk::WeakPointer< TObjectType >::IsNotNull(), and mitk::NonBlockingAlgorithm::m_DataStorage.

{
  DataNode::Pointer groupNode;
  GetPointerParameter("Group node", groupNode);

  if (groupNode.IsNotNull() && m_DataStorage.IsNotNull())
  {
    return m_DataStorage->GetNamedDerivedNode(name, groupNode, true);
  }

  return NULL;

}
static Pointer mitk::SegmentationSink::New ( void   ) [inline, static]
bool mitk::SegmentationSink::ReadyToRun (  ) [protected, virtual]

Reimplemented from mitk::NonBlockingAlgorithm.

Reimplemented in mitk::CalculateSegmentationVolume, and mitk::ShowSegmentationAsSurface.

Definition at line 52 of file mitkSegmentationSink.cpp.

References mitk::NonBlockingAlgorithm::GetPointerParameter().

{
  Image::Pointer image;
  GetPointerParameter("Input", image);

  DataNode::Pointer groupNode;
  GetPointerParameter("Group node", groupNode);

  return image.IsNotNull() && groupNode.IsNotNull();
}
bool mitk::SegmentationSink::ThreadedUpdateFunction (  ) [protected, virtual]

Reimplemented from mitk::NonBlockingAlgorithm.

Reimplemented in mitk::CalculateSegmentationVolume, and mitk::ShowSegmentationAsSurface.

Definition at line 63 of file mitkSegmentationSink.cpp.

{
  return true;
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines