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

mitk::DataNode Class Reference
[Data Management Classes]

Class for nodes of the DataTree. More...

#include <mitkDataNode.h>

List of all members.

Public Types

typedef mitk::Geometry3D::Pointer Geometry3DPointer
typedef std::vector
< itk::SmartPointer< Mapper > > 
MapperVector
typedef std::map< const
mitk::BaseRenderer
*, mitk::PropertyList::Pointer
MapOfPropertyLists
typedef std::set< std::string > GroupTagList
typedef DataNode Self
typedef itk::DataObject Superclass
typedef itk::SmartPointer< SelfPointer
typedef itk::SmartPointer
< const Self
ConstPointer

Public Member Functions

virtual const char * GetClassName () const
mitk::MapperGetMapper (MapperSlotId id) const
BaseDataGetData () const
 Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
vtkLinearTransform * GetVtkTransform (int t=0) const
 Get the transformation applied prior to displaying the data as a vtkTransform.
InteractorGetInteractor () const
 Get the Interactor.
virtual void SetData (mitk::BaseData *baseData)
 Set the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
virtual void SetInteractor (Interactor *interactor)
 Set the Interactor.
mitk::DataNodeoperator= (const DataNode &right)
mitk::DataNodeoperator= (BaseData *right)
virtual void SetMapper (MapperSlotId id, mitk::Mapper *mapper)
virtual void UpdateOutputInformation ()
virtual void SetRequestedRegionToLargestPossibleRegion ()
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
virtual bool VerifyRequestedRegion ()
virtual void SetRequestedRegion (itk::DataObject *data)
virtual void CopyInformation (const itk::DataObject *data)
void SetProperty (const char *propertyKey, BaseProperty *property, const mitk::BaseRenderer *renderer=NULL)
 Set the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if NULL, use BaseRenderer-independent PropertyList). This is set-by-value.
void ReplaceProperty (const char *propertyKey, BaseProperty *property, const mitk::BaseRenderer *renderer=NULL)
 Replace the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if NULL, use BaseRenderer-independent PropertyList). This is set-by-reference.
void AddProperty (const char *propertyKey, BaseProperty *property, const mitk::BaseRenderer *renderer=NULL, bool overwrite=false)
 Add the property (instance of BaseProperty) if it does not exist (or always if overwrite is true) with key propertyKey in the PropertyList of the renderer (if NULL, use BaseRenderer-independent PropertyList). This is set-by-value.
mitk::PropertyListGetPropertyList (const mitk::BaseRenderer *renderer=NULL) const
 Get the PropertyList of the renderer. If renderer is NULL, the BaseRenderer-independent PropertyList of this DataNode is returned.
void ConcatenatePropertyList (PropertyList *pList, bool replace=false)
 Add values from another PropertyList.
mitk::BasePropertyGetProperty (const char *propertyKey, const mitk::BaseRenderer *renderer=NULL) const
 Get the property (instance of BaseProperty) with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.
template<typename T >
bool GetProperty (itk::SmartPointer< T > &property, const char *propertyKey, const mitk::BaseRenderer *renderer=NULL) const
 Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.
template<typename T >
bool GetProperty (T *&property, const char *propertyKey, const mitk::BaseRenderer *renderer=NULL) const
 Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.
template<typename T >
bool GetPropertyValue (const char *propertyKey, T &value, mitk::BaseRenderer *renderer=NULL) const
 Convenience access method for GenericProperty<T> properties (T being the type of the second parameter)
GroupTagList GetGroupTags () const
bool GetBoolProperty (const char *propertyKey, bool &boolValue, mitk::BaseRenderer *renderer=NULL) const
 Convenience access method for bool properties (instances of BoolProperty)
bool GetIntProperty (const char *propertyKey, int &intValue, mitk::BaseRenderer *renderer=NULL) const
 Convenience access method for int properties (instances of IntProperty)
bool GetFloatProperty (const char *propertyKey, float &floatValue, mitk::BaseRenderer *renderer=NULL) const
 Convenience access method for float properties (instances of FloatProperty)
bool GetStringProperty (const char *propertyKey, std::string &string, mitk::BaseRenderer *renderer=NULL) const
 Convenience access method for string properties (instances of StringProperty)
bool GetColor (float rgb[3], mitk::BaseRenderer *renderer=NULL, const char *propertyKey="color") const
 Convenience access method for color properties (instances of ColorProperty)
bool GetLevelWindow (mitk::LevelWindow &levelWindow, mitk::BaseRenderer *renderer=NULL, const char *propertyKey="levelwindow") const
 Convenience access method for level-window properties (instances of LevelWindowProperty)
void SetSelected (bool selected, mitk::BaseRenderer *renderer=NULL)
 set the node as selected
bool IsSelected (mitk::BaseRenderer *renderer=NULL)
 set the node as selected
bool GetName (std::string &nodeName, mitk::BaseRenderer *renderer=NULL, const char *propertyKey="name") const
 Convenience access method for accessing the name of an object (instance of StringProperty with property-key "name")
virtual std::string GetName () const
 Extra convenience access method for accessing the name of an object (instance of StringProperty with property-key "name").
virtual void SetName (const char *name)
 Extra convenience access method to set the name of an object.
virtual void SetName (const std::string name)
 Extra convenience access method to set the name of an object.
bool GetVisibility (bool &visible, mitk::BaseRenderer *renderer, const char *propertyKey="visible") const
 Convenience access method for visibility properties (instances of BoolProperty with property-key "visible")
bool GetOpacity (float &opacity, mitk::BaseRenderer *renderer, const char *propertyKey="opacity") const
 Convenience access method for opacity properties (instances of FloatProperty)
bool IsOn (const char *propertyKey, mitk::BaseRenderer *renderer, bool defaultIsOn=true) const
 Convenience access method for boolean properties (instances of BoolProperty). Return value is the value of the property. If the property is not found, the value of defaultIsOn is returned.
bool IsVisible (mitk::BaseRenderer *renderer, const char *propertyKey="visible", bool defaultIsOn=true) const
 Convenience access method for visibility properties (instances of BoolProperty). Return value is the visibility. Default is visible==true, i.e., true is returned even if the property (propertyKey) is not found.
void SetColor (const mitk::Color &color, mitk::BaseRenderer *renderer=NULL, const char *propertyKey="color")
 Convenience method for setting color properties (instances of ColorProperty)
void SetColor (float red, float green, float blue, mitk::BaseRenderer *renderer=NULL, const char *propertyKey="color")
 Convenience method for setting color properties (instances of ColorProperty)
void SetColor (const float rgb[3], mitk::BaseRenderer *renderer=NULL, const char *propertyKey="color")
 Convenience method for setting color properties (instances of ColorProperty)
void SetVisibility (bool visible, mitk::BaseRenderer *renderer=NULL, const char *propertyKey="visible")
 Convenience method for setting visibility properties (instances of BoolProperty)
void SetOpacity (float opacity, mitk::BaseRenderer *renderer=NULL, const char *propertyKey="opacity")
 Convenience method for setting opacity properties (instances of FloatProperty)
void SetLevelWindow (mitk::LevelWindow levelWindow, mitk::BaseRenderer *renderer=NULL, const char *propertyKey="levelwindow")
 Convenience method for setting level-window properties (instances of LevelWindowProperty)
void SetIntProperty (const char *propertyKey, int intValue, mitk::BaseRenderer *renderer=NULL)
 Convenience method for setting int properties (instances of IntProperty)
void SetBoolProperty (const char *propertyKey, bool boolValue, mitk::BaseRenderer *renderer=NULL)
 Convenience method for setting int properties (instances of IntProperty)
void SetFloatProperty (const char *propertyKey, float floatValue, mitk::BaseRenderer *renderer=NULL)
 Convenience method for setting int properties (instances of IntProperty)
void SetStringProperty (const char *propertyKey, const char *string, mitk::BaseRenderer *renderer=NULL)
 Convenience method for setting int properties (instances of IntProperty)
virtual unsigned long GetMTime () const
 Get the timestamp of the last change of the contents of this node or the referenced BaseData.
unsigned long GetDataReferenceChangedTime () const
 Get the timestamp of the last change of the reference to the BaseData.
virtual void SetInteractorEnabled (const bool &enabled)
 Adds or removes the associated interactor to mitk::GLobalInteraction.
virtual void EnableInteractor ()
 Adds the interactor to mitk::GlobalInteraction.
virtual void DisableInteractor ()
 Removes the Interactor from mitk::GlobalInteraction.
virtual bool IsInteractorEnabled () const
 Tests, if the interactor is already added to mitk::GlobalInteraction.

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 DataNode ()
virtual ~DataNode ()
virtual void PropertyListModified (const itk::Object *caller, const itk::EventObject &event)

Protected Attributes

MapperVector m_Mappers
 Mapper-slots.
BaseData::Pointer m_Data
 The data object (instance of BaseData, e.g., an Image) managed by this DataNode.
PropertyList::Pointer m_PropertyList
 BaseRenderer-independent PropertyList.
MapOfPropertyLists m_MapOfPropertyLists
 Map associating each BaseRenderer with its own PropertyList.
Interactor::Pointer m_Interactor
 Interactor, that handles the Interaction.
itk::TimeStamp m_DataReferenceChangedTime
 Timestamp of the last change of m_Data.
unsigned long m_PropertyListModifiedObserverTag

Detailed Description

Class for nodes of the DataTree.

Contains the data (instance of BaseData), a list of mappers, which can draw the data, a transform (vtkTransform) and a list of properties (PropertyList).

Warning:
Change in semantics of SetProperty() since Aug 25th 2006. Check your usage of this method if you do more with properties than just call SetProperty( "key", new SomeProperty("value") ).

Definition at line 66 of file mitkDataNode.h.


Member Typedef Documentation

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

Definition at line 75 of file mitkDataNode.h.

Definition at line 70 of file mitkDataNode.h.

typedef std::set<std::string> mitk::DataNode::GroupTagList

Definition at line 73 of file mitkDataNode.h.

Definition at line 72 of file mitkDataNode.h.

typedef std::vector< itk::SmartPointer< Mapper > > mitk::DataNode::MapperVector

Definition at line 71 of file mitkDataNode.h.

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

Definition at line 75 of file mitkDataNode.h.

Definition at line 75 of file mitkDataNode.h.

typedef itk::DataObject mitk::DataNode::Superclass

Definition at line 75 of file mitkDataNode.h.


Constructor & Destructor Documentation

mitk::DataNode::DataNode (  ) [protected]

Definition at line 91 of file mitkDataNode.cpp.

References m_Mappers, m_PropertyList, m_PropertyListModifiedObserverTag, New(), and PropertyListModified().

                       : m_Data(NULL), m_PropertyListModifiedObserverTag(0)
{
  m_Mappers.resize(10);

  m_PropertyList = PropertyList::New();

  // subscribe for modified event
  itk::MemberCommand<mitk::DataNode>::Pointer _PropertyListModifiedCommand =
    itk::MemberCommand<mitk::DataNode>::New();
  _PropertyListModifiedCommand->SetCallbackFunction(this, &mitk::DataNode::PropertyListModified);
  m_PropertyListModifiedObserverTag = m_PropertyList->AddObserver(itk::ModifiedEvent(), _PropertyListModifiedCommand);
}
mitk::DataNode::~DataNode (  ) [protected, virtual]

Definition at line 105 of file mitkDataNode.cpp.

References mitk::GlobalInteraction::GetInstance(), and mitk::GlobalInteraction::RemoveInteractor().

{
  if(m_PropertyList.IsNotNull())
    // remove modified event listener
    m_PropertyList->RemoveObserver(m_PropertyListModifiedObserverTag);

  Interactor* interactor = this->GetInteractor();

  if ( interactor )
  {
    mitk::GlobalInteraction::GetInstance()->RemoveInteractor( interactor );  
  }
  m_Mappers.clear();
  m_Data = NULL;
}

Member Function Documentation

void mitk::DataNode::AddProperty ( const char *  propertyKey,
BaseProperty property,
const mitk::BaseRenderer renderer = NULL,
bool  overwrite = false 
)
void mitk::DataNode::ConcatenatePropertyList ( PropertyList pList,
bool  replace = false 
)

Add values from another PropertyList.

Overwrites values in m_PropertyList only when possible (i.e. when types are compatible). If you want to allow for object type changes (replacing a "visible":BoolProperty with "visible":IntProperty, set the

Parameters:
replace.
replacetrue: if
pListcontains a property "visible" of type ColorProperty and our m_PropertyList also has a "visible" property of a different type (e.g. BoolProperty), change the type, i.e. replace the objects behind the pointer.
See also:
SetProperty
ReplaceProperty
m_PropertyList

Definition at line 213 of file mitkDataNode.cpp.

{
  m_PropertyList->ConcatenatePropertyList(pList, replace);
}
void mitk::DataNode::CopyInformation ( const itk::DataObject *  data ) [virtual]

Definition at line 195 of file mitkDataNode.cpp.

{
}
void mitk::DataNode::DisableInteractor (  ) [virtual]

Removes the Interactor from mitk::GlobalInteraction.

Definition at line 540 of file mitkDataNode.cpp.

{
  SetInteractorEnabled( false );
}
void mitk::DataNode::EnableInteractor (  ) [virtual]

Adds the interactor to mitk::GlobalInteraction.

Definition at line 535 of file mitkDataNode.cpp.

{
  SetInteractorEnabled( true );
}
bool mitk::DataNode::GetBoolProperty ( const char *  propertyKey,
bool &  boolValue,
mitk::BaseRenderer renderer = NULL 
) const

Convenience access method for bool properties (instances of BoolProperty)

Returns:
true property was found

Definition at line 275 of file mitkDataNode.cpp.

References mitk::GenericProperty< T >::GetValue().

Referenced by mitk::PointSetGLMapper2D::ApplyProperties(), mitk::PlanarFigureMapper2D::InitializePlanarFigurePropertiesFromDataNode(), mitk::ImageMapperGL2D::Paint(), mitk::VtkPropRenderer::PickObject(), QmitkDataManagerView::TextureInterpolationChanged(), and QmitkDataManagerView::ToggleVisibilityOfSelectedNodes().

{
  mitk::BoolProperty::Pointer boolprop = dynamic_cast<mitk::BoolProperty*>(GetProperty(propertyKey, renderer));
  if(boolprop.IsNull())
    return false;

  boolValue = boolprop->GetValue();
  return true;
}
virtual const char* mitk::DataNode::GetClassName (  ) const [virtual]
bool mitk::DataNode::GetColor ( float  rgb[3],
mitk::BaseRenderer renderer = NULL,
const char *  propertyKey = "color" 
) const

Convenience access method for color properties (instances of ColorProperty)

Returns:
true property was found

Definition at line 320 of file mitkDataNode.cpp.

Referenced by mitk::EnhancedPointSetVtkMapper3D::ApplyProperties(), mitk::Mapper::GetColor(), mitk::PlanarFigureMapper2D::InitializePlanarFigurePropertiesFromDataNode(), mitk::SplineMapper2D::Paint(), mitk::PointSetGLMapper2D::Paint(), and QmitkToolWorkingDataSelectionBox::UpdateDataDisplay().

{
  mitk::ColorProperty::Pointer colorprop = dynamic_cast<mitk::ColorProperty*>(GetProperty(propertyKey, renderer));
  if(colorprop.IsNull())
    return false;

  memcpy(rgb, colorprop->GetColor().GetDataPointer(), 3*sizeof(float));
  return true;
}
mitk::BaseData * mitk::DataNode::GetData (  ) const

Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.

Definition at line 54 of file mitkDataNode.cpp.

Referenced by QmitkMeasurement::Activated(), QmitkImageCropper::AddBoundingObjectToNode(), QmitkBoundingObjectWidget::AddItem(), QmitkDataStorageTableModel::AddNode(), QmitkSegmentationPostProcessing::AutocropSelected(), QmitkBSplineRegistrationView::CalculateTransformation(), mitk::UnstructuredGridVtkWriter< VTKWRITER >::CanWriteDataType(), mitk::SurfaceVtkWriter< VTKWRITER >::CanWriteDataType(), mitk::PlanarFigureWriter::CanWriteDataType(), mitk::ImageWriter::CanWriteDataType(), QmitkPointListModel::CheckForPointSetInNode(), mitk::NodePredicateDimension::CheckNode(), mitk::TNodePredicateDataType< T >::CheckNode(), mitk::NodePredicateDataType::CheckNode(), mitk::NodePredicateData::CheckNode(), mitk::PlanarFigureObjectFactory::CreateMapper(), mitk::DiffusionImagingObjectFactory::CreateMapper(), mitk::CoreObjectFactory::CreateMapper(), mitk::CoreExtObjectFactory::CreateMapper(), QmitkMeasurement::Deactivated(), QmitkRegionGrowingView::DoImageProcessing(), mitk::DataStorage::GetNamedDerivedObject(), mitk::DataStorage::GetNamedObject(), mitk::DisplayPositionEvent::GetPickedObject(), QmitkBoundingObjectWidget::GetSelectedBoundingObject(), QmitkIsoSurface::ImageSelected(), QmitkFunctionalityComponentContainer::ImageSelected(), mitk::SegmentationSink::InsertBelowGroupNode(), QmitkSegmentationPostProcessing::InternalCreateSurface(), QmitkSlicesInterpolator::Interpolate(), QmitkMeasurement::NodeAddedInDataStorage(), mitk::IsImageWithMinimumDimension< DIM >::NodeMatches(), mitk::IsImageWithDimensionAndWithoutProperty< DIM >::NodeMatches(), mitk::IsBaseDataTypeWithoutProperty< T >::NodeMatches(), mitk::IsBaseDataTypeWithBoolProperty< T >::NodeMatches(), mitk::IsBaseDataTypeWithProperty< T >::NodeMatches(), mitk::IsBaseDataType< T >::NodeMatches(), mitk::IsGoodDataNode::NodeMatches(), QmitkPointListModel::ObserveNewPointSet(), QmitkVolumetryView::OnImageSelected(), QmitkSlicesInterpolator::OnInterpolationActivated(), QmitkBoundingObjectWidget::OnItemDataChanged(), mitk::MorphologicTool::OnRoiDataChanged(), mitk::BinaryThresholdULTool::OnRoiDataChanged(), mitk::BinaryThresholdTool::OnRoiDataChanged(), QmitkSimpleMeasurement::OnSelectionChanged(), QmitkPointSetInteractionView::OnSelectionChanged(), QmitkMeasurement::OnSelectionChanged(), QmitkInfoDialog::OnSelectionChanged(), QmitkImageStatistics::OnSelectionChanged(), operator=(), QmitkDataManagerView::OtsuFilter(), mitk::SplineMapper2D::Paint(), mitk::ImageMapperGL2D::Paint(), mitk::CreateSurfaceTool::ProcessOneWorkingData(), mitk::CalculateVolumetryTool::ProcessOneWorkingData(), mitk::CalculateGrayValueStatisticsTool::ProcessOneWorkingData(), mitk::AutoCropTool::ProcessOneWorkingData(), QmitkDataManagerView::ReinitSelectedNodes(), QmitkBoundingObjectWidget::RemoveItem(), QmitkAutocropAction::Run(), mitk::SceneIO::SaveScene(), QmitkDataManagerView::SaveSelectedNodes(), QmitkTransferFunctionWidget::SetDataNode(), QmitkTransferFunctionGeneratorWidget::SetDataNode(), mitk::Interactor::SetDataNode(), mitk::VolumeDataVtkMapper3D::SetDefaultProperties(), mitk::SurfaceVtkMapper3D::SetDefaultProperties(), mitk::PlanarFigureObjectFactory::SetDefaultProperties(), mitk::ImageMapperGL2D::SetDefaultProperties(), mitk::GPUVolumeMapper3D::SetDefaultProperties(), mitk::DiffusionImagingObjectFactory::SetDefaultProperties(), mitk::CoreObjectFactory::SetDefaultProperties(), mitk::CoreExtObjectFactory::SetDefaultProperties(), mitk::UnstructuredGridVtkWriter< VTKWRITER >::SetInput(), mitk::SurfaceVtkWriter< VTKWRITER >::SetInput(), mitk::PlanarFigureWriter::SetInput(), mitk::ImageWriter::SetInput(), mitk::LevelWindowManager::SetLevelWindowProperty(), mitk::MorphologicTool::SetupPreviewNodeFor(), mitk::BinaryThresholdULTool::SetupPreviewNodeFor(), mitk::BinaryThresholdTool::SetupPreviewNodeFor(), QmitkImageCropper::SurroundingCheck(), mitkPointSetInteractorTestClass::TestOnlyMovePointSetInteractor(), mitkPointSetInteractorTestClass::TestPointSetInteractor(), mitkPointSetInteractorTestClass::TestSeedPointSetInteractor(), mitkPointSetInteractorTestClass::TestSinglePointSetInteractorWithoutShiftClick(), and mitk::Mapper::Update().

{
  return m_Data;
}
unsigned long mitk::DataNode::GetDataReferenceChangedTime (  ) const [inline]

Get the timestamp of the last change of the reference to the BaseData.

Definition at line 447 of file mitkDataNode.h.

  {
    return m_DataReferenceChangedTime.GetMTime();
  }
bool mitk::DataNode::GetFloatProperty ( const char *  propertyKey,
float &  floatValue,
mitk::BaseRenderer renderer = NULL 
) const

Convenience access method for float properties (instances of FloatProperty)

Returns:
true property was found

Definition at line 295 of file mitkDataNode.cpp.

References mitk::GenericProperty< T >::GetValue().

Referenced by mitk::SurfaceVtkMapper3D::ApplyMitkPropertiesToVtkProperty(), mitk::ShaderRepository::ApplyProperties(), mitk::EnhancedPointSetVtkMapper3D::ApplyProperties(), mitk::PlanarFigureMapper2D::InitializePlanarFigurePropertiesFromDataNode(), QmitkDataManagerView::OpacityActionChanged(), and mitk::ImageMapperGL2D::Paint().

{
  mitk::FloatProperty::Pointer floatprop = dynamic_cast<mitk::FloatProperty*>(GetProperty(propertyKey, renderer));
  if(floatprop.IsNull())
    return false;

  floatValue = floatprop->GetValue();
  return true;
}
mitk::DataNode::GroupTagList mitk::DataNode::GetGroupTags (  ) const

Definition at line 256 of file mitkDataNode.cpp.

{
  GroupTagList groups;
  const PropertyList::PropertyMap* propertyMap = m_PropertyList->GetMap();

  for ( PropertyList::PropertyMap::const_iterator groupIter = propertyMap->begin(); // m_PropertyList is created in the constructor, so we don't check it here
        groupIter != propertyMap->end();
        ++groupIter )
  {
    const BaseProperty* bp = groupIter->second.first;
    if ( dynamic_cast<const GroupTagProperty*>(bp) && groupIter->second.second )
    {
      groups.insert( groupIter->first );
    }
  }

  return groups;
}
mitk::Interactor * mitk::DataNode::GetInteractor (  ) const
bool mitk::DataNode::GetIntProperty ( const char *  propertyKey,
int &  intValue,
mitk::BaseRenderer renderer = NULL 
) const

Convenience access method for int properties (instances of IntProperty)

Returns:
true property was found

Definition at line 285 of file mitkDataNode.cpp.

References mitk::GenericProperty< T >::GetValue().

Referenced by mitk::PointSetGLMapper2D::ApplyProperties(), mitk::BinaryThresholdULTool::SetupPreviewNodeFor(), and mitk::BinaryThresholdTool::SetupPreviewNodeFor().

{
  mitk::IntProperty::Pointer intprop = dynamic_cast<mitk::IntProperty*>(GetProperty(propertyKey, renderer));
  if(intprop.IsNull())
    return false;

  intValue = intprop->GetValue();
  return true;
}
bool mitk::DataNode::GetLevelWindow ( mitk::LevelWindow levelWindow,
mitk::BaseRenderer renderer = NULL,
const char *  propertyKey = "levelwindow" 
) const

Convenience access method for level-window properties (instances of LevelWindowProperty)

Returns:
true property was found

Definition at line 340 of file mitkDataNode.cpp.

Referenced by mitk::Mapper::GetLevelWindow().

{
  mitk::LevelWindowProperty::Pointer levWinProp = dynamic_cast<mitk::LevelWindowProperty*>(GetProperty(propertyKey, renderer));
  if(levWinProp.IsNull())
    return false;

  levelWindow=levWinProp->GetLevelWindow();
  return true;
}
mitk::Mapper * mitk::DataNode::GetMapper ( MapperSlotId  id ) const

Definition at line 40 of file mitkDataNode.cpp.

References mitk::CoreObjectFactory::GetInstance(), and m_Mappers.

Referenced by mitk::VtkPropRenderer::GetNextPath(), mitk::SplineMapper2D::Paint(), mitk::VtkPropRenderer::PickObject(), and mitk::VtkPropRenderer::Update().

{
  if( (id >= m_Mappers.size()) || (m_Mappers[id].IsNull()) ) 
  {
    if(id >= m_Mappers.capacity())
    {
//      int i, size=id-m_Mappers.capacity()+10;
      m_Mappers.resize(id+10);
    }
    m_Mappers[id] = CoreObjectFactory::GetInstance()->CreateMapper(const_cast<DataNode*>(this),id);
  }
  return m_Mappers[id];
}
unsigned long mitk::DataNode::GetMTime (  ) const [virtual]

Get the timestamp of the last change of the contents of this node or the referenced BaseData.

Definition at line 451 of file mitkDataNode.cpp.

Referenced by mitk::ImageMapperGL2D::Update().

{
  unsigned long time = Superclass::GetMTime();
  if(m_Data.IsNotNull())
  {
    if((time < m_Data->GetMTime()) ||
      ((m_Data->GetSource() != NULL) && (time < m_Data->GetSource()->GetMTime()))
    )
    {
      Modified();
      return Superclass::GetMTime();
    }
  }
  return time;
}
bool mitk::DataNode::GetName ( std::string &  nodeName,
mitk::BaseRenderer renderer = NULL,
const char *  propertyKey = "name" 
) const [inline]
virtual std::string mitk::DataNode::GetName (  ) const [inline, virtual]

Extra convenience access method for accessing the name of an object (instance of StringProperty with property-key "name").

This method does not take the renderer specific propertylists into account, because the name of an object should never be renderer specific.

Returns:
a std::string with the name of the object (content of "name" Property). If there is no "name" Property, an empty string will be returned.

Definition at line 314 of file mitkDataNode.h.

References mitk::StringProperty::GetValue().

  {
    mitk::StringProperty* sp = dynamic_cast<mitk::StringProperty*>(this->GetProperty("name"));
    if (sp == NULL)
      return "";
    return sp->GetValue();
  }
bool mitk::DataNode::GetOpacity ( float &  opacity,
mitk::BaseRenderer renderer,
const char *  propertyKey = "opacity" 
) const

Convenience access method for opacity properties (instances of FloatProperty)

Returns:
true property was found

Definition at line 330 of file mitkDataNode.cpp.

References mitk::GenericProperty< T >::GetValue().

Referenced by mitk::SurfaceVtkMapper3D::ApplyMitkPropertiesToVtkProperty(), mitk::EnhancedPointSetVtkMapper3D::ApplyProperties(), and mitk::Mapper::GetOpacity().

{
  mitk::FloatProperty::Pointer opacityprop = dynamic_cast<mitk::FloatProperty*>(GetProperty(propertyKey, renderer));
  if(opacityprop.IsNull())
    return false;

  opacity=opacityprop->GetValue();
  return true;
}
mitk::BaseProperty * mitk::DataNode::GetProperty ( const char *  propertyKey,
const mitk::BaseRenderer renderer = NULL 
) const

Get the property (instance of BaseProperty) with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.

If renderer is NULL or the propertyKey cannot be found in the PropertyList specific to renderer or is disabled there, the BaseRenderer-independent PropertyList of this DataNode is queried.

See also:
GetPropertyList
m_PropertyList
m_MapOfPropertyLists

Definition at line 218 of file mitkDataNode.cpp.

Referenced by QmitkDataStorageTableModel::AddNode(), mitk::SurfaceVtkMapper3D::ApplyMitkPropertiesToVtkProperty(), mitk::ShaderRepository::ApplyProperties(), mitk::EnhancedPointSetVtkMapper3D::ApplyProperties(), QmitkDataManagerView::ColorActionChanged(), mitk::ImageMapperGL2D::GenerateData(), QmitkLevelWindowWidgetContextMenu::getContextMenu(), mitk::PlanarFigureMapper2D::InitializePlanarFigurePropertiesFromDataNode(), QmitkDataStorageComboBox::InsertNode(), mitk::IsImageWithDimensionAndWithoutProperty< DIM >::NodeMatches(), mitk::IsBaseDataTypeWithProperty< T >::NodeMatches(), QmitkSlicesInterpolator::OnInterpolationActivated(), mitk::ImageMapperGL2D::Paint(), QmitkDataStorageComboBox::RemoveNode(), QmitkTransferFunctionWidget::SetDataNode(), QmitkTransferFunctionGeneratorWidget::SetDataNode(), mitk::VolumeDataVtkMapper3D::SetDefaultProperties(), mitk::ImageMapperGL2D::SetDefaultProperties(), mitk::GPUVolumeMapper3D::SetDefaultProperties(), QmitkDataManagerView::SurfaceRepresentationActionToggled(), and QmitkDataManagerView::SurfaceRepresentationMenuAboutToShow().

{
  if(propertyKey==NULL)
    return NULL;

  //renderer specified?
  if (renderer)
  {
    std::map<const mitk::BaseRenderer*,mitk::PropertyList::Pointer>::const_iterator it;
    //check for the renderer specific property
    it=m_MapOfPropertyLists.find(renderer);
    if(it!=m_MapOfPropertyLists.end()) //found
    {
      mitk::BaseProperty::Pointer property;
      property=it->second->GetProperty(propertyKey);
      if(property.IsNotNull())//found an enabled property in the render specific list
        return property;
      else //found a renderer specific list, but not the desired property
        return m_PropertyList->GetProperty(propertyKey); //return renderer unspecific property
    }
    else //didn't find the property list of the given renderer
    {
      //return the renderer unspecific property if there is one
      return m_PropertyList->GetProperty(propertyKey); 
    }
  }
  else //no specific renderer given; use the renderer independent one
  {
    mitk::BaseProperty::Pointer property;
    property=m_PropertyList->GetProperty(propertyKey);
    if(property.IsNotNull())
      return property;
  }
  
  //only to satisfy compiler!
  return NULL;
}
template<typename T >
bool mitk::DataNode::GetProperty ( itk::SmartPointer< T > &  property,
const char *  propertyKey,
const mitk::BaseRenderer renderer = NULL 
) const [inline]

Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.

If renderer is NULL or the propertyKey cannot be found in the PropertyList specific to renderer or is disabled there, the BaseRenderer-independent PropertyList of this DataNode is queried.

See also:
GetPropertyList
m_PropertyList
m_MapOfPropertyLists

Definition at line 204 of file mitkDataNode.h.

  {
    property = dynamic_cast<T *>(GetProperty(propertyKey, renderer));
    return property.IsNotNull();
  }
template<typename T >
bool mitk::DataNode::GetProperty ( T *&  property,
const char *  propertyKey,
const mitk::BaseRenderer renderer = NULL 
) const [inline]

Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.

If renderer is NULL or the propertyKey cannot be found in the PropertyList specific to renderer or is disabled there, the BaseRenderer-independent PropertyList of this DataNode is queried.

See also:
GetPropertyList
m_PropertyList
m_MapOfPropertyLists

Definition at line 221 of file mitkDataNode.h.

  {
    property = dynamic_cast<T *>(GetProperty(propertyKey, renderer));
    return property!=NULL;
  }
mitk::PropertyList * mitk::DataNode::GetPropertyList ( const mitk::BaseRenderer renderer = NULL ) const

Get the PropertyList of the renderer. If renderer is NULL, the BaseRenderer-independent PropertyList of this DataNode is returned.

See also:
GetProperty
m_PropertyList
m_MapOfPropertyLists

Definition at line 198 of file mitkDataNode.cpp.

References mitk::PropertyList::New().

Referenced by QmitkBSplineRegistrationView::CalculateTransformation(), mitk::NodePredicateProperty::CheckNode(), mitk::SceneReaderV1::DecorateNodeWithProperties(), mitk::PointSetGLMapper2D::Paint(), mitk::SceneIO::SaveScene(), and mitk::ImageMapperGL2D::Update().

{
  if(renderer==NULL)
    return m_PropertyList;

  mitk::PropertyList::Pointer & propertyList = m_MapOfPropertyLists[renderer];

  if(propertyList.IsNull())
    propertyList = mitk::PropertyList::New();

  assert(m_MapOfPropertyLists[renderer].IsNotNull());

  return propertyList;
}
template<typename T >
bool mitk::DataNode::GetPropertyValue ( const char *  propertyKey,
T &  value,
mitk::BaseRenderer renderer = NULL 
) const

Convenience access method for GenericProperty<T> properties (T being the type of the second parameter)

Returns:
true property was found

Definition at line 557 of file mitkDataNode.cpp.

References mitk::GenericProperty< T >::GetValue().

Referenced by QmitkSegmentationView::ApplyDisplayOptions(), mitk::IsBaseDataTypeWithoutProperty< T >::NodeMatches(), mitk::IsBaseDataTypeWithBoolProperty< T >::NodeMatches(), and QmitkImageStatistics::OnSelectionChanged().

{
  GenericProperty<T>* gp= dynamic_cast<GenericProperty<T>*>(GetProperty(propertyKey, renderer) );
  if ( gp != NULL )
  {
    value = gp->GetValue();
    return true;
  }
  return false;
}
bool mitk::DataNode::GetStringProperty ( const char *  propertyKey,
std::string &  string,
mitk::BaseRenderer renderer = NULL 
) const

Convenience access method for string properties (instances of StringProperty)

Returns:
true property was found

Definition at line 305 of file mitkDataNode.cpp.

References mitk::StringProperty::GetValue().

Referenced by QmitkBoundingObjectWidget::AddItem(), and mitk::ImageMapperGL2D::Paint().

{
  mitk::StringProperty::Pointer stringProp = dynamic_cast<mitk::StringProperty*>(GetProperty(propertyKey, renderer));
  if(stringProp.IsNull())
  {
    return false;
  } 
  else 
  {
    //memcpy((void*)string, stringProp->GetValue(), strlen(stringProp->GetValue()) + 1 ); // looks dangerous
    string = stringProp->GetValue();
    return true;
  }
}
bool mitk::DataNode::GetVisibility ( bool &  visible,
mitk::BaseRenderer renderer,
const char *  propertyKey = "visible" 
) const [inline]

Convenience access method for visibility properties (instances of BoolProperty with property-key "visible")

Returns:
true property was found
See also:
IsVisible

Definition at line 346 of file mitkDataNode.h.

Referenced by mitk::Mapper::GetVisibility(), and QmitkRenderWindowMenu::OnCrossHairMenuAboutToShow().

  {
    return GetBoolProperty(propertyKey, visible, renderer);
  }
vtkLinearTransform * mitk::DataNode::GetVtkTransform ( int  t = 0 ) const

Get the transformation applied prior to displaying the data as a vtkTransform.

Deprecated:
use GetData()->GetGeometry()->GetVtkTransform() instead

Definition at line 439 of file mitkDataNode.cpp.

References mitk::Geometry3D::GetVtkTransform().

Referenced by mitk::SplineMapper2D::Paint(), mitk::PolyDataGLMapper2D::Paint(), and mitk::VtkMapper3D::UpdateVtkTransform().

{
  assert(m_Data.IsNotNull());

  mitk::Geometry3D* geometry = m_Data->GetGeometry(t);

  if(geometry == NULL)
    return NULL;

  return geometry->GetVtkTransform();
}
bool mitk::DataNode::IsInteractorEnabled (  ) const [virtual]

Tests, if the interactor is already added to mitk::GlobalInteraction.

Definition at line 545 of file mitkDataNode.cpp.

References mitk::GlobalInteraction::GetInstance(), and mitk::GlobalInteraction::InteractorRegistered().

{
  return mitk::GlobalInteraction::GetInstance()->InteractorRegistered( m_Interactor.GetPointer() );
}
bool mitk::DataNode::IsOn ( const char *  propertyKey,
mitk::BaseRenderer renderer,
bool  defaultIsOn = true 
) const [inline]

Convenience access method for boolean properties (instances of BoolProperty). Return value is the value of the property. If the property is not found, the value of defaultIsOn is returned.

Thus, the return value has a different meaning than in the GetBoolProperty method!

See also:
GetBoolProperty

Definition at line 365 of file mitkDataNode.h.

  {
    if(propertyKey==NULL)
      return defaultIsOn;
    GetBoolProperty(propertyKey, defaultIsOn, renderer);
    return defaultIsOn;
  }
bool mitk::DataNode::IsSelected ( mitk::BaseRenderer renderer = NULL )

set the node as selected

Returns:
true node is selected

Definition at line 512 of file mitkDataNode.cpp.

{
  bool selected;

  if ( !GetBoolProperty("selected", selected, renderer) )
    return false;

  return selected;
}
bool mitk::DataNode::IsVisible ( mitk::BaseRenderer renderer,
const char *  propertyKey = "visible",
bool  defaultIsOn = true 
) const [inline]

Convenience access method for visibility properties (instances of BoolProperty). Return value is the visibility. Default is visible==true, i.e., true is returned even if the property (propertyKey) is not found.

Thus, the return value has a different meaning than in the GetVisibility method!

See also:
GetVisibility
IsOn

Definition at line 383 of file mitkDataNode.h.

Referenced by mitk::EnhancedPointSetVtkMapper3D::ApplyProperties(), QmitkDataStorageTreeModel::data(), and QmitkLevelWindowWidgetContextMenu::getContextMenu().

  {
    return IsOn(propertyKey, renderer, defaultIsOn);
  }
static Pointer mitk::DataNode::New (  ) [static]
Examples:
Step1.cpp, Step10.cpp, Step5.cpp, Step6.cpp, Step6RegionGrowing.txx, and Step7.cpp.

Referenced by mitk::MorphologicTool::AcceptPreview(), QmitkSimpleMeasurement::AddAngleSimpleMeasurement(), QmitkStdMultiWidget::AddDisplayPlaneSubTree(), QmitkSimpleMeasurement::AddDistanceSimpleMeasurement(), QmitkMeasurement::AddFigureToDataStorage(), QmitkSimpleMeasurement::AddPathSimpleMeasurement(), QmitkDeformableRegistrationView::ApplyDeformationField(), mitk::BaseRenderer::BaseRenderer(), QmitkDeformableRegistrationView::Calculate(), mitk::NavigationToolReader::ConvertDataNodeToNavigationTool(), mitk::NavigationToolWriter::ConvertToDataNode(), QmitkImageCropper::CreateBoundingObject(), QmitkBoundingObjectWidget::CreateBoundingObject(), QmitkToolPairNavigationView::CreateConeAsInstrumentVisualization(), QmitkIGTRecorderView::CreateInstrumentVisualization(), QmitkVolumetryView::CreateOverlayChild(), QmitkRegionGrowingView::CreateQtPartControl(), QmitkSegmentationView::CreateSegmentationFromSurface(), QmitkThresholdComponent::CreateSegmentationNode(), mitk::Tool::CreateSegmentationNode(), QmitkToolPairNavigationView::CreateSphereAsInstrumentVisualization(), QmitkIsoSurface::CreateSurface(), DataNode(), QmitkDiffusionDicomImport::DicomLoadStartLoad(), QmitkDiffusionTensorEstimation::DiffusionVolumesLoadButton(), QmitkDiffusionTensorEstimation::DirectionVolumesAngularErrorButton(), QmitkDiffusionTensorEstimation::DirectionVolumesLoadButton(), QmitkPreprocessingView::DoBrainMask(), QmitkPreprocessingView::DoExtractB0(), QmitkTensorReconstructionView::DoTensorsToDWI(), SceneIOTestClass::FillStorage(), QmitkPointBasedRegistrationView::FixedSelected(), mitk::DataNodeFactory::GenerateData(), QmitkBoundingObjectWidget::GetAllBoundingObjects(), Step6::Initialize(), QmitkStdMultiWidget::InitPositionTracking(), QmitkRegionGrowingView::ItkImageProcessing(), QmitkTensorReconstructionView::ItkTensorReconstruction(), mitk::DicomSeriesReader::LoadDicomSeries(), main(), mitkContourMapper2DTest(), mitkDataNodeExtTest(), mitkDataNodeTest(), mitkDataStorageTest(), mitkImageMapper2DTest(), mitkPointSetInteractorTest(), mitkPropertySerializationTest(), mitkVtkPropRendererTest(), QmitkPointBasedRegistrationView::MovingSelected(), QmitkQBallReconstructionView::NumericalQBallReconstruction(), QmitkPointSetInteractionView::OnAddPointSetClicked(), QmitkNavigationToolManagementWidget::OnAddToolSave(), QmitkColourImageProcessingView::OnCombineRGBA(), QmitkColourImageProcessingView::OnConvertImageMaskColorToRGBAImage(), QmitkColourImageProcessingView::OnConvertToRGBAImage(), QmitkNavigationToolManagementWidget::OnLoadSurface(), ItkDeleteEventListener::OnObjectDelete(), QmitkIGTExampleView::OnPlayingToggle(), mitk::MorphologicTool::OnRoiDataChanged(), mitk::BinaryThresholdULTool::OnRoiDataChanged(), mitk::BinaryThresholdTool::OnRoiDataChanged(), QmitkImageGuidedTherapyTutorialView::OnStartIGT(), QmitkIGTRecorderView::OnStartRecording(), QmitkIGTExampleView::OnTestNavigation(), operator=(), mitk::operator>>(), QmitkDataManagerView::OtsuFilter(), QmitkDiffusionTensorEstimation::QBallReconstructionButton(), QmitkDiffusionTensorEstimation::QBallStandardAlgorithmsDeconvolutionButton(), QmitkDiffusionTensorEstimation::QBallStandardAlgorithmsDirectionButton(), QmitkDiffusionTensorEstimation::QBallStandardAlgorithmsGFAButton(), QmitkDiffusionTensorEstimation::QBallVolumesLoadButton(), QmitkDiffusionTensorEstimation::QBallVolumesVisualizeSelectedButton(), QmitkDiffusionQuantificationView::QBIQuantification(), QmitkSlicesInterpolator::QmitkSlicesInterpolator(), QmitkDiffusionTensorEstimation::ReconstructAnalytically(), RegionGrowing(), QmitkDataStorageTreeModel::SetDataStorage(), QmitkIGTRecorderView::SetupIGTPipeline(), QmitkDiffusionTensorEstimation::StandardAlgorithmsDirectionButton(), QmitkDiffusionTensorEstimation::StandardAlgorithmsFAButton(), QmitkDiffusionTensorEstimation::StandardAlgorithmsRAButton(), QmitkBasicImageProcessing::StartButton2Clicked(), QmitkBasicImageProcessing::StartButtonClicked(), Step7::StartRegionGrowing(), QmitkTensorReconstructionView::TeemTensorReconstruction(), QmitkQBallReconstructionView::TemplatedAnalyticalQBallReconstruction(), QmitkDiffusionTensorEstimation::TensorEstimationButton(), QmitkDiffusionTensorEstimation::TensorEstimationTeemEstimateButton(), QmitkDiffusionQuantificationView::TensorQuantification(), QmitkDiffusionTensorEstimation::TensorVolumesLoadButton(), TestDataStorage(), mitkNavigationToolTestClass::TestGetterAndSetter(), mitkToolManagerTestClass::TestSetterMethods(), and mitkNavigationToolReaderAndWriterTestClass::TestWrite().

mitk::DataNode & mitk::DataNode::operator= ( const DataNode right )

Definition at line 121 of file mitkDataNode.cpp.

References GetData(), New(), and SetData().

{
  mitk::DataNode* node=mitk::DataNode::New();
  node->SetData(right.GetData());
  return *node;
}
mitk::DataNode & mitk::DataNode::operator= ( mitk::BaseData right )

Definition at line 128 of file mitkDataNode.cpp.

References New(), and SetData().

{
  mitk::DataNode* node=mitk::DataNode::New();
  node->SetData(right);
  return *node;
}
void mitk::DataNode::PropertyListModified ( const itk::Object *  caller,
const itk::EventObject &  event 
) [protected, virtual]

Definition at line 550 of file mitkDataNode.cpp.

Referenced by DataNode().

{
  Modified();
}
void mitk::DataNode::ReplaceProperty ( const char *  propertyKey,
BaseProperty property,
const mitk::BaseRenderer renderer = NULL 
)

Replace the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if NULL, use BaseRenderer-independent PropertyList). This is set-by-reference.

If renderer is NULL the property is set in the BaseRenderer-independent PropertyList of this DataNode.

See also:
GetProperty
m_PropertyList
m_MapOfPropertyLists

Definition at line 420 of file mitkDataNode.cpp.

{
  GetPropertyList(renderer)->ReplaceProperty(propertyKey, propertyValue);
}
bool mitk::DataNode::RequestedRegionIsOutsideOfTheBufferedRegion (  ) [virtual]

Definition at line 181 of file mitkDataNode.cpp.

{
  return false;
}
void mitk::DataNode::SetBoolProperty ( const char *  propertyKey,
bool  boolValue,
mitk::BaseRenderer renderer = NULL 
)

Convenience method for setting int properties (instances of IntProperty)

Definition at line 398 of file mitkDataNode.cpp.

References mitk::BoolProperty::New().

Referenced by QmitkDataManagerView::NodeSelectionChanged(), and QmitkDataManagerView::TextureInterpolationToggled().

{
  GetPropertyList(renderer)->SetProperty(propertyKey, mitk::BoolProperty::New(boolValue));
}
void mitk::DataNode::SetColor ( const mitk::Color color,
mitk::BaseRenderer renderer = NULL,
const char *  propertyKey = "color" 
)

Convenience method for setting color properties (instances of ColorProperty)

Definition at line 350 of file mitkDataNode.cpp.

References mitk::ColorProperty::New().

Referenced by mitk::ContourInteractor::ContourInteractor(), and QmitkSimpleMeasurement::OnSelectionChanged().

{
  mitk::ColorProperty::Pointer prop;
  prop = mitk::ColorProperty::New(color);
  GetPropertyList(renderer)->SetProperty(propertyKey, prop);
}
void mitk::DataNode::SetColor ( const float  rgb[3],
mitk::BaseRenderer renderer = NULL,
const char *  propertyKey = "color" 
)

Convenience method for setting color properties (instances of ColorProperty)

Definition at line 366 of file mitkDataNode.cpp.

References mitk::ColorProperty::New().

{
  mitk::ColorProperty::Pointer prop;
  prop = mitk::ColorProperty::New(rgb);
  GetPropertyList(renderer)->SetProperty(propertyKey, prop);
}
void mitk::DataNode::SetColor ( float  red,
float  green,
float  blue,
mitk::BaseRenderer renderer = NULL,
const char *  propertyKey = "color" 
)

Convenience method for setting color properties (instances of ColorProperty)

Definition at line 357 of file mitkDataNode.cpp.

{
  float color[3];
  color[0]=red;
  color[1]=green;
  color[2]=blue;
  SetColor(color, renderer, propertyKey);
}
void mitk::DataNode::SetData ( mitk::BaseData baseData ) [virtual]

Set the data object (instance of BaseData, e.g., an Image) managed by this DataNode.

Warning:
the actor-mode of the vtkInteractor does not work any more, if the transform of the data-tree-node is connected to the transform of the basedata via vtkTransform->SetInput.

Definition at line 64 of file mitkDataNode.cpp.

References mitk::CoreObjectFactory::GetInstance().

Referenced by QmitkSegmentationPostProcessing::AutocropSelected(), QmitkBSplineRegistrationView::CalculateTransformation(), mitk::DicomSeriesReader::LoadDicom(), operator=(), mitk::AutoCropTool::ProcessOneWorkingData(), QmitkAutocropAction::Run(), and mitkPointSetInteractorTestClass::TestOnlyMovePointSetInteractor().

{
  if(m_Data!=baseData)
  {
    m_Data=baseData;

    m_Mappers.clear();
    m_Mappers.resize(10);

    mitk::CoreObjectFactory::GetInstance()->SetDefaultProperties(this);

    m_DataReferenceChangedTime.Modified();
    Modified();

    //inform the interactor about the change
    if (m_Interactor.IsNotNull())
      m_Interactor->DataChanged();
  }
}
void mitk::DataNode::SetFloatProperty ( const char *  propertyKey,
float  floatValue,
mitk::BaseRenderer renderer = NULL 
)

Convenience method for setting int properties (instances of IntProperty)

Definition at line 403 of file mitkDataNode.cpp.

References mitk::FloatProperty::New().

Referenced by QmitkDataManagerView::OpacityChanged().

{
  GetPropertyList(renderer)->SetProperty(propertyKey, mitk::FloatProperty::New(floatValue));
}
void mitk::DataNode::SetInteractor ( mitk::Interactor interactor ) [virtual]
void mitk::DataNode::SetInteractorEnabled ( const bool &  enabled ) [virtual]

Adds or removes the associated interactor to mitk::GLobalInteraction.

Definition at line 522 of file mitkDataNode.cpp.

References mitk::GlobalInteraction::AddInteractor(), mitk::GlobalInteraction::GetInstance(), and mitk::GlobalInteraction::RemoveInteractor().

{
  if ( m_Interactor.IsNull() )
  {
    itkWarningMacro("Interactor is NULL. Couldn't enable or disable interaction.");  
    return;
  }
  if ( enabled )
    mitk::GlobalInteraction::GetInstance()->AddInteractor( m_Interactor.GetPointer() );
  else
    mitk::GlobalInteraction::GetInstance()->RemoveInteractor( m_Interactor.GetPointer() );
}
void mitk::DataNode::SetIntProperty ( const char *  propertyKey,
int  intValue,
mitk::BaseRenderer renderer = NULL 
)

Convenience method for setting int properties (instances of IntProperty)

Definition at line 394 of file mitkDataNode.cpp.

References mitk::IntProperty::New().

Referenced by mitk::PositionTracker::ExecuteAction(), and mitk::PointSetToCurvedGeometryFilter::SetDefaultCurvedGeometryProperties().

{
  GetPropertyList(renderer)->SetProperty(propertyKey, mitk::IntProperty::New(intValue));
}
void mitk::DataNode::SetLevelWindow ( mitk::LevelWindow  levelWindow,
mitk::BaseRenderer renderer = NULL,
const char *  propertyKey = "levelwindow" 
)

Convenience method for setting level-window properties (instances of LevelWindowProperty)

Definition at line 387 of file mitkDataNode.cpp.

References mitk::LevelWindowProperty::New().

{
  mitk::LevelWindowProperty::Pointer prop;
  prop = mitk::LevelWindowProperty::New(levelWindow);
  GetPropertyList(renderer)->SetProperty(propertyKey, prop);
}
void mitk::DataNode::SetMapper ( MapperSlotId  id,
mitk::Mapper mapper 
) [virtual]

Definition at line 161 of file mitkDataNode.cpp.

References mitk::Mapper::SetDataNode().

{
  m_Mappers[id] = mapper;

  if (mapper!=NULL)
    mapper->SetDataNode(this);
}
virtual void mitk::DataNode::SetName ( const char *  name ) [inline, virtual]

Extra convenience access method to set the name of an object.

The name will be stored in the non-renderer-specific PropertyList in a StringProperty named "name".

Definition at line 326 of file mitkDataNode.h.

References mitk::StringProperty::New().

Referenced by QmitkBoundingObjectWidget::OnItemDataChanged().

  {
    if (name == NULL)
      return;
    this->SetProperty("name", StringProperty::New(name));
  }
virtual void mitk::DataNode::SetName ( const std::string  name ) [inline, virtual]

Extra convenience access method to set the name of an object.

The name will be stored in the non-renderer-specific PropertyList in a StringProperty named "name".

Definition at line 336 of file mitkDataNode.h.

  {
    this->SetName(name.c_str());
  }
void mitk::DataNode::SetOpacity ( float  opacity,
mitk::BaseRenderer renderer = NULL,
const char *  propertyKey = "opacity" 
)

Convenience method for setting opacity properties (instances of FloatProperty)

Definition at line 380 of file mitkDataNode.cpp.

References mitk::FloatProperty::New().

Referenced by mitk::ContourInteractor::ContourInteractor().

{
  mitk::FloatProperty::Pointer prop;
  prop = mitk::FloatProperty::New(opacity);
  GetPropertyList(renderer)->SetProperty(propertyKey, prop);
}
void mitk::DataNode::SetProperty ( const char *  propertyKey,
BaseProperty property,
const mitk::BaseRenderer renderer = NULL 
)
void mitk::DataNode::SetRequestedRegion ( itk::DataObject *  data ) [virtual]

Definition at line 191 of file mitkDataNode.cpp.

{
}
void mitk::DataNode::SetRequestedRegionToLargestPossibleRegion (  ) [virtual]

Definition at line 177 of file mitkDataNode.cpp.

{
}
void mitk::DataNode::SetSelected ( bool  selected,
mitk::BaseRenderer renderer = NULL 
)

set the node as selected

Definition at line 467 of file mitkDataNode.cpp.

References mitk::BoolProperty::New().

Referenced by QmitkMeasurement::PlanarFigureSelected().

{
  mitk::BoolProperty::Pointer selectedProperty = dynamic_cast<mitk::BoolProperty*>(GetProperty("selected"));

  if ( selectedProperty.IsNull() ) 
  {
    selectedProperty = mitk::BoolProperty::New();
    selectedProperty->SetValue(false);
    SetProperty("selected", selectedProperty, renderer);  
  }

  if( selectedProperty->GetValue() != selected ) 
  {
    selectedProperty->SetValue(selected);
    itk::ModifiedEvent event;
    InvokeEvent( event );
  }
}
void mitk::DataNode::SetStringProperty ( const char *  propertyKey,
const char *  string,
mitk::BaseRenderer renderer = NULL 
)

Convenience method for setting int properties (instances of IntProperty)

Definition at line 408 of file mitkDataNode.cpp.

References mitk::StringProperty::New().

Referenced by QmitkDataStorageTreeModel::setData().

{
  GetPropertyList(renderer)->SetProperty(propertyKey, mitk::StringProperty::New(stringValue));
}
void mitk::DataNode::SetVisibility ( bool  visible,
mitk::BaseRenderer renderer = NULL,
const char *  propertyKey = "visible" 
)

Convenience method for setting visibility properties (instances of BoolProperty)

Parameters:
visibleIf set to true, the data will be rendered. If false, the render will skip this data.
rendererSpecify a renderer if the visibility shall be specific to a renderer
propertykeyCan be used to specify a user defined name of the visibility propery.

Definition at line 373 of file mitkDataNode.cpp.

References mitk::BoolProperty::New().

Referenced by QmitkToolReferenceDataSelectionBox::EnsureOnlyReferenceImageIsVisibile(), QmitkSegmentationView::ForceDisplayPreferencesUponAllImages(), QmitkBoundingObjectWidget::OnItemDataChanged(), QmitkRenderWindowMenu::SetCrossHairVisibility(), QmitkDataStorageTreeModel::setData(), QmitkBoundingObjectWidget::setEnabled(), QmitkStdMultiWidget::SetWidgetPlaneVisibility(), QmitkDataManagerView::ShowOnlySelectedNodes(), and QmitkDataManagerView::ToggleVisibilityOfSelectedNodes().

{
  mitk::BoolProperty::Pointer prop;
  prop = mitk::BoolProperty::New(visible);
  GetPropertyList(renderer)->SetProperty(propertyKey, prop);
}
void mitk::DataNode::UpdateOutputInformation (  ) [virtual]

Definition at line 169 of file mitkDataNode.cpp.

{
  if (this->GetSource())
  {
    this->GetSource()->UpdateOutputInformation();
  }
}
bool mitk::DataNode::VerifyRequestedRegion (  ) [virtual]

Definition at line 186 of file mitkDataNode.cpp.

{
    return true;
}

Member Data Documentation

The data object (instance of BaseData, e.g., an Image) managed by this DataNode.

Definition at line 488 of file mitkDataNode.h.

itk::TimeStamp mitk::DataNode::m_DataReferenceChangedTime [protected]

Timestamp of the last change of m_Data.

Definition at line 507 of file mitkDataNode.h.

Interactor, that handles the Interaction.

Definition at line 503 of file mitkDataNode.h.

Map associating each BaseRenderer with its own PropertyList.

Definition at line 499 of file mitkDataNode.h.

Mapper-slots.

Definition at line 483 of file mitkDataNode.h.

Referenced by DataNode(), and GetMapper().

BaseRenderer-independent PropertyList.

Properties herein can be overwritten specifically for each BaseRenderer by the BaseRenderer-specific properties defined in m_MapOfPropertyLists.

Definition at line 495 of file mitkDataNode.h.

Referenced by DataNode().

Definition at line 509 of file mitkDataNode.h.

Referenced by DataNode().


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