VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkFixedPointRayCastImage Class Reference

helper class for a ray cast image More...

#include <vtkFixedPointRayCastImage.h>

Inheritance diagram for vtkFixedPointRayCastImage:
[legend]
Collaboration diagram for vtkFixedPointRayCastImage:
[legend]

Public Types

typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkFixedPointRayCastImageNewInstance () const
 
virtual void PrintSelf (ostream &os, vtkIndent indent)
 
unsigned short * GetImage ()
 
void AllocateImage ()
 
void ClearImage ()
 
float GetZBufferValue (int x, int y)
 
floatGetZBuffer ()
 
void AllocateZBuffer ()
 
virtual void SetImageViewportSize (int, int)
 
void SetImageViewportSize (int[2])
 
virtual intGetImageViewportSize ()
 
virtual void GetImageViewportSize (int data[2])
 
virtual void SetImageMemorySize (int, int)
 
void SetImageMemorySize (int[2])
 
virtual intGetImageMemorySize ()
 
virtual void GetImageMemorySize (int data[2])
 
virtual void SetImageInUseSize (int, int)
 
void SetImageInUseSize (int[2])
 
virtual intGetImageInUseSize ()
 
virtual void GetImageInUseSize (int data[2])
 
virtual void SetImageOrigin (int, int)
 
void SetImageOrigin (int[2])
 
virtual intGetImageOrigin ()
 
virtual void GetImageOrigin (int data[2])
 
virtual void SetImageSampleDistance (float)
 
virtual float GetImageSampleDistance ()
 
virtual void SetZBufferSize (int, int)
 
void SetZBufferSize (int[2])
 
virtual intGetZBufferSize ()
 
virtual void GetZBufferSize (int data[2])
 
virtual void SetZBufferOrigin (int, int)
 
void SetZBufferOrigin (int[2])
 
virtual intGetZBufferOrigin ()
 
virtual void GetZBufferOrigin (int data[2])
 
virtual void SetUseZBuffer (int)
 
virtual int GetUseZBuffer ()
 
virtual void UseZBufferOn ()
 
virtual void UseZBufferOff ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkFixedPointRayCastImageNew ()
 
static int IsTypeOf (const char *type)
 
static vtkFixedPointRayCastImageSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkFixedPointRayCastImage ()
 
 ~vtkFixedPointRayCastImage ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

int ImageViewportSize [2]
 
int ImageMemorySize [2]
 
int ImageInUseSize [2]
 
int ImageOrigin [2]
 
float ImageSampleDistance
 
unsigned short * Image
 
int ZBufferSize [2]
 
int ZBufferMemorySize
 
int ZBufferOrigin [2]
 
int UseZBuffer
 
floatZBuffer
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

helper class for a ray cast image

This is a helper class for storing the ray cast image including the underlying data and the size of the image. This class is not intended to be used directly - just as an internal class in the vtkFixedPointVolumeRayCastMapper so that multiple mappers can share the same image. This class also stored the ZBuffer (if necessary due to intermixed geometry). Perhaps this class could be generalized in the future to be used for other ray cast methods other than the fixed point method.

See also
vtkFixedPointVolumeRayCastMapper

Definition at line 38 of file vtkFixedPointRayCastImage.h.

Member Typedef Documentation

Definition at line 42 of file vtkFixedPointRayCastImage.h.

Constructor & Destructor Documentation

vtkFixedPointRayCastImage::vtkFixedPointRayCastImage ( )
protected
vtkFixedPointRayCastImage::~vtkFixedPointRayCastImage ( )
protected

Member Function Documentation

static vtkFixedPointRayCastImage* vtkFixedPointRayCastImage::New ( )
static
static int vtkFixedPointRayCastImage::IsTypeOf ( const char *  type)
static
virtual int vtkFixedPointRayCastImage::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

static vtkFixedPointRayCastImage* vtkFixedPointRayCastImage::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkFixedPointRayCastImage::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkObject.

vtkFixedPointRayCastImage* vtkFixedPointRayCastImage::NewInstance ( ) const
virtual void vtkFixedPointRayCastImage::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

unsigned short* vtkFixedPointRayCastImage::GetImage ( )
inline

Get the internal storage for the image. It is a pointer to unsigned short with four components (RGBA) per pixel. This memory is allocated when the AllocateImage method is called.

Definition at line 48 of file vtkFixedPointRayCastImage.h.

virtual void vtkFixedPointRayCastImage::SetImageViewportSize ( int  ,
int   
)
virtual

Set / Get the ImageViewportSize. This is the size of the whole viewport in pixels.

void vtkFixedPointRayCastImage::SetImageViewportSize ( int  [2])

Set / Get the ImageViewportSize. This is the size of the whole viewport in pixels.

virtual int* vtkFixedPointRayCastImage::GetImageViewportSize ( )
virtual

Set / Get the ImageViewportSize. This is the size of the whole viewport in pixels.

virtual void vtkFixedPointRayCastImage::GetImageViewportSize ( int  data[2])
virtual

Set / Get the ImageViewportSize. This is the size of the whole viewport in pixels.

virtual void vtkFixedPointRayCastImage::SetImageMemorySize ( int  ,
int   
)
virtual

Set / Get the ImageMemorySize. This is the size in pixels of the Image ivar. This will be a power of two in order to ensure that the texture can be rendered by graphics hardware that requires power of two textures.

void vtkFixedPointRayCastImage::SetImageMemorySize ( int  [2])

Set / Get the ImageMemorySize. This is the size in pixels of the Image ivar. This will be a power of two in order to ensure that the texture can be rendered by graphics hardware that requires power of two textures.

virtual int* vtkFixedPointRayCastImage::GetImageMemorySize ( )
virtual

Set / Get the ImageMemorySize. This is the size in pixels of the Image ivar. This will be a power of two in order to ensure that the texture can be rendered by graphics hardware that requires power of two textures.

virtual void vtkFixedPointRayCastImage::GetImageMemorySize ( int  data[2])
virtual

Set / Get the ImageMemorySize. This is the size in pixels of the Image ivar. This will be a power of two in order to ensure that the texture can be rendered by graphics hardware that requires power of two textures.

virtual void vtkFixedPointRayCastImage::SetImageInUseSize ( int  ,
int   
)
virtual

Set / Get the size of the image we are actually using. As long as the memory size is big enough, but not too big, we won't bother deleting and re-allocated, we'll just continue to use the memory size we have. This size will always be equal to or less than the ImageMemorySize.

void vtkFixedPointRayCastImage::SetImageInUseSize ( int  [2])

Set / Get the size of the image we are actually using. As long as the memory size is big enough, but not too big, we won't bother deleting and re-allocated, we'll just continue to use the memory size we have. This size will always be equal to or less than the ImageMemorySize.

virtual int* vtkFixedPointRayCastImage::GetImageInUseSize ( )
virtual

Set / Get the size of the image we are actually using. As long as the memory size is big enough, but not too big, we won't bother deleting and re-allocated, we'll just continue to use the memory size we have. This size will always be equal to or less than the ImageMemorySize.

virtual void vtkFixedPointRayCastImage::GetImageInUseSize ( int  data[2])
virtual

Set / Get the size of the image we are actually using. As long as the memory size is big enough, but not too big, we won't bother deleting and re-allocated, we'll just continue to use the memory size we have. This size will always be equal to or less than the ImageMemorySize.

virtual void vtkFixedPointRayCastImage::SetImageOrigin ( int  ,
int   
)
virtual

Set / Get the origin of the image. This is the starting pixel within the whole viewport that our Image starts on. That is, we could be generating just a subregion of the whole viewport due to the fact that our volume occupies only a portion of the viewport. The Image pixels will start from this location.

void vtkFixedPointRayCastImage::SetImageOrigin ( int  [2])

Set / Get the origin of the image. This is the starting pixel within the whole viewport that our Image starts on. That is, we could be generating just a subregion of the whole viewport due to the fact that our volume occupies only a portion of the viewport. The Image pixels will start from this location.

virtual int* vtkFixedPointRayCastImage::GetImageOrigin ( )
virtual

Set / Get the origin of the image. This is the starting pixel within the whole viewport that our Image starts on. That is, we could be generating just a subregion of the whole viewport due to the fact that our volume occupies only a portion of the viewport. The Image pixels will start from this location.

virtual void vtkFixedPointRayCastImage::GetImageOrigin ( int  data[2])
virtual

Set / Get the origin of the image. This is the starting pixel within the whole viewport that our Image starts on. That is, we could be generating just a subregion of the whole viewport due to the fact that our volume occupies only a portion of the viewport. The Image pixels will start from this location.

virtual void vtkFixedPointRayCastImage::SetImageSampleDistance ( float  )
virtual

Set / Get the ImageSampleDistance that will be used for rendering. This is a copy of the value stored in the mapper. It is stored here for sharing between all mappers that are participating in the creation of this image.

virtual float vtkFixedPointRayCastImage::GetImageSampleDistance ( )
virtual

Set / Get the ImageSampleDistance that will be used for rendering. This is a copy of the value stored in the mapper. It is stored here for sharing between all mappers that are participating in the creation of this image.

void vtkFixedPointRayCastImage::AllocateImage ( )

Call this method once the ImageMemorySize has been set the allocate the image. If an image already exists, it will be deleted first.

void vtkFixedPointRayCastImage::ClearImage ( )

Clear the image to (0,0,0,0) for each pixel.

virtual void vtkFixedPointRayCastImage::SetZBufferSize ( int  ,
int   
)
virtual

Set / Get the size of the ZBuffer in pixels. The zbuffer will be captured for the region of the screen covered by the ImageInUseSize image. However, due to subsampling, the size of the ImageInUseSize image may be smaller than this ZBuffer image which will be captured at screen resolution.

void vtkFixedPointRayCastImage::SetZBufferSize ( int  [2])

Set / Get the size of the ZBuffer in pixels. The zbuffer will be captured for the region of the screen covered by the ImageInUseSize image. However, due to subsampling, the size of the ImageInUseSize image may be smaller than this ZBuffer image which will be captured at screen resolution.

virtual int* vtkFixedPointRayCastImage::GetZBufferSize ( )
virtual

Set / Get the size of the ZBuffer in pixels. The zbuffer will be captured for the region of the screen covered by the ImageInUseSize image. However, due to subsampling, the size of the ImageInUseSize image may be smaller than this ZBuffer image which will be captured at screen resolution.

virtual void vtkFixedPointRayCastImage::GetZBufferSize ( int  data[2])
virtual

Set / Get the size of the ZBuffer in pixels. The zbuffer will be captured for the region of the screen covered by the ImageInUseSize image. However, due to subsampling, the size of the ImageInUseSize image may be smaller than this ZBuffer image which will be captured at screen resolution.

virtual void vtkFixedPointRayCastImage::SetZBufferOrigin ( int  ,
int   
)
virtual

Set / Get the origin of the ZBuffer. This is the distance from the lower left corner of the viewport where the ZBuffer started (multiply the ImageOrigin by the ImageSampleDistance) This is the pixel location on the full resolution viewport where the ZBuffer capture will start. These values are used to convert the (x,y) pixel location within the ImageInUseSize image into a ZBuffer location.

void vtkFixedPointRayCastImage::SetZBufferOrigin ( int  [2])

Set / Get the origin of the ZBuffer. This is the distance from the lower left corner of the viewport where the ZBuffer started (multiply the ImageOrigin by the ImageSampleDistance) This is the pixel location on the full resolution viewport where the ZBuffer capture will start. These values are used to convert the (x,y) pixel location within the ImageInUseSize image into a ZBuffer location.

virtual int* vtkFixedPointRayCastImage::GetZBufferOrigin ( )
virtual

Set / Get the origin of the ZBuffer. This is the distance from the lower left corner of the viewport where the ZBuffer started (multiply the ImageOrigin by the ImageSampleDistance) This is the pixel location on the full resolution viewport where the ZBuffer capture will start. These values are used to convert the (x,y) pixel location within the ImageInUseSize image into a ZBuffer location.

virtual void vtkFixedPointRayCastImage::GetZBufferOrigin ( int  data[2])
virtual

Set / Get the origin of the ZBuffer. This is the distance from the lower left corner of the viewport where the ZBuffer started (multiply the ImageOrigin by the ImageSampleDistance) This is the pixel location on the full resolution viewport where the ZBuffer capture will start. These values are used to convert the (x,y) pixel location within the ImageInUseSize image into a ZBuffer location.

virtual void vtkFixedPointRayCastImage::SetUseZBuffer ( int  )
virtual

The UseZBuffer flag indicates whether the ZBuffer is in use. The ZBuffer is captured and used when IntermixIntersectingGeometry is on in the mapper, and when there are props that have been rendered before the current volume.

virtual int vtkFixedPointRayCastImage::GetUseZBuffer ( )
virtual

The UseZBuffer flag indicates whether the ZBuffer is in use. The ZBuffer is captured and used when IntermixIntersectingGeometry is on in the mapper, and when there are props that have been rendered before the current volume.

virtual void vtkFixedPointRayCastImage::UseZBufferOn ( )
virtual

The UseZBuffer flag indicates whether the ZBuffer is in use. The ZBuffer is captured and used when IntermixIntersectingGeometry is on in the mapper, and when there are props that have been rendered before the current volume.

virtual void vtkFixedPointRayCastImage::UseZBufferOff ( )
virtual

The UseZBuffer flag indicates whether the ZBuffer is in use. The ZBuffer is captured and used when IntermixIntersectingGeometry is on in the mapper, and when there are props that have been rendered before the current volume.

float vtkFixedPointRayCastImage::GetZBufferValue ( int  x,
int  y 
)

Get the ZBuffer value corresponding to location (x,y) where (x,y) are indexing into the ImageInUse image. This must be converted to the zbuffer image coordinates. Nearest neighbor value is returned. If UseZBuffer is off, then 1.0 is always returned.

float* vtkFixedPointRayCastImage::GetZBuffer ( )
inline

Get the ZBuffer. The size of the ZBuffer should be specific with SetZBufferSize, and AllocateZBuffer method should be called before getting the ZBuffer.

Definition at line 141 of file vtkFixedPointRayCastImage.h.

void vtkFixedPointRayCastImage::AllocateZBuffer ( )

Member Data Documentation

int vtkFixedPointRayCastImage::ImageViewportSize[2]
protected

Definition at line 152 of file vtkFixedPointRayCastImage.h.

int vtkFixedPointRayCastImage::ImageMemorySize[2]
protected

Definition at line 158 of file vtkFixedPointRayCastImage.h.

int vtkFixedPointRayCastImage::ImageInUseSize[2]
protected

Definition at line 164 of file vtkFixedPointRayCastImage.h.

int vtkFixedPointRayCastImage::ImageOrigin[2]
protected

Definition at line 168 of file vtkFixedPointRayCastImage.h.

float vtkFixedPointRayCastImage::ImageSampleDistance
protected

Definition at line 172 of file vtkFixedPointRayCastImage.h.

unsigned short* vtkFixedPointRayCastImage::Image
protected

Definition at line 175 of file vtkFixedPointRayCastImage.h.

int vtkFixedPointRayCastImage::ZBufferSize[2]
protected

Definition at line 178 of file vtkFixedPointRayCastImage.h.

int vtkFixedPointRayCastImage::ZBufferMemorySize
protected

Definition at line 183 of file vtkFixedPointRayCastImage.h.

int vtkFixedPointRayCastImage::ZBufferOrigin[2]
protected

Definition at line 187 of file vtkFixedPointRayCastImage.h.

int vtkFixedPointRayCastImage::UseZBuffer
protected

Definition at line 190 of file vtkFixedPointRayCastImage.h.

float* vtkFixedPointRayCastImage::ZBuffer
protected

Definition at line 193 of file vtkFixedPointRayCastImage.h.


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