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

mitk::PlanarFigureControlPointStyleProperty Class Reference
[Data Management Classes]

Defines the rendering style of control points for PlanarFigure objects. More...

#include <mitkPlanarFigureControlPointStyleProperty.h>

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

List of all members.

Public Types

enum  Shape { Square, Circle }
typedef
PlanarFigureControlPointStyleProperty 
Self
typedef EnumerationProperty Superclass
typedef itk::SmartPointer< SelfPointer
typedef itk::SmartPointer
< const Self
ConstPointer

Public Member Functions

virtual const char * GetClassName () const
virtual Shape GetShape ()
virtual void SetShape (Shape)

Static Public Member Functions

static Pointer New ()
static Pointer New (const IdType &_arg)
static Pointer New (const std::string &_arg)

Protected Member Functions

 PlanarFigureControlPointStyleProperty ()
 PlanarFigureControlPointStyleProperty (const IdType &value)
 PlanarFigureControlPointStyleProperty (const std::string &value)
virtual bool AddEnum (const std::string &name, const IdType &id)
virtual void AddEnumTypes ()

Detailed Description

Defines the rendering style of control points for PlanarFigure objects.

See also:
mitk::PlanarFigureMapper2D

Used by PlanarFigureMapper2D to determine which of several control point shapes to use. Currently this is basically the choice between squares and circles. If more options are implemented, this class should be enhanced.

After construction, the default shape is a square.

Definition at line 40 of file mitkPlanarFigureControlPointStyleProperty.h.


Member Typedef Documentation

Reimplemented from mitk::EnumerationProperty.

Definition at line 44 of file mitkPlanarFigureControlPointStyleProperty.h.

Reimplemented from mitk::EnumerationProperty.

Definition at line 44 of file mitkPlanarFigureControlPointStyleProperty.h.

Reimplemented from mitk::EnumerationProperty.

Definition at line 44 of file mitkPlanarFigureControlPointStyleProperty.h.

Reimplemented from mitk::EnumerationProperty.

Definition at line 44 of file mitkPlanarFigureControlPointStyleProperty.h.


Member Enumeration Documentation

Enumerator:
Square 
Circle 

Definition at line 52 of file mitkPlanarFigureControlPointStyleProperty.h.


Constructor & Destructor Documentation

mitk::PlanarFigureControlPointStyleProperty::PlanarFigureControlPointStyleProperty (  ) [protected]

Definition at line 3 of file mitkPlanarFigureControlPointStyleProperty.cpp.

References AddEnumTypes(), mitk::EnumerationProperty::SetValue(), and Square.

{
  this->AddEnumTypes();
  this->SetValue( static_cast<IdType> ( Square ) );
}
mitk::PlanarFigureControlPointStyleProperty::PlanarFigureControlPointStyleProperty ( const IdType value ) [protected]

Definition at line 9 of file mitkPlanarFigureControlPointStyleProperty.cpp.

{
  this->AddEnumTypes();
  if ( this->IsValidEnumerationValue( value ) )
  {
    this->SetValue( value ) ;
  }
  else
  {
    this->SetValue( static_cast<IdType> ( Square ) );
  }
}
mitk::PlanarFigureControlPointStyleProperty::PlanarFigureControlPointStyleProperty ( const std::string &  value ) [protected]

Constructor. Sets the decoration type to the given value. If it is not valid, the representation is set to none

Definition at line 22 of file mitkPlanarFigureControlPointStyleProperty.cpp.

{
  this->AddEnumTypes();
  if ( this->IsValidEnumerationValue( value ) )
  {
    this->SetValue( value );
  }
  else
  {
    this->SetValue( static_cast<IdType>( Square ) );
  }
}

Member Function Documentation

bool mitk::PlanarFigureControlPointStyleProperty::AddEnum ( const std::string &  name,
const IdType id 
) [protected, virtual]

this function is overridden as protected, so that the user may not add additional invalid types.

Reimplemented from mitk::EnumerationProperty.

Definition at line 44 of file mitkPlanarFigureControlPointStyleProperty.cpp.

{
  return Superclass::AddEnum( name, id );  
}
void mitk::PlanarFigureControlPointStyleProperty::AddEnumTypes (  ) [protected, virtual]

Adds the standard enumeration types with corresponding strings.

Definition at line 37 of file mitkPlanarFigureControlPointStyleProperty.cpp.

Referenced by PlanarFigureControlPointStyleProperty().

{
  this->AddEnum( "Square", static_cast<IdType>( Square ) );
  this->AddEnum( "Circle", static_cast<IdType>( Circle ) );
}
virtual const char* mitk::PlanarFigureControlPointStyleProperty::GetClassName (  ) const [virtual]

Reimplemented from mitk::EnumerationProperty.

mitk::PlanarFigureControlPointStyleProperty::Shape mitk::PlanarFigureControlPointStyleProperty::GetShape (  ) [virtual]
static Pointer mitk::PlanarFigureControlPointStyleProperty::New (  ) [static]

Reimplemented from mitk::EnumerationProperty.

static Pointer mitk::PlanarFigureControlPointStyleProperty::New ( const std::string &  _arg ) [inline, static]

Definition at line 50 of file mitkPlanarFigureControlPointStyleProperty.h.

{
static Pointer mitk::PlanarFigureControlPointStyleProperty::New ( const IdType _arg ) [inline, static]

Definition at line 48 of file mitkPlanarFigureControlPointStyleProperty.h.

void mitk::PlanarFigureControlPointStyleProperty::SetShape ( Shape  shape ) [virtual]

Definition at line 55 of file mitkPlanarFigureControlPointStyleProperty.cpp.

{
  this->SetValue( static_cast<IdType>( shape ) );
}

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