Classes | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Friends

vtkKWEPaintbrushPropertyManager Class Reference

Manages a default set of properties corresponding to the collection of sketches. More...

#include <vtkKWEPaintbrushPropertyManager.h>

Inheritance diagram for vtkKWEPaintbrushPropertyManager:
Inheritance graph
[legend]
Collaboration diagram for vtkKWEPaintbrushPropertyManager:
Collaboration graph
[legend]

List of all members.

Classes

class  vtkKWEPaintbrushColors
class  vtkKWEPaintbrushLabelMapColor

Public Types

typedef vtkstd::map
< vtkKWEPaintbrushEnums::LabelType,
vtkKWEPaintbrushLabelMapColor
LabelToColorMapType

Public Member Functions

 vtkTypeRevisionMacro (vtkKWEPaintbrushPropertyManager, vtkObject)
void PrintSelf (ostream &os, vtkIndent indent)
void Update ()

virtual vtkKWEPaintbrushDrawingGetPaintbrushDrawing ()

virtual void SetHighlightType (int)
virtual int GetHighlightType ()

void Initialize ()
void AddUsedColor (vtkProperty *p)
void RetrieveSketchColor (vtkKWEPaintbrushSketch *s, unsigned char c[3])
vtkKWEPaintbrushPropertyRequestColorForSketch (vtkKWEPaintbrushSketch *s)

Protected Types

typedef vtkKWEPaintbrushColors ColorType

Protected Member Functions

 vtkKWEPaintbrushPropertyManager ()
 ~vtkKWEPaintbrushPropertyManager ()
void UpdateLabelToColorMap ()
void AddUsedColor (const ColorType &)
ColorType RequestColor ()

void GrabFocus (vtkKWEPaintbrushSketch *)
void ReleaseFocus ()

Static Protected Member Functions

static
vtkKWEPaintbrushPropertyManager
New (vtkKWEPaintbrushDrawing *)
static
vtkKWEPaintbrushPropertyManager
New ()

Friends

class vtkKWEPaintbrushDrawing
class vtkKWEPaintbrushBlend
class vtkKWEPaintbrushWidget

Detailed Description

Manages a default set of properties corresponding to the collection of sketches.

This class is not meant to be used by the user and hence is not exposed to the user. It is used internally by the paintbrush infrastructure to assign a default set of properties as new sketches are added, so that you get unique colors for each segmentation etc. It is also used by the blender for optmizations in blending a label map containing many sketches into a final overlay.

Definition at line 46 of file vtkKWEPaintbrushPropertyManager.h.


Member Typedef Documentation

typedef vtkstd::map< vtkKWEPaintbrushEnums::LabelType, vtkKWEPaintbrushLabelMapColor > vtkKWEPaintbrushPropertyManager::LabelToColorMapType

Definition at line 112 of file vtkKWEPaintbrushPropertyManager.h.

Definition at line 139 of file vtkKWEPaintbrushPropertyManager.h.


Constructor & Destructor Documentation

vtkKWEPaintbrushPropertyManager::vtkKWEPaintbrushPropertyManager (  )  [protected]
vtkKWEPaintbrushPropertyManager::~vtkKWEPaintbrushPropertyManager (  )  [protected]

Member Function Documentation

vtkKWEPaintbrushPropertyManager::vtkTypeRevisionMacro ( vtkKWEPaintbrushPropertyManager  ,
vtkObject   
)
void vtkKWEPaintbrushPropertyManager::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkObject.

virtual vtkKWEPaintbrushDrawing* vtkKWEPaintbrushPropertyManager::GetPaintbrushDrawing (  )  [virtual]

A drawing is always associated with a paintbrush sketch. A vtkKWEPaintbrushSketch upon creation will automatically be assigned a default property internally. You can, using this method, query the sketch to which this property is assigned.

virtual void vtkKWEPaintbrushPropertyManager::SetHighlightType ( int   )  [virtual]

Two highlight modes are allowed. Please see vtkKWEPaintbrushProperty::HighlightTypeEnum Stippled inverted highlight looks better when you have an overlay, as with vtkKWEPaintbrushRepresentation2D. ThickHighlight looks better when you render brushdata as contours as in vtkKWEPaintbrushRepresentationGrayscale2D.

virtual int vtkKWEPaintbrushPropertyManager::GetHighlightType (  )  [virtual]

Two highlight modes are allowed. Please see vtkKWEPaintbrushProperty::HighlightTypeEnum Stippled inverted highlight looks better when you have an overlay, as with vtkKWEPaintbrushRepresentation2D. ThickHighlight looks better when you render brushdata as contours as in vtkKWEPaintbrushRepresentationGrayscale2D.

void vtkKWEPaintbrushPropertyManager::Update (  ) 

Assign colors to sketches in the drawing, using some strategy to ensure, as far as possible some sort of uniqueness

void vtkKWEPaintbrushPropertyManager::Initialize (  ) 

INTERNAL - Do not Use. Used to figure out used colors and assign "pleasing" defaultcolors to new sketches. The representations typically Initialize the manager, AddUsedColors for all the sketches that have colors already and then request a color for the new sketch.

void vtkKWEPaintbrushPropertyManager::AddUsedColor ( vtkProperty p  ) 

INTERNAL - Do not Use. Used to figure out used colors and assign "pleasing" defaultcolors to new sketches. The representations typically Initialize the manager, AddUsedColors for all the sketches that have colors already and then request a color for the new sketch.

void vtkKWEPaintbrushPropertyManager::RetrieveSketchColor ( vtkKWEPaintbrushSketch s,
unsigned char  c[3] 
)

INTERNAL - Do not Use. Used to figure out used colors and assign "pleasing" defaultcolors to new sketches. The representations typically Initialize the manager, AddUsedColors for all the sketches that have colors already and then request a color for the new sketch.

vtkKWEPaintbrushProperty* vtkKWEPaintbrushPropertyManager::RequestColorForSketch ( vtkKWEPaintbrushSketch s  ) 

INTERNAL - Do not Use. Used to figure out used colors and assign "pleasing" defaultcolors to new sketches. The representations typically Initialize the manager, AddUsedColors for all the sketches that have colors already and then request a color for the new sketch.

static vtkKWEPaintbrushPropertyManager* vtkKWEPaintbrushPropertyManager::New ( vtkKWEPaintbrushDrawing  )  [static, protected]
static vtkKWEPaintbrushPropertyManager* vtkKWEPaintbrushPropertyManager::New (  )  [static, protected]

Reimplemented from vtkObject.

void vtkKWEPaintbrushPropertyManager::UpdateLabelToColorMap (  )  [protected]

Called from Update(). This is done only if the Drawing type is LabelMap

void vtkKWEPaintbrushPropertyManager::AddUsedColor ( const ColorType  )  [protected]
ColorType vtkKWEPaintbrushPropertyManager::RequestColor (  )  [protected]
void vtkKWEPaintbrushPropertyManager::GrabFocus ( vtkKWEPaintbrushSketch  )  [protected]

Grab focus makes only a certain sketch editable. This is called in respose to interaction automatically by vtkKWEPaintbrushWidget.

void vtkKWEPaintbrushPropertyManager::ReleaseFocus (  )  [protected]

Grab focus makes only a certain sketch editable. This is called in respose to interaction automatically by vtkKWEPaintbrushWidget.


Friends And Related Function Documentation

friend class vtkKWEPaintbrushDrawing [friend]

Definition at line 49 of file vtkKWEPaintbrushPropertyManager.h.

friend class vtkKWEPaintbrushBlend [friend]

Definition at line 50 of file vtkKWEPaintbrushPropertyManager.h.

friend class vtkKWEPaintbrushWidget [friend]

Definition at line 51 of file vtkKWEPaintbrushPropertyManager.h.


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