A widget representation that represents 2D paintbrushes. More...
#include <vtkKWEPaintbrushRepresentation2D.h>


A widget representation that represents 2D paintbrushes.
This is a concrete implementation of the abstract vtkKWEPaintbrushRepresentation class for paintbrush effects on a 2D scene.
A typical use will be as follows:
vtkKWEPaintbrushWidget * widget = vtkKWEPaintbrushWidget::New(); widget->SetInteractor( RenderWindowInteractor ); vtkKWEPaintbrushRepresentation2D * rep2D = vtkKWEPaintbrushRepresentation2D:: SafeDownCast( widget->GetRepresentation() );
vtkKWEVoxelAlignedImageActorPointPlacer. This placer snaps the tempate to a position on the image grid. See the vtkPointPlacer architecture for details. You can use this to restrict the shape to a given set of bounding planes. Definition at line 79 of file vtkKWEPaintbrushRepresentation2D.h.
| vtkKWEPaintbrushRepresentation2D::vtkKWEPaintbrushRepresentation2D | ( | ) | [protected] |
| vtkKWEPaintbrushRepresentation2D::~vtkKWEPaintbrushRepresentation2D | ( | ) | [protected] |
| static vtkKWEPaintbrushRepresentation2D* vtkKWEPaintbrushRepresentation2D::New | ( | ) | [static] |
Instantiate this class.
Reimplemented from vtkObject.
Reimplemented in vtkKWEPaintbrushRepresentationGrayscale2D.
| vtkKWEPaintbrushRepresentation2D::vtkTypeRevisionMacro | ( | vtkKWEPaintbrushRepresentation2D | , | |
| vtkKWEPaintbrushRepresentation | ||||
| ) |
Standard VTK methods.
| void vtkKWEPaintbrushRepresentation2D::PrintSelf | ( | ostream & | os, | |
| vtkIndent | indent | |||
| ) | [virtual] |
Standard VTK methods.
Reimplemented from vtkKWEPaintbrushRepresentation.
Reimplemented in vtkKWEPaintbrushRepresentationGrayscale2D.
| virtual void vtkKWEPaintbrushRepresentation2D::BuildRepresentation | ( | ) | [virtual] |
These are methods that satisfy vtkWidgetRepresentation's API.
Implements vtkKWEPaintbrushRepresentation.
Reimplemented in vtkKWEPaintbrushRepresentationGrayscale2D.
| virtual int vtkKWEPaintbrushRepresentation2D::ComputeInteractionState | ( | int | X, | |
| int | Y, | |||
| int | modified = 0 | |||
| ) | [virtual] |
These are methods that satisfy vtkWidgetRepresentation's API.
Implements vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::StartWidgetInteraction | ( | double | e[2] | ) | [virtual] |
These are methods that satisfy vtkWidgetRepresentation's API.
Implements vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::WidgetInteraction | ( | double | eventPos[2] | ) | [virtual] |
Must be present to satisfy the vtkWidgetRepresentation's API. This method will check the state of the representation. If the state is "Draw" (states are set by the vtkKWEPaintbrushWidget); the representation will enter this state during click-drags, the DrawFromLastEventPositionTo method is invoked.
Implements vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::ReleaseGraphicsResources | ( | vtkWindow * | w | ) | [virtual] |
Methods required by vtkProp superclass.
Reimplemented from vtkWidgetRepresentation.
| virtual int vtkKWEPaintbrushRepresentation2D::RenderOverlay | ( | vtkViewport * | viewport | ) | [virtual] |
Methods required by vtkProp superclass.
Reimplemented from vtkProp.
Reimplemented in vtkKWEPaintbrushRepresentationGrayscale2D.
| virtual int vtkKWEPaintbrushRepresentation2D::RenderOpaqueGeometry | ( | vtkViewport * | viewport | ) | [virtual] |
Methods required by vtkProp superclass.
Reimplemented from vtkProp.
Reimplemented in vtkKWEPaintbrushRepresentationGrayscale2D.
| virtual int vtkKWEPaintbrushRepresentation2D::RenderTranslucentGeometry | ( | vtkViewport * | viewport | ) | [virtual] |
Reimplemented in vtkKWEPaintbrushRepresentationGrayscale2D.
| void vtkKWEPaintbrushRepresentation2D::SetShapeOutlinePropertyInteract | ( | vtkProperty * | ) |
Set/Get the properties of the template outline. This should behave like the GIMP paintbrushes do. When you select a paintbrush, you will have the template outline along with an alpha transparency at the cursor location. You can move around, place it somewhere, or drag with the mouse button to create a stroke.
| virtual vtkProperty* vtkKWEPaintbrushRepresentation2D::GetShapeOutlinePropertyInteract | ( | ) | [virtual] |
Set/Get the properties of the template outline. This should behave like the GIMP paintbrushes do. When you select a paintbrush, you will have the template outline along with an alpha transparency at the cursor location. You can move around, place it somewhere, or drag with the mouse button to create a stroke.
| void vtkKWEPaintbrushRepresentation2D::SetShapeOutlinePropertyDraw | ( | vtkProperty * | ) |
Set/Get the properties of the template outline. This should behave like the GIMP paintbrushes do. When you select a paintbrush, you will have the template outline along with an alpha transparency at the cursor location. You can move around, place it somewhere, or drag with the mouse button to create a stroke.
| virtual vtkProperty* vtkKWEPaintbrushRepresentation2D::GetShapeOutlinePropertyDraw | ( | ) | [virtual] |
Set/Get the properties of the template outline. This should behave like the GIMP paintbrushes do. When you select a paintbrush, you will have the template outline along with an alpha transparency at the cursor location. You can move around, place it somewhere, or drag with the mouse button to create a stroke.
| void vtkKWEPaintbrushRepresentation2D::SetShapeOutlinePropertyErase | ( | vtkProperty * | ) |
Set/Get the properties of the template outline. This should behave like the GIMP paintbrushes do. When you select a paintbrush, you will have the template outline along with an alpha transparency at the cursor location. You can move around, place it somewhere, or drag with the mouse button to create a stroke.
| virtual vtkProperty* vtkKWEPaintbrushRepresentation2D::GetShapeOutlinePropertyErase | ( | ) | [virtual] |
Set/Get the properties of the template outline. This should behave like the GIMP paintbrushes do. When you select a paintbrush, you will have the template outline along with an alpha transparency at the cursor location. You can move around, place it somewhere, or drag with the mouse button to create a stroke.
| virtual int vtkKWEPaintbrushRepresentation2D::ActivateShapeOutline | ( | int | X, | |
| int | Y | |||
| ) | [virtual] |
INTERNAL - Do not use Invoked by the widget in response to user interaction Activate the template outline and the supplied coordinate according to the constraints of the placer ?
Implements vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::CreateShapeOutline | ( | double * | pos | ) | [virtual] |
Create the template outline at location pos[3] (world coords)
Implements vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::GetActors | ( | vtkPropCollection * | ) | [virtual] |
Get the actors maintained by the representation, that need to be rendered.
Reimplemented from vtkWidgetRepresentation.
Reimplemented in vtkKWEPaintbrushRepresentationGrayscale2D.
| virtual void vtkKWEPaintbrushRepresentation2D::GetActors2D | ( | vtkPropCollection * | ) | [virtual] |
Get the actors maintained by the representation, that need to be rendered.
Reimplemented from vtkWidgetRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::SetStateToDraw | ( | ) | [virtual] |
Set the Paintbrush representation state
Reimplemented from vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::SetStateToErase | ( | ) | [virtual] |
Set the Paintbrush representation state
Reimplemented from vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::SetStateToInteract | ( | ) | [virtual] |
Set the Paintbrush representation state
Reimplemented from vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::SetStateToDisabled | ( | ) | [virtual] |
Set the Paintbrush representation state
Reimplemented from vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::SetPaintbrushOperation | ( | vtkKWEPaintbrushOperation * | ) | [virtual] |
Set the paintbrush operation. Here we override the superclass methodm so that we can set some defaults of the operation based on the imageactor's input.
Reimplemented from vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::SetImageActor | ( | vtkImageActor * | ) | [virtual] |
Set the image actor on which the paintbrush is drawn. We will need to update the actor with the stencil's output etc..
| virtual vtkImageActor* vtkKWEPaintbrushRepresentation2D::GetImageActor | ( | ) | [virtual] |
Set the image actor on which the paintbrush is drawn. We will need to update the actor with the stencil's output etc..
| virtual void vtkKWEPaintbrushRepresentation2D::SetImageData | ( | vtkImageData * | ) | [virtual] |
Set the underlying image data. While this is not always necessary, it is required by some variants of the paintbrush widget such as region growing widgets, etc that use features from the underlying image data. At best, just specify the underlying image data always.. (In most cases, its just the ImageActor->GetInput()) NOTE: The canvas (PaintbrushDrawing) gets allocated when you invoke this method. You would do well to set the representation on the drawing prior to calling this method, so as to avoid unnecessary re-allocation later on.
| virtual vtkImageData* vtkKWEPaintbrushRepresentation2D::GetImageData | ( | ) | [virtual] |
Set the underlying image data. While this is not always necessary, it is required by some variants of the paintbrush widget such as region growing widgets, etc that use features from the underlying image data. At best, just specify the underlying image data always.. (In most cases, its just the ImageActor->GetInput()) NOTE: The canvas (PaintbrushDrawing) gets allocated when you invoke this method. You would do well to set the representation on the drawing prior to calling this method, so as to avoid unnecessary re-allocation later on.
| virtual void vtkKWEPaintbrushRepresentation2D::DeepCopy | ( | vtkWidgetRepresentation * | r | ) | [virtual] |
Reimplemented from vtkKWEPaintbrushRepresentation.
Reimplemented in vtkKWEPaintbrushRepresentationGrayscale2D.
| virtual int vtkKWEPaintbrushRepresentation2D::ResizeShape | ( | double | d[3], | |
| int | resizeType | |||
| ) | [virtual] |
See superclass documentation
Implements vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::SetPaintbrushDrawing | ( | vtkKWEPaintbrushDrawing * | ) | [virtual] |
See superclass documentation
Reimplemented from vtkKWEPaintbrushRepresentation.
Reimplemented in vtkKWEPaintbrushRepresentationGrayscale2D.
| virtual void vtkKWEPaintbrushRepresentation2D::SetShapeOutlineVisibility | ( | int | ) | [virtual] |
See superclass documentation
Implements vtkKWEPaintbrushRepresentation.
| virtual int vtkKWEPaintbrushRepresentation2D::GetShapeOutlineVisibility | ( | ) | [virtual] |
See superclass documentation
Implements vtkKWEPaintbrushRepresentation.
| virtual int vtkKWEPaintbrushRepresentation2D::IncreaseOpacity | ( | ) | [virtual] |
INTERNAL - Do not use. Invoked by the widget in response to user interaction Increase / Decrease the opacity of the drawing.
Reimplemented from vtkKWEPaintbrushRepresentation.
| virtual int vtkKWEPaintbrushRepresentation2D::DecreaseOpacity | ( | ) | [virtual] |
INTERNAL - Do not use. Invoked by the widget in response to user interaction Increase / Decrease the opacity of the drawing.
Reimplemented from vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::InstallPipeline | ( | ) | [virtual] |
INTERNAL - Do not use Sticks the stencil into the pipeline. (between the ImageActor and its original input).
Reimplemented from vtkKWEPaintbrushRepresentation.
Reimplemented in vtkKWEPaintbrushRepresentationGrayscale2D.
| virtual void vtkKWEPaintbrushRepresentation2D::UnInstallPipeline | ( | ) | [virtual] |
INTERNAL - Do not use Sticks the stencil into the pipeline. (between the ImageActor and its original input).
Reimplemented from vtkKWEPaintbrushRepresentation.
Reimplemented in vtkKWEPaintbrushRepresentationGrayscale2D.
| virtual void vtkKWEPaintbrushRepresentation2D::SetUseOverlay | ( | int | ) | [virtual] |
See docuementation of vtkKWEPaintbrushBlend::SetUseOverlay
| virtual int vtkKWEPaintbrushRepresentation2D::GetUseOverlay | ( | ) | [virtual] |
See docuementation of vtkKWEPaintbrushBlend::SetUseOverlay
| virtual void vtkKWEPaintbrushRepresentation2D::UseOverlayOn | ( | ) | [virtual] |
See docuementation of vtkKWEPaintbrushBlend::SetUseOverlay
| virtual void vtkKWEPaintbrushRepresentation2D::UseOverlayOff | ( | ) | [virtual] |
See docuementation of vtkKWEPaintbrushBlend::SetUseOverlay
| virtual void vtkKWEPaintbrushRepresentation2D::SetSingleSliceThickBrush | ( | int | ) | [virtual] |
Do a slice by slice painting, or paint in 3D using a 3D shape. If we do a Single slice painting, the dimension of the shape orthogonal to the currently displayed slice will be flattened implicitly. Default is 3D painting.
| virtual int vtkKWEPaintbrushRepresentation2D::GetSingleSliceThickBrush | ( | ) | [virtual] |
Do a slice by slice painting, or paint in 3D using a 3D shape. If we do a Single slice painting, the dimension of the shape orthogonal to the currently displayed slice will be flattened implicitly. Default is 3D painting.
| virtual void vtkKWEPaintbrushRepresentation2D::SingleSliceThickBrushOn | ( | ) | [virtual] |
Do a slice by slice painting, or paint in 3D using a 3D shape. If we do a Single slice painting, the dimension of the shape orthogonal to the currently displayed slice will be flattened implicitly. Default is 3D painting.
| virtual void vtkKWEPaintbrushRepresentation2D::SingleSliceThickBrushOff | ( | ) | [virtual] |
Do a slice by slice painting, or paint in 3D using a 3D shape. If we do a Single slice painting, the dimension of the shape orthogonal to the currently displayed slice will be flattened implicitly. Default is 3D painting.
| virtual int vtkKWEPaintbrushRepresentation2D::CopySketchToNextSlice | ( | vtkKWEPaintbrushSketch * | s | ) | [virtual] |
Copy a sketch from the currently displayed slice to the next/previous slice. Returns 1 on success / 0 on failure.
| virtual int vtkKWEPaintbrushRepresentation2D::CopySketchToPreviousSlice | ( | vtkKWEPaintbrushSketch * | s | ) | [virtual] |
Copy a sketch from the currently displayed slice to the next/previous slice. Returns 1 on success / 0 on failure.
| virtual void vtkKWEPaintbrushRepresentation2D::AddShapeToCurrentStroke | ( | double | p[3] | ) | [virtual] |
INTERNAL - Do not use This method is called from vtkKWEPaintbrushWidget whenever we draw using a shape centered at the location "p". Here we override the superclass method.
Reimplemented from vtkKWEPaintbrushRepresentation.
| virtual void vtkKWEPaintbrushRepresentation2D::CreateDefaultRepresentation | ( | ) | [protected, virtual] |
Create default representation. The default representation instantiates a new sequencer, if one hasn't been set. It also sets default properties for the ShapeOutline etc.
| virtual void vtkKWEPaintbrushRepresentation2D::GetEtchExtents | ( | int | extent[6] | ) | [protected, virtual] |
Get the extents of the current etch.
Reimplemented from vtkKWEPaintbrushRepresentation.
Definition at line 245 of file vtkKWEPaintbrushRepresentation2D.h.
Definition at line 246 of file vtkKWEPaintbrushRepresentation2D.h.
Definition at line 247 of file vtkKWEPaintbrushRepresentation2D.h.
Definition at line 248 of file vtkKWEPaintbrushRepresentation2D.h.
Definition at line 249 of file vtkKWEPaintbrushRepresentation2D.h.
Definition at line 250 of file vtkKWEPaintbrushRepresentation2D.h.
Definition at line 251 of file vtkKWEPaintbrushRepresentation2D.h.
vtkImageData* vtkKWEPaintbrushRepresentation2D::ImageData [protected] |
Definition at line 252 of file vtkKWEPaintbrushRepresentation2D.h.
Definition at line 253 of file vtkKWEPaintbrushRepresentation2D.h.
double vtkKWEPaintbrushRepresentation2D::LastEventPosition[2] [protected] |
Definition at line 254 of file vtkKWEPaintbrushRepresentation2D.h.
int vtkKWEPaintbrushRepresentation2D::SingleSliceThickBrush [protected] |
Definition at line 255 of file vtkKWEPaintbrushRepresentation2D.h.
1.7.1