VTK
|
The superclass for all representations. More...
#include <vtkDataRepresentation.h>
Public Types | |
typedef vtkPassInputTypeAlgorithm | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkDataRepresentation * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | ApplyViewTheme (vtkViewTheme *vtkNotUsed(theme)) |
virtual vtkSelection * | ConvertSelection (vtkView *view, vtkSelection *selection) |
vtkAlgorithmOutput * | GetInputConnection (int port=0, int index=0) |
vtkAnnotationLink * | GetAnnotationLink () |
void | SetAnnotationLink (vtkAnnotationLink *link) |
void | Select (vtkView *view, vtkSelection *selection) |
void | Select (vtkView *view, vtkSelection *selection, bool extend) |
void | Annotate (vtkView *view, vtkAnnotationLayers *annotations) |
void | Annotate (vtkView *view, vtkAnnotationLayers *annotations, bool extend) |
virtual void | SetSelectable (bool) |
virtual bool | GetSelectable () |
virtual void | SelectableOn () |
virtual void | SelectableOff () |
void | UpdateSelection (vtkSelection *selection) |
void | UpdateSelection (vtkSelection *selection, bool extend) |
void | UpdateAnnotations (vtkAnnotationLayers *annotations) |
void | UpdateAnnotations (vtkAnnotationLayers *annotations, bool extend) |
virtual vtkAlgorithmOutput * | GetInternalAnnotationOutputPort () |
virtual vtkAlgorithmOutput * | GetInternalAnnotationOutputPort (int port) |
virtual vtkAlgorithmOutput * | GetInternalAnnotationOutputPort (int port, int conn) |
virtual vtkAlgorithmOutput * | GetInternalSelectionOutputPort () |
virtual vtkAlgorithmOutput * | GetInternalSelectionOutputPort (int port) |
virtual vtkAlgorithmOutput * | GetInternalSelectionOutputPort (int port, int conn) |
virtual vtkAlgorithmOutput * | GetInternalOutputPort () |
virtual vtkAlgorithmOutput * | GetInternalOutputPort (int port) |
virtual vtkAlgorithmOutput * | GetInternalOutputPort (int port, int conn) |
virtual void | SetSelectionType (int) |
virtual int | GetSelectionType () |
virtual void | SetSelectionArrayNames (vtkStringArray *names) |
virtual vtkStringArray * | GetSelectionArrayNames () |
virtual void | SetSelectionArrayName (const char *name) |
virtual const char * | GetSelectionArrayName () |
Static Public Member Functions | |
static vtkDataRepresentation * | New () |
static int | IsTypeOf (const char *type) |
static vtkDataRepresentation * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkDataRepresentation () | |
~vtkDataRepresentation () | |
virtual void | ProcessEvents (vtkObject *caller, unsigned long eventId, void *callData) |
virtual bool | AddToView (vtkView *vtkNotUsed(view)) |
virtual bool | RemoveFromView (vtkView *vtkNotUsed(view)) |
virtual vtkAnnotationLayers * | ConvertAnnotations (vtkView *view, vtkAnnotationLayers *annotations) |
vtkTrivialProducer * | GetInternalInput (int port, int conn) |
void | SetInternalInput (int port, int conn, vtkTrivialProducer *producer) |
virtual int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
Protected Attributes | |
bool | Selectable |
int | SelectionType |
vtkStringArray * | SelectionArrayNames |
Command * | Observer |
Friends | |
class | vtkView |
class | vtkRenderView |
class | Command |
vtkAnnotationLink * | AnnotationLinkInternal |
virtual void | SetAnnotationLinkInternal (vtkAnnotationLink *link) |
The superclass for all representations.
vtkDataRepresentation the superclass for representations of data objects. This class itself may be instantiated and used as a representation that simply holds a connection to a pipeline.
If there are multiple representations present in a view, you should use a subclass of vtkDataRepresentation. The representation is responsible for taking the input pipeline connection and converting it to an object usable by a view. In the most common case, the representation will contain the pipeline necessary to convert a data object into an actor or set of actors.
The representation has a concept of a selection. If the user performs a selection operation on the view, the view forwards this on to its representations. The representation is responsible for displaying that selection in an appropriate way.
Representation selections may also be linked. The representation shares the selection by converting it into a view-independent format, then setting the selection on its vtkAnnotationLink. Other representations sharing the same selection link instance will get the same selection from the selection link when the view is updated. The application is responsible for linking representations as appropriate by setting the same vtkAnnotationLink on each linked representation.
Definition at line 71 of file vtkDataRepresentation.h.
typedef vtkPassInputTypeAlgorithm vtkDataRepresentation::Superclass |
Definition at line 75 of file vtkDataRepresentation.h.
|
protected |
|
protected |
|
static |
|
static |
|
virtual |
Reimplemented in vtkParallelCoordinatesRepresentation, vtkRenderedGraphRepresentation, vtkParallelCoordinatesHistogramRepresentation, vtkQtTableRepresentation, vtkRenderedTreeAreaRepresentation, vtkRenderedSurfaceRepresentation, vtkRenderedRepresentation, vtkEmptyRepresentation, and vtkRenderedHierarchyRepresentation.
|
static |
|
protectedvirtual |
Reimplemented in vtkParallelCoordinatesRepresentation, vtkRenderedGraphRepresentation, vtkParallelCoordinatesHistogramRepresentation, vtkQtTableRepresentation, vtkRenderedTreeAreaRepresentation, vtkRenderedSurfaceRepresentation, vtkRenderedRepresentation, vtkEmptyRepresentation, and vtkRenderedHierarchyRepresentation.
vtkDataRepresentation* vtkDataRepresentation::NewInstance | ( | ) | const |
void vtkDataRepresentation::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
inline |
Convenience override method for obtaining the input connection without specifying the port or index.
Definition at line 81 of file vtkDataRepresentation.h.
|
inline |
The annotation link for this representation. To link annotations, set the same vtkAnnotationLink object in multiple representations.
Definition at line 88 of file vtkDataRepresentation.h.
void vtkDataRepresentation::SetAnnotationLink | ( | vtkAnnotationLink * | link | ) |
The annotation link for this representation. To link annotations, set the same vtkAnnotationLink object in multiple representations.
|
inlinevirtual |
Apply a theme to this representation. Subclasses should override this method.
Definition at line 95 of file vtkDataRepresentation.h.
|
inline |
The view calls this method when a selection occurs. The representation takes this selection and converts it into a selection on its data by calling ConvertSelection, then calls UpdateSelection with the converted selection. Subclasses should not overrride this method, but should instead override ConvertSelection. The optional third argument specifies whether the selection should be added to the previous selection on this representation.
Definition at line 105 of file vtkDataRepresentation.h.
void vtkDataRepresentation::Select | ( | vtkView * | view, |
vtkSelection * | selection, | ||
bool | extend | ||
) |
The view calls this method when a selection occurs. The representation takes this selection and converts it into a selection on its data by calling ConvertSelection, then calls UpdateSelection with the converted selection. Subclasses should not overrride this method, but should instead override ConvertSelection. The optional third argument specifies whether the selection should be added to the previous selection on this representation.
|
inline |
Analogous to Select(). The view calls this method when it needs to change the underlying annotations (some views might perform the creation of annotations). The representation takes the annotations and converts them into a selection on its data by calling ConvertAnnotations, then calls UpdateAnnotations with the converted selection. Subclasses should not overrride this method, but should instead override ConvertSelection. The optional third argument specifies whether the selection should be added to the previous selection on this representation.
Definition at line 120 of file vtkDataRepresentation.h.
void vtkDataRepresentation::Annotate | ( | vtkView * | view, |
vtkAnnotationLayers * | annotations, | ||
bool | extend | ||
) |
Analogous to Select(). The view calls this method when it needs to change the underlying annotations (some views might perform the creation of annotations). The representation takes the annotations and converts them into a selection on its data by calling ConvertAnnotations, then calls UpdateAnnotations with the converted selection. Subclasses should not overrride this method, but should instead override ConvertSelection. The optional third argument specifies whether the selection should be added to the previous selection on this representation.
|
virtual |
Whether this representation is able to handle a selection. Default is true.
|
virtual |
Whether this representation is able to handle a selection. Default is true.
|
virtual |
Whether this representation is able to handle a selection. Default is true.
|
virtual |
Whether this representation is able to handle a selection. Default is true.
|
inline |
Updates the selection in the selection link and fires a selection change event. Subclasses should not overrride this method, but should instead override ConvertSelection. The optional second argument specifies whether the selection should be added to the previous selection on this representation.
Definition at line 139 of file vtkDataRepresentation.h.
void vtkDataRepresentation::UpdateSelection | ( | vtkSelection * | selection, |
bool | extend | ||
) |
Updates the selection in the selection link and fires a selection change event. Subclasses should not overrride this method, but should instead override ConvertSelection. The optional second argument specifies whether the selection should be added to the previous selection on this representation.
|
inline |
Updates the selection in the selection link and fires a selection change event. Subclasses should not overrride this method, but should instead override ConvertSelection. The optional second argument specifies whether the selection should be added to the previous selection on this representation.
Definition at line 150 of file vtkDataRepresentation.h.
void vtkDataRepresentation::UpdateAnnotations | ( | vtkAnnotationLayers * | annotations, |
bool | extend | ||
) |
Updates the selection in the selection link and fires a selection change event. Subclasses should not overrride this method, but should instead override ConvertSelection. The optional second argument specifies whether the selection should be added to the previous selection on this representation.
|
inlinevirtual |
The output port that contains the annotations whose selections are localized for a particular input data object. This should be used when connecting the internal pipelines.
Reimplemented in vtkEmptyRepresentation.
Definition at line 159 of file vtkDataRepresentation.h.
|
inlinevirtual |
The output port that contains the annotations whose selections are localized for a particular input data object. This should be used when connecting the internal pipelines.
Reimplemented in vtkEmptyRepresentation.
Definition at line 161 of file vtkDataRepresentation.h.
|
virtual |
The output port that contains the annotations whose selections are localized for a particular input data object. This should be used when connecting the internal pipelines.
Reimplemented in vtkEmptyRepresentation.
|
inlinevirtual |
The output port that contains the selection associated with the current annotation (normally the interactive selection). This should be used when connecting the internal pipelines.
Definition at line 170 of file vtkDataRepresentation.h.
|
inlinevirtual |
The output port that contains the selection associated with the current annotation (normally the interactive selection). This should be used when connecting the internal pipelines.
Definition at line 172 of file vtkDataRepresentation.h.
|
virtual |
The output port that contains the selection associated with the current annotation (normally the interactive selection). This should be used when connecting the internal pipelines.
|
inlinevirtual |
Retrieves an output port for the input data object at the specified port and connection index. This may be connected to the representation's internal pipeline.
Definition at line 181 of file vtkDataRepresentation.h.
|
inlinevirtual |
Retrieves an output port for the input data object at the specified port and connection index. This may be connected to the representation's internal pipeline.
Definition at line 183 of file vtkDataRepresentation.h.
|
virtual |
Retrieves an output port for the input data object at the specified port and connection index. This may be connected to the representation's internal pipeline.
|
virtual |
Set the selection type produced by this view. This should be one of the content type constants defined in vtkSelectionNode.h. Common values are vtkSelectionNode::INDICES vtkSelectionNode::PEDIGREEIDS vtkSelectionNode::VALUES
|
virtual |
Set the selection type produced by this view. This should be one of the content type constants defined in vtkSelectionNode.h. Common values are vtkSelectionNode::INDICES vtkSelectionNode::PEDIGREEIDS vtkSelectionNode::VALUES
|
virtual |
If a VALUES selection, the arrays used to produce a selection.
|
virtual |
If a VALUES selection, the arrays used to produce a selection.
|
virtual |
If a VALUES selection, the array used to produce a selection.
|
virtual |
If a VALUES selection, the array used to produce a selection.
|
virtual |
Convert the selection to a type appropriate for sharing with other representations through vtkAnnotationLink, possibly using the view. For the superclass, we just return the same selection. Subclasses may do something more fancy, like convert the selection from a frustrum to a list of pedigree ids. If the selection cannot be applied to this representation, return NULL.
Reimplemented in vtkRenderedGraphRepresentation, vtkParallelCoordinatesRepresentation, vtkRenderedTreeAreaRepresentation, vtkRenderedHierarchyRepresentation, and vtkRenderedSurfaceRepresentation.
|
inlineprotectedvirtual |
Subclasses should override this to connect inputs to the internal pipeline as necessary. Since most representations are "meta-filters" (i.e. filters containing other filters), you should create shallow copies of your input before connecting to the internal pipeline. The convenience method GetInternalOutputPort will create a cached shallow copy of a specified input for you. The related helper functions GetInternalAnnotationOutputPort, GetInternalSelectionOutputPort should be used to obtain a selection or annotation port whose selections are localized for a particular input data object.
Reimplemented in vtkRenderedGraphRepresentation, vtkRenderedTreeAreaRepresentation, vtkParallelCoordinatesRepresentation, vtkRenderedHierarchyRepresentation, vtkParallelCoordinatesHistogramRepresentation, vtkQtTableRepresentation, and vtkRenderedSurfaceRepresentation.
Definition at line 231 of file vtkDataRepresentation.h.
|
protectedvirtual |
Clear the input shallow copy caches if the algorithm is in "release data" mode.
|
protectedvirtual |
The annotation link for this representation.
|
inlineprotectedvirtual |
Adds the representation to the view. This is called from vtkView::AddRepresentation(). Subclasses should override this method. Returns true if the addition succeeds.
Definition at line 272 of file vtkDataRepresentation.h.
|
inlineprotectedvirtual |
Removes the representation to the view. This is called from vtkView::RemoveRepresentation(). Subclasses should override this method. Returns true if the removal succeeds.
Definition at line 277 of file vtkDataRepresentation.h.
|
protectedvirtual |
Analogous to ConvertSelection(), allows subclasses to manipulate annotations before passing them off to vtkAnnotationLink. If the annotations cannot be applied to this representation, return NULL.
|
protected |
|
protected |
|
friend |
Definition at line 258 of file vtkDataRepresentation.h.
|
friend |
Definition at line 259 of file vtkDataRepresentation.h.
|
friend |
Definition at line 260 of file vtkDataRepresentation.h.
|
protected |
The annotation link for this representation.
Definition at line 245 of file vtkDataRepresentation.h.
|
protected |
Definition at line 249 of file vtkDataRepresentation.h.
|
protected |
The selection type created by the view.
Definition at line 252 of file vtkDataRepresentation.h.
|
protected |
If a VALUES selection, the array names used in the selection.
Definition at line 255 of file vtkDataRepresentation.h.
|
protected |
Definition at line 262 of file vtkDataRepresentation.h.