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

mitk::VtkInterpolationProperty Class Reference

#include <mitkVtkInterpolationProperty.h>

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

List of all members.

Public Types

typedef VtkInterpolationProperty Self
typedef EnumerationProperty Superclass
typedef itk::SmartPointer< SelfPointer
typedef itk::SmartPointer
< const Self
ConstPointer

Public Member Functions

virtual const char * GetClassName () const
virtual int GetVtkInterpolation ()
virtual void SetInterpolationToFlat ()
virtual void SetInterpolationToGouraud ()
virtual void SetInterpolationToPhong ()

Static Public Member Functions

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

Protected Member Functions

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

Detailed Description

Encapsulates the enumeration vtkInterpolation. Valid values are (VTK constant/Id/string representation): VTK_FLAT/0/Flat, VTK_GOURAUD/1/Gouraud, VTK_PHONG/2/Phong Default is the Gouraud interpolation

Definition at line 32 of file mitkVtkInterpolationProperty.h.


Member Typedef Documentation

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

Reimplemented from mitk::EnumerationProperty.

Definition at line 36 of file mitkVtkInterpolationProperty.h.

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

Reimplemented from mitk::EnumerationProperty.

Definition at line 36 of file mitkVtkInterpolationProperty.h.

Reimplemented from mitk::EnumerationProperty.

Definition at line 36 of file mitkVtkInterpolationProperty.h.

Reimplemented from mitk::EnumerationProperty.

Definition at line 36 of file mitkVtkInterpolationProperty.h.


Constructor & Destructor Documentation

mitk::VtkInterpolationProperty::VtkInterpolationProperty (  ) [protected]

Constructor. Sets the representation to a default value of surface(2)

Definition at line 23 of file mitkVtkInterpolationProperty.cpp.

References AddInterpolationTypes(), and mitk::EnumerationProperty::SetValue().

{
  AddInterpolationTypes();
  SetValue( static_cast<IdType>( VTK_GOURAUD ) );
}
mitk::VtkInterpolationProperty::VtkInterpolationProperty ( const IdType value ) [protected]

Constructor. Sets the interpolation to the given value. If it is not valid, the interpolation is set to gouraud(1)

Parameters:
valuethe integer representation of the interpolation

Definition at line 30 of file mitkVtkInterpolationProperty.cpp.

{
  AddInterpolationTypes();
  if ( IsValidEnumerationValue( value ) )
  {
    SetValue( value ) ;
  }
  else
  {
    SetValue( static_cast<IdType>( VTK_GOURAUD ) );
  }
}
mitk::VtkInterpolationProperty::VtkInterpolationProperty ( const std::string &  value ) [protected]

Constructor. Sets the interpolation to the given value. If it is not valid, the representation is set to gouraud(1)

Parameters:
valuethe string representation of the interpolation

Definition at line 43 of file mitkVtkInterpolationProperty.cpp.

{
  AddInterpolationTypes();
  if ( IsValidEnumerationValue( value ) )
  {
    SetValue( value );
  }
  else
  {
    SetValue( static_cast<IdType>( VTK_GOURAUD ) );
  }
}

Member Function Documentation

bool mitk::VtkInterpolationProperty::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 interpolation types.

Reimplemented from mitk::EnumerationProperty.

Definition at line 89 of file mitkVtkInterpolationProperty.cpp.

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

Adds the enumeration types as defined by vtk to the list of known enumeration values.

Definition at line 81 of file mitkVtkInterpolationProperty.cpp.

Referenced by VtkInterpolationProperty().

{
  AddEnum( "Flat", static_cast<IdType>( VTK_FLAT ) );
  AddEnum( "Gouraud", static_cast<IdType>( VTK_GOURAUD ) );
  AddEnum( "Phong", static_cast<IdType>( VTK_PHONG ) );
}
virtual const char* mitk::VtkInterpolationProperty::GetClassName (  ) const [virtual]

Reimplemented from mitk::EnumerationProperty.

int mitk::VtkInterpolationProperty::GetVtkInterpolation (  ) [virtual]

Returns the current interpolation value as defined by VTK constants.

Returns:
the current interpolation as VTK constant.

Definition at line 57 of file mitkVtkInterpolationProperty.cpp.

{
  return static_cast<int>( GetValueAsId() );
}
static Pointer mitk::VtkInterpolationProperty::New ( const std::string &  _arg ) [inline, static]

Definition at line 42 of file mitkVtkInterpolationProperty.h.

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

Definition at line 40 of file mitkVtkInterpolationProperty.h.

void mitk::VtkInterpolationProperty::SetInterpolationToFlat (  ) [virtual]

Sets the interpolation type to VTK_FLAT.

Definition at line 63 of file mitkVtkInterpolationProperty.cpp.

{
  SetValue( static_cast<IdType>( VTK_FLAT ) );
}
void mitk::VtkInterpolationProperty::SetInterpolationToGouraud (  ) [virtual]

Sets the interpolation type to VTK_WIREFRAME.

Definition at line 69 of file mitkVtkInterpolationProperty.cpp.

{
  SetValue( static_cast<IdType>( VTK_GOURAUD ) );
}
void mitk::VtkInterpolationProperty::SetInterpolationToPhong (  ) [virtual]

Sets the interpolation type to VTK_SURFACE.

Definition at line 75 of file mitkVtkInterpolationProperty.cpp.

{
  SetValue( static_cast<IdType>( VTK_PHONG ) );
}

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