ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkImageSliceRepresentation Class Reference

representation for showing slices from a vtkImageData. More...

#include <vtkImageSliceRepresentation.h>

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

Public Types

enum  { XY_PLANE = VTK_XY_PLANE, YZ_PLANE = VTK_YZ_PLANE, XZ_PLANE = VTK_XZ_PLANE }
 
typedef vtkPVDataRepresentation Superclass
 
- Public Types inherited from vtkPVDataRepresentation
typedef vtkDataRepresentation Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual int ProcessViewRequest (vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
 vtkAlgorithm::ProcessRequest() equivalent for rendering passes. More...
 
virtual void MarkModified ()
 This needs to be called on all instances of vtkImageSliceRepresentation when the input is modified. More...
 
virtual void SetVisibility (bool val)
 Get/Set the visibility for this representation. More...
 
void SetOrientation (double, double, double)
 
void SetOrigin (double, double, double)
 
void SetPickable (int val)
 
void SetPosition (double, double, double)
 
void SetScale (double, double, double)
 
void SetOpacity (double val)
 
void SetLookupTable (vtkScalarsToColors *val)
 
void SetMapScalars (int val)
 
void SetUseXYPlane (int val)
 
vtkPVLODActorGetActor ()
 Provides access to the actor used by this representation. More...
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, const char *name)
 Set the input data arrays that this algorithm will process. More...
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, int fieldAttributeType)
 Set the input data arrays that this algorithm will process. More...
 
virtual void SetInputArrayToProcess (int idx, vtkInformation *info)
 Set the input data arrays that this algorithm will process. More...
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName)
 Set the input data arrays that this algorithm will process. More...
 
virtual void SetSlice (unsigned int)
 Get set the slice number to extract. More...
 
virtual unsigned int GetSlice ()
 Get set the slice number to extract. More...
 
virtual void SetSliceMode (int)
 Get/Set the direction in which to slice a 3D input data. More...
 
virtual int GetSliceMode ()
 Get/Set the direction in which to slice a 3D input data. More...
 
void SetAmbient (double ambient)
 Pass lighting parameters to vtkProperty. More...
 
void SetDiffuse (double diffuse)
 Pass lighting parameters to vtkProperty. More...
 
void SetSpecular (double specular)
 Pass lighting parameters to vtkProperty. More...
 
void SetSpecularPower (double val)
 Pass lighting parameters to vtkProperty. More...
 
void SetSpecularColor (double r, double g, double b)
 Pass lighting parameters to vtkProperty. More...
 
- Public Member Functions inherited from vtkPVDataRepresentation
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 vtkImageSliceRepresentationNew ()
 
static int IsTypeOf (const char *type)
 
static vtkImageSliceRepresentationSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkPVDataRepresentation
static int IsTypeOf (const char *type)
 
static vtkPVDataRepresentationSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkImageSliceRepresentation ()
 
 ~vtkImageSliceRepresentation ()
 
void UpdateSliceData (vtkInformationVector **)
 Extract the slice. More...
 
virtual int FillInputPortInformation (int port, vtkInformation *info)
 Fill input port information. More...
 
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 Subclasses should override this to connect inputs to the internal pipeline as necessary. 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...
 
- Protected Member Functions inherited from vtkPVDataRepresentation
 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

int SliceMode
 
unsigned int Slice
 
vtkPVCacheKeeperCacheKeeper
 
vtkPVImageSliceMapperSliceMapper
 
vtkPVLODActorActor
 
vtkImageData * SliceData
 
vtkNew< vtkPExtentTranslatorPExtentTranslator
 
int WholeExtent [6]
 
- Protected Attributes inherited from vtkPVDataRepresentation
double UpdateTime
 
bool UpdateTimeValid
 
unsigned int UniqueIdentifier
 

Detailed Description

representation for showing slices from a vtkImageData.

vtkImageSliceRepresentation is a representation for showing slices from an image dataset. Currently, it does not support composite datasets, however, we should be able to add such a support in future.

Definition at line 40 of file vtkImageSliceRepresentation.h.

Member Typedef Documentation

◆ Superclass

Definition at line 45 of file vtkImageSliceRepresentation.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
XY_PLANE 
YZ_PLANE 
XZ_PLANE 

Definition at line 105 of file vtkImageSliceRepresentation.h.

Constructor & Destructor Documentation

◆ vtkImageSliceRepresentation()

vtkImageSliceRepresentation::vtkImageSliceRepresentation ( )
protected

◆ ~vtkImageSliceRepresentation()

vtkImageSliceRepresentation::~vtkImageSliceRepresentation ( )
protected

Member Function Documentation

◆ New()

static vtkImageSliceRepresentation* vtkImageSliceRepresentation::New ( )
static

◆ GetClassName()

virtual const char* vtkImageSliceRepresentation::GetClassName ( )
virtual

Reimplemented from vtkPVDataRepresentation.

◆ IsTypeOf()

static int vtkImageSliceRepresentation::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkImageSliceRepresentation::IsA ( const char *  type)
virtual

Reimplemented from vtkPVDataRepresentation.

◆ SafeDownCast()

static vtkImageSliceRepresentation* vtkImageSliceRepresentation::SafeDownCast ( vtkObject *  o)
static

◆ PrintSelf()

void vtkImageSliceRepresentation::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

◆ SetInputArrayToProcess() [1/4]

virtual void vtkImageSliceRepresentation::SetInputArrayToProcess ( int  idx,
int  port,
int  connection,
int  fieldAssociation,
const char *  name 
)
virtual

Set the input data arrays that this algorithm will process.

Overridden to pass the array selection to the mapper.

◆ SetInputArrayToProcess() [2/4]

virtual void vtkImageSliceRepresentation::SetInputArrayToProcess ( int  idx,
int  port,
int  connection,
int  fieldAssociation,
int  fieldAttributeType 
)
inlinevirtual

Set the input data arrays that this algorithm will process.

Overridden to pass the array selection to the mapper.

Definition at line 55 of file vtkImageSliceRepresentation.h.

◆ SetInputArrayToProcess() [3/4]

virtual void vtkImageSliceRepresentation::SetInputArrayToProcess ( int  idx,
vtkInformation *  info 
)
inlinevirtual

Set the input data arrays that this algorithm will process.

Overridden to pass the array selection to the mapper.

Definition at line 61 of file vtkImageSliceRepresentation.h.

◆ SetInputArrayToProcess() [4/4]

virtual void vtkImageSliceRepresentation::SetInputArrayToProcess ( int  idx,
int  port,
int  connection,
const char *  fieldAssociation,
const char *  attributeTypeorName 
)
inlinevirtual

Set the input data arrays that this algorithm will process.

Overridden to pass the array selection to the mapper.

Definition at line 65 of file vtkImageSliceRepresentation.h.

◆ ProcessViewRequest()

virtual int vtkImageSliceRepresentation::ProcessViewRequest ( vtkInformationRequestKey *  request_type,
vtkInformation *  inInfo,
vtkInformation *  outInfo 
)
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.

◆ MarkModified()

virtual void vtkImageSliceRepresentation::MarkModified ( )
virtual

This needs to be called on all instances of vtkImageSliceRepresentation when the input is modified.

This is essential since the geometry filter does not have any real-input on the client side which messes with the Update requests.

Reimplemented from vtkPVDataRepresentation.

◆ SetVisibility()

virtual void vtkImageSliceRepresentation::SetVisibility ( bool  val)
virtual

Get/Set the visibility for this representation.

When the visibility of representation of false, all view passes are ignored. Overridden to propagate to the active representation.

Reimplemented from vtkPVDataRepresentation.

◆ SetSlice()

virtual void vtkImageSliceRepresentation::SetSlice ( unsigned  int)
virtual

Get set the slice number to extract.

◆ GetSlice()

virtual unsigned int vtkImageSliceRepresentation::GetSlice ( )
virtual

Get set the slice number to extract.

◆ SetSliceMode()

virtual void vtkImageSliceRepresentation::SetSliceMode ( int  )
virtual

Get/Set the direction in which to slice a 3D input data.

◆ GetSliceMode()

virtual int vtkImageSliceRepresentation::GetSliceMode ( )
virtual

Get/Set the direction in which to slice a 3D input data.

◆ SetOrientation()

void vtkImageSliceRepresentation::SetOrientation ( double  ,
double  ,
double   
)

◆ SetOrigin()

void vtkImageSliceRepresentation::SetOrigin ( double  ,
double  ,
double   
)

◆ SetPickable()

void vtkImageSliceRepresentation::SetPickable ( int  val)

◆ SetPosition()

void vtkImageSliceRepresentation::SetPosition ( double  ,
double  ,
double   
)

◆ SetScale()

void vtkImageSliceRepresentation::SetScale ( double  ,
double  ,
double   
)

◆ SetOpacity()

void vtkImageSliceRepresentation::SetOpacity ( double  val)

◆ SetLookupTable()

void vtkImageSliceRepresentation::SetLookupTable ( vtkScalarsToColors *  val)

◆ SetMapScalars()

void vtkImageSliceRepresentation::SetMapScalars ( int  val)

◆ SetUseXYPlane()

void vtkImageSliceRepresentation::SetUseXYPlane ( int  val)

◆ GetActor()

vtkPVLODActor* vtkImageSliceRepresentation::GetActor ( )
inline

Provides access to the actor used by this representation.

Definition at line 141 of file vtkImageSliceRepresentation.h.

◆ SetAmbient()

void vtkImageSliceRepresentation::SetAmbient ( double  ambient)

Pass lighting parameters to vtkProperty.

◆ SetDiffuse()

void vtkImageSliceRepresentation::SetDiffuse ( double  diffuse)

Pass lighting parameters to vtkProperty.

◆ SetSpecular()

void vtkImageSliceRepresentation::SetSpecular ( double  specular)

Pass lighting parameters to vtkProperty.

◆ SetSpecularPower()

void vtkImageSliceRepresentation::SetSpecularPower ( double  val)

Pass lighting parameters to vtkProperty.

◆ SetSpecularColor()

void vtkImageSliceRepresentation::SetSpecularColor ( double  r,
double  g,
double  b 
)

Pass lighting parameters to vtkProperty.

◆ UpdateSliceData()

void vtkImageSliceRepresentation::UpdateSliceData ( vtkInformationVector **  )
protected

Extract the slice.

◆ FillInputPortInformation()

virtual int vtkImageSliceRepresentation::FillInputPortInformation ( int  port,
vtkInformation *  info 
)
protectedvirtual

Fill input port information.

◆ RequestData()

virtual int vtkImageSliceRepresentation::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protectedvirtual

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 from vtkPVDataRepresentation.

◆ AddToView()

virtual bool vtkImageSliceRepresentation::AddToView ( vtkView *  view)
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.

◆ RemoveFromView()

virtual bool vtkImageSliceRepresentation::RemoveFromView ( vtkView *  view)
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.

◆ IsCached()

virtual bool vtkImageSliceRepresentation::IsCached ( double  cache_key)
protectedvirtual

Overridden to check with the vtkPVCacheKeeper to see if the key is cached.

Reimplemented from vtkPVDataRepresentation.

Member Data Documentation

◆ SliceMode

int vtkImageSliceRepresentation::SliceMode
protected

Definition at line 199 of file vtkImageSliceRepresentation.h.

◆ Slice

unsigned int vtkImageSliceRepresentation::Slice
protected

Definition at line 200 of file vtkImageSliceRepresentation.h.

◆ CacheKeeper

vtkPVCacheKeeper* vtkImageSliceRepresentation::CacheKeeper
protected

Definition at line 202 of file vtkImageSliceRepresentation.h.

◆ SliceMapper

vtkPVImageSliceMapper* vtkImageSliceRepresentation::SliceMapper
protected

Definition at line 203 of file vtkImageSliceRepresentation.h.

◆ Actor

vtkPVLODActor* vtkImageSliceRepresentation::Actor
protected

Definition at line 204 of file vtkImageSliceRepresentation.h.

◆ SliceData

vtkImageData* vtkImageSliceRepresentation::SliceData
protected

Definition at line 205 of file vtkImageSliceRepresentation.h.

◆ PExtentTranslator

vtkNew<vtkPExtentTranslator> vtkImageSliceRepresentation::PExtentTranslator
protected

Definition at line 209 of file vtkImageSliceRepresentation.h.

◆ WholeExtent

int vtkImageSliceRepresentation::WholeExtent[6]
protected

Definition at line 210 of file vtkImageSliceRepresentation.h.


The documentation for this class was generated from the following file: