ParaView
|
vtkRulerSourceRepresentation is a representation to show a ruler. More...
#include <vtkRulerSourceRepresentation.h>
Public Types | |
typedef vtkPVDataRepresentation | Superclass |
![]() | |
typedef vtkDataRepresentation | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | SetTextProperty (vtkTextProperty *prop) |
Set the text property for the printed distance. More... | |
void | SetAxisLineWidth (float width) |
Set the line width for the displayed axis in screen units. More... | |
void | SetAxisColor (double red, double green, double blue) |
Set the color for the displayed axis. More... | |
virtual void | MarkModified () |
This is one of the most important functions. More... | |
virtual void | SetVisibility (bool) |
Set the visibility. More... | |
void | SetLabelFormat (char *labelFormat) |
Specify the format to use for labelling the distance. More... | |
void | SetNumberOfRulerTicks (int numberOfRulerTicks) |
Specify the number of major ruler ticks. More... | |
int | ProcessViewRequest (vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo) |
vtkAlgorithm::ProcessRequest() equivalent for rendering passes. More... | |
void | SetDistanceRepresentation (vtkDistanceRepresentation2D *) |
Set the text widget. More... | |
virtual vtkDistanceRepresentation2D * | GetDistanceRepresentation () |
Set the text widget. More... | |
void | SetRulerMode (int choice) |
Enable or disable ruler mode. More... | |
int | GetRulerMode () |
Enable or disable ruler mode. More... | |
void | SetRulerDistance (double distance) |
Specify the RulerDistance which indicates the spacing of the major ticks in the unit space obtained after the Scale is applied (see SetScale()). More... | |
double | GetRulerDistance () |
Specify the RulerDistance which indicates the spacing of the major ticks in the unit space obtained after the Scale is applied (see SetScale()). More... | |
void | SetScale (double distance) |
Set scale factor to apply to the ruler graduation scale and the displayed distance. More... | |
double | GetScale () |
Set scale factor to apply to the ruler graduation scale and the displayed distance. More... | |
![]() | |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual unsigned int | Initialize (unsigned int minIdAvailable, unsigned int maxIdAvailable) |
Initialize the representation with an identifier range so each internal representation can own a unique ID. More... | |
unsigned int | GetUniqueIdentifier () |
Return 0 if the Initialize() method was not called otherwise a unique ID that will be shared across the processes for that same object. More... | |
virtual bool | GetVisibility () |
virtual vtkDataObject * | GetRenderedDataObject (int vtkNotUsed(port)) |
Returns the data object that is rendered from the given input port. More... | |
virtual void | SetForcedCacheKey (double val) |
Typically a representation decides whether to use cache based on the view's values for UseCache and CacheKey. More... | |
virtual void | SetForceUseCache (bool val) |
bool | GetUsingCacheForUpdate () |
Called by vtkPVDataRepresentationPipeline to see if using cache is valid and will be used for the update. More... | |
virtual bool | GetNeedUpdate () |
virtual vtkAlgorithmOutput * | GetInternalOutputPort () |
Retrieves an output port for the input data object at the specified port and connection index. More... | |
virtual vtkAlgorithmOutput * | GetInternalOutputPort (int port) |
virtual vtkAlgorithmOutput * | GetInternalOutputPort (int port, int conn) |
vtkView * | GetView () const |
Provides access to the view. More... | |
virtual void | SetUpdateTime (double time) |
Set the update time. More... | |
virtual double | GetUpdateTime () |
Set the update time. More... | |
virtual bool | GetUpdateTimeValid () |
Set whether the UpdateTime is valid. More... | |
virtual void | SetUseCache (bool) |
virtual void | SetCacheKey (double val) |
virtual double | GetCacheKey () |
Returns whether caching is used and what key to use when caching is enabled. More... | |
virtual bool | GetUseCache () |
Returns whether caching is used and what key to use when caching is enabled. More... | |
Static Public Member Functions | |
static vtkRulerSourceRepresentation * | New () |
static int | IsTypeOf (const char *type) |
static vtkRulerSourceRepresentation * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkPVDataRepresentation * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkRulerSourceRepresentation () | |
~vtkRulerSourceRepresentation () | |
virtual int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
Overridden to invoke vtkCommand::UpdateDataEvent. More... | |
virtual int | FillInputPortInformation (int port, vtkInformation *info) |
Fill input port information. More... | |
virtual bool | AddToView (vtkView *view) |
Adds the representation to the view. More... | |
virtual bool | RemoveFromView (vtkView *view) |
Removes the representation to the view. More... | |
virtual bool | IsCached (double cache_key) |
Overridden to check with the vtkPVCacheKeeper to see if the key is cached. More... | |
![]() | |
vtkPVDataRepresentation () | |
~vtkPVDataRepresentation () | |
virtual vtkExecutive * | CreateDefaultExecutive () |
Create a default executive. More... | |
virtual int | RequestUpdateExtent (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) |
virtual int | RequestUpdateTime (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
Protected Attributes | |
vtkDistanceRepresentation2D * | DistanceRepresentation |
vtkNew< vtkPVCacheKeeper > | CacheKeeper |
vtkNew< vtkPolyData > | Clone |
![]() | |
double | UpdateTime |
bool | UpdateTimeValid |
unsigned int | UniqueIdentifier |
vtkRulerSourceRepresentation is a representation to show a ruler.
The input is expected to be vtkPolyData with two points.
Definition at line 35 of file vtkRulerSourceRepresentation.h.
Definition at line 40 of file vtkRulerSourceRepresentation.h.
|
protected |
|
protected |
|
static |
|
virtual |
Reimplemented from vtkPVDataRepresentation.
|
static |
|
virtual |
Reimplemented from vtkPVDataRepresentation.
|
static |
void vtkRulerSourceRepresentation::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
void vtkRulerSourceRepresentation::SetDistanceRepresentation | ( | vtkDistanceRepresentation2D * | ) |
Set the text widget.
|
virtual |
Set the text widget.
void vtkRulerSourceRepresentation::SetTextProperty | ( | vtkTextProperty * | prop | ) |
Set the text property for the printed distance.
void vtkRulerSourceRepresentation::SetAxisLineWidth | ( | float | width | ) |
Set the line width for the displayed axis in screen units.
void vtkRulerSourceRepresentation::SetAxisColor | ( | double | red, |
double | green, | ||
double | blue | ||
) |
Set the color for the displayed axis.
|
virtual |
This is one of the most important functions.
In VTK pipelines, it's very easy for the pipeline to decide when it needs to re-execute. vtkAlgorithm::Update() can go up the entire pipeline to see if any filters MTime changed (among other things) and if so, it can re-execute the pipeline. However in case of representations, the real input connection may only be present on the data-server nodes. In that case the vtkPVDataRepresentation::RequestData() will only get called on the data-server nodes. That means that representations won't be able to any data-delivery in RequestData(). We'd need some other mechanisms to synchronize data-delivery among processes. To avoid that conundrum, the vtkSMRepresentationProxy calls MarkModified() on all processes whenever any filter in the pipeline is modified. In this method, the vtkPVDataRepresentation subclasses should ensure that they mark all delivery related filters dirty in their RequestData to ensure they execute then next time they are updated. The vtkPVDataRepresentation also uses a special executive which avoids updating the representation unless MarkModified() was called since the last Update(), thus acting as a update-suppressor.
Reimplemented from vtkPVDataRepresentation.
|
virtual |
Set the visibility.
Reimplemented from vtkPVDataRepresentation.
void vtkRulerSourceRepresentation::SetLabelFormat | ( | char * | labelFormat | ) |
Specify the format to use for labelling the distance.
Note that an empty string results in no label, or a format string without a "%" character will not print the distance value.
void vtkRulerSourceRepresentation::SetRulerMode | ( | int | choice | ) |
Enable or disable ruler mode.
When enabled, the ticks on the distance widget are separated by the amount specified by vtkDistanceRepresentation::RulerDistance. Otherwise, the value vtkDistanceRepresentation::NumberOfRulerTicks is used to draw the tick marks.
int vtkRulerSourceRepresentation::GetRulerMode | ( | ) |
Enable or disable ruler mode.
When enabled, the ticks on the distance widget are separated by the amount specified by vtkDistanceRepresentation::RulerDistance. Otherwise, the value vtkDistanceRepresentation::NumberOfRulerTicks is used to draw the tick marks.
void vtkRulerSourceRepresentation::SetRulerDistance | ( | double | distance | ) |
Specify the RulerDistance which indicates the spacing of the major ticks in the unit space obtained after the Scale is applied (see SetScale()).
This ivar only has effect when the RulerMode is on.
double vtkRulerSourceRepresentation::GetRulerDistance | ( | ) |
Specify the RulerDistance which indicates the spacing of the major ticks in the unit space obtained after the Scale is applied (see SetScale()).
This ivar only has effect when the RulerMode is on.
void vtkRulerSourceRepresentation::SetScale | ( | double | distance | ) |
Set scale factor to apply to the ruler graduation scale and the displayed distance.
Used to transform VTK world space units to a desired unit, e.g., inches to centimeters.
double vtkRulerSourceRepresentation::GetScale | ( | ) |
Set scale factor to apply to the ruler graduation scale and the displayed distance.
Used to transform VTK world space units to a desired unit, e.g., inches to centimeters.
void vtkRulerSourceRepresentation::SetNumberOfRulerTicks | ( | int | numberOfRulerTicks | ) |
Specify the number of major ruler ticks.
Note: the number of ticks is the number between the two handle endpoints. This ivar only has effect when the RulerMode is off.
|
virtual |
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
This is typically called by the vtkView to request meta-data from the representations or ask them to perform certain tasks e.g. PrepareForRendering.
Reimplemented from vtkPVDataRepresentation.
|
protectedvirtual |
Overridden to invoke vtkCommand::UpdateDataEvent.
Reimplemented from vtkPVDataRepresentation.
|
protectedvirtual |
Fill input port information.
|
protectedvirtual |
Adds the representation to the view.
This is called from vtkView::AddRepresentation(). Subclasses should override this method. Returns true if the addition succeeds.
Reimplemented from vtkPVDataRepresentation.
|
protectedvirtual |
Removes the representation to the view.
This is called from vtkView::RemoveRepresentation(). Subclasses should override this method. Returns true if the removal succeeds.
Reimplemented from vtkPVDataRepresentation.
|
protectedvirtual |
Overridden to check with the vtkPVCacheKeeper to see if the key is cached.
Reimplemented from vtkPVDataRepresentation.
|
protected |
Definition at line 158 of file vtkRulerSourceRepresentation.h.
|
protected |
Definition at line 159 of file vtkRulerSourceRepresentation.h.
|
protected |
Definition at line 160 of file vtkRulerSourceRepresentation.h.