Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends

vtkKWEPaintbrushDrawing Class Reference

a list of Sketches More...

#include <vtkKWEPaintbrushDrawing.h>

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

List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkKWEPaintbrushDrawing, vtkDataObject)
virtual void PrintSelf (ostream &os, vtkIndent indent)
void AddItem (vtkKWEPaintbrushSketch *a)
vtkKWEPaintbrushSketchAddItem ()
void RemoveAllItems ()
int RemoveItem (vtkKWEPaintbrushSketch *)
vtkKWEPaintbrushSketchGetItem (int i)
vtkKWEPaintbrushSketchGetItemWithLabel (vtkKWEPaintbrushEnums::LabelType)
int IsItemPresent (vtkKWEPaintbrushSketch *s)
void SetPaintbrushData (vtkKWEPaintbrushLabelData *)
void InitializeData ()
void InitializeSketches ()
void CreateSketches ()
virtual unsigned long GetMTime ()
int GetNumberOfItems ()
int GetIndexOfItem (vtkKWEPaintbrushSketch *s)
virtual void CollapseHistory ()
virtual void ShallowCopy (vtkDataObject *src)
void ComposeStrokes ()

void SetImageData (vtkImageData *)
virtual vtkImageDataGetImageData ()

virtual void SetLabelMap (vtkImageData *)
virtual vtkImageDataGetLabelMap ()

virtual vtkKWEPaintbrushDataGetPaintbrushData ()

void SetPaintbrushOperation (vtkKWEPaintbrushOperation *)
virtual vtkKWEPaintbrushOperationGetPaintbrushOperation ()

virtual int AddNewStroke (int n, int type=vtkKWEPaintbrushEnums::Draw, vtkKWEPaintbrushData *initialization=NULL)

virtual void SetRepresentation (int)
virtual int GetRepresentation ()
virtual void SetRepresentationToGrayscale ()
virtual void SetRepresentationToBinary ()
virtual void SetRepresentationToLabel ()

virtual void SetMaximumNumberOfSketches (int)
virtual int GetMaximumNumberOfSketches ()

virtual
vtkKWEPaintbrushPropertyManager
GetPaintbrushPropertyManager ()

Static Public Member Functions

static vtkKWEPaintbrushDrawingNew ()

static vtkKWEPaintbrushDrawingGetData (vtkInformation *info)
static vtkKWEPaintbrushDrawingGetData (vtkInformationVector *v, int i=0)

Protected Member Functions

 vtkKWEPaintbrushDrawing ()
 ~vtkKWEPaintbrushDrawing ()
virtual void AllocatePaintbrushData ()
void AssignUniqueLabelToSketch (vtkKWEPaintbrushSketch *s)
virtual void AddShapeToCurrentStroke (int n, double p[3])

Protected Attributes

vtkKWEPaintbrushDataPaintbrushData
vtkImageDataImageData
vtkImageDataLabelMap
vtkKWEPaintbrushOperationPaintbrushOperation
vtkKWEPaintbrushPropertyManagerPaintbrushPropertyManager
vtkCollectionCollection
int Representation
int MaximumNumberOfSketches

Friends

class vtkKWEPaintbrushSketch
class vtkKWEPaintbrushRepresentation

Detailed Description

a list of Sketches

vtkKWEPaintbrushDrawing represents and provides methods to manipulate a list of Sketches. The list is unsorted and duplicate entries are not prevented.

See also:
vtkKWEPaintbrushSketch

Definition at line 46 of file vtkKWEPaintbrushDrawing.h.


Constructor & Destructor Documentation

vtkKWEPaintbrushDrawing::vtkKWEPaintbrushDrawing (  )  [protected]
vtkKWEPaintbrushDrawing::~vtkKWEPaintbrushDrawing (  )  [protected]

Member Function Documentation

static vtkKWEPaintbrushDrawing* vtkKWEPaintbrushDrawing::New (  )  [static]

Reimplemented from vtkDataObject.

vtkKWEPaintbrushDrawing::vtkTypeRevisionMacro ( vtkKWEPaintbrushDrawing  ,
vtkDataObject   
)
virtual void vtkKWEPaintbrushDrawing::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkDataObject.

void vtkKWEPaintbrushDrawing::AddItem ( vtkKWEPaintbrushSketch a  ) 

Add an Sketch to the list.

vtkKWEPaintbrushSketch* vtkKWEPaintbrushDrawing::AddItem (  ) 

Add a new sketch to the list. Also initialize it with the usual parameters. Returns the newly added sketch.

void vtkKWEPaintbrushDrawing::RemoveAllItems (  ) 

Remove all sketches in the drawing.

int vtkKWEPaintbrushDrawing::RemoveItem ( vtkKWEPaintbrushSketch  ) 

Remove the specified sketch. Returns 1 if the item was removed.

vtkKWEPaintbrushSketch* vtkKWEPaintbrushDrawing::GetItem ( int  i  ) 

Get the Nth sketch from the drawing.

vtkKWEPaintbrushSketch* vtkKWEPaintbrushDrawing::GetItemWithLabel ( vtkKWEPaintbrushEnums::LabelType   ) 

Get the sketch with the specified label. Note that is method is relevant, only if our representation is a LabelMap. Returns NULL if there is no sketch with that label.

int vtkKWEPaintbrushDrawing::IsItemPresent ( vtkKWEPaintbrushSketch s  ) 
void vtkKWEPaintbrushDrawing::SetImageData ( vtkImageData  ) 

Set the image we are painting on.

virtual vtkImageData* vtkKWEPaintbrushDrawing::GetImageData (  )  [virtual]

Set the image we are painting on.

virtual void vtkKWEPaintbrushDrawing::SetLabelMap ( vtkImageData  )  [virtual]

Set the LabelMap we are painting on to an existing labelmap. Set before calling InitializeData. Only used if the representation type is set to labelmap.

virtual vtkImageData* vtkKWEPaintbrushDrawing::GetLabelMap (  )  [virtual]

Set the LabelMap we are painting on to an existing labelmap. Set before calling InitializeData. Only used if the representation type is set to labelmap.

void vtkKWEPaintbrushDrawing::SetPaintbrushData ( vtkKWEPaintbrushLabelData  ) 

Set the PaintbrushData for the drawing. You must use this method only if your data is a label map. If not, the data of each sketch is managed independently and you should set the PaintbrushData on each sketch seperately using the method above.

virtual vtkKWEPaintbrushData* vtkKWEPaintbrushDrawing::GetPaintbrushData (  )  [virtual]

Set/Get the paintbrush data that we've sketched out. This is the cumlated paintbrush data of all sketches.

void vtkKWEPaintbrushDrawing::InitializeData (  ) 

Initialize the drawing data based on the image metadata.

void vtkKWEPaintbrushDrawing::InitializeSketches (  ) 

There are two ways to initialize sketches in a drawing. They may be initialized individually using vtkKWEPaintbrushSketch::Initialize(..) or they may be initliazed more efficiently by the following method. This method is more efficient if you have several sketches in your drawing since, the drawing data is parsed for seperation into sketches only once. Note that you must have a collection of sketches in this drawing. Then we parse the paintbrush label data for labels that correspond to each of those sketches and initialize those sketches with the initial label map data as a stroke.

void vtkKWEPaintbrushDrawing::CreateSketches (  ) 

Unlike the above method, this method creates sketches for each label prsent in the label map. The subtle difference is that InitializeSketches initializes existing sketches in the drawing from the labels that these sketches represent that may be present in the label map. CreateSketches will read in a label map and create a set of sketches for you based on any label that is present in the label map.

void vtkKWEPaintbrushDrawing::SetPaintbrushOperation ( vtkKWEPaintbrushOperation  ) 

Set the PaintbrushOperation

virtual vtkKWEPaintbrushOperation* vtkKWEPaintbrushDrawing::GetPaintbrushOperation (  )  [virtual]

Set the PaintbrushOperation

virtual int vtkKWEPaintbrushDrawing::AddNewStroke ( int  n,
int  type = vtkKWEPaintbrushEnums::Draw,
vtkKWEPaintbrushData initialization = NULL 
) [virtual]

Add and delete a stroke. A stroke can hold multiple points. If type is 1, the stroke is a positive (draw) stroke. If type is 0, its a negative (erase) stroke. You can also add a new stroke with your own paintbrush data as input, let's say you wanted to compose an external segmentation to the existing ones.

static vtkKWEPaintbrushDrawing* vtkKWEPaintbrushDrawing::GetData ( vtkInformation info  )  [static]

Retrieve an instance of this class from an information object.

Reimplemented from vtkDataObject.

static vtkKWEPaintbrushDrawing* vtkKWEPaintbrushDrawing::GetData ( vtkInformationVector v,
int  i = 0 
) [static]

Retrieve an instance of this class from an information object.

Reimplemented from vtkDataObject.

virtual unsigned long vtkKWEPaintbrushDrawing::GetMTime (  )  [virtual]

Data objects are composite objects and need to check each part for MTime. The information object also needs to be considered.

Reimplemented from vtkDataObject.

int vtkKWEPaintbrushDrawing::GetNumberOfItems (  )  [inline]

Return the number of sketches in the drawing.

Definition at line 160 of file vtkKWEPaintbrushDrawing.h.

int vtkKWEPaintbrushDrawing::GetIndexOfItem ( vtkKWEPaintbrushSketch s  ) 

Get the index of the item in the list. Returns -1 if the item isn't present.

virtual void vtkKWEPaintbrushDrawing::SetRepresentation ( int   )  [virtual]

The user must set this using the class. For details, see documentation of vtkKWEPaintbrushEnums::BrushType.

virtual int vtkKWEPaintbrushDrawing::GetRepresentation (  )  [virtual]

The user must set this using the class. For details, see documentation of vtkKWEPaintbrushEnums::BrushType.

virtual void vtkKWEPaintbrushDrawing::SetRepresentationToGrayscale (  )  [inline, virtual]

The user must set this using the class. For details, see documentation of vtkKWEPaintbrushEnums::BrushType.

Definition at line 171 of file vtkKWEPaintbrushDrawing.h.

virtual void vtkKWEPaintbrushDrawing::SetRepresentationToBinary (  )  [inline, virtual]

The user must set this using the class. For details, see documentation of vtkKWEPaintbrushEnums::BrushType.

Definition at line 173 of file vtkKWEPaintbrushDrawing.h.

virtual void vtkKWEPaintbrushDrawing::SetRepresentationToLabel (  )  [inline, virtual]

The user must set this using the class. For details, see documentation of vtkKWEPaintbrushEnums::BrushType.

Definition at line 175 of file vtkKWEPaintbrushDrawing.h.

virtual void vtkKWEPaintbrushDrawing::SetMaximumNumberOfSketches ( int   )  [virtual]

You can set an upper limit on the number of sketches that can be added to the drawing. By default there is no limit. As a caveat, note that if you already have more sketches than the limit, setting this ivar will not remove any existing sketches.

virtual int vtkKWEPaintbrushDrawing::GetMaximumNumberOfSketches (  )  [virtual]

You can set an upper limit on the number of sketches that can be added to the drawing. By default there is no limit. As a caveat, note that if you already have more sketches than the limit, setting this ivar will not remove any existing sketches.

virtual void vtkKWEPaintbrushDrawing::CollapseHistory (  )  [virtual]

Collapse the history of all sketches in the drawing. This simply calls the CollapseHistory() method for each sketch in this drawing.

virtual void vtkKWEPaintbrushDrawing::ShallowCopy ( vtkDataObject src  )  [virtual]

Shallow copy. This copies the data, but not any of the pipeline connections.

Reimplemented from vtkDataObject.

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

INTERNAL - Do not use. Get the property manager, used to assign unique colors etc.

void vtkKWEPaintbrushDrawing::ComposeStrokes (  ) 

Compose strokes from all sketches together. This will visit each stroke on the stack from each sketch. Sort them by MTime. Then compose them all together.

virtual void vtkKWEPaintbrushDrawing::AllocatePaintbrushData (  )  [protected, virtual]
void vtkKWEPaintbrushDrawing::AssignUniqueLabelToSketch ( vtkKWEPaintbrushSketch s  )  [protected]

Helper function to assign a unique label to a newly created sketch. This makes sense only if the representation is "Label"

virtual void vtkKWEPaintbrushDrawing::AddShapeToCurrentStroke ( int  n,
double  p[3] 
) [protected, virtual]

This method will be invoked from the widget during user interaction


Friends And Related Function Documentation

friend class vtkKWEPaintbrushSketch [friend]

Definition at line 49 of file vtkKWEPaintbrushDrawing.h.

friend class vtkKWEPaintbrushRepresentation [friend]

Definition at line 50 of file vtkKWEPaintbrushDrawing.h.


Member Data Documentation

Definition at line 211 of file vtkKWEPaintbrushDrawing.h.

Definition at line 212 of file vtkKWEPaintbrushDrawing.h.

Definition at line 213 of file vtkKWEPaintbrushDrawing.h.

Definition at line 214 of file vtkKWEPaintbrushDrawing.h.

Definition at line 215 of file vtkKWEPaintbrushDrawing.h.

Definition at line 216 of file vtkKWEPaintbrushDrawing.h.

Definition at line 217 of file vtkKWEPaintbrushDrawing.h.

Definition at line 218 of file vtkKWEPaintbrushDrawing.h.


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