Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkEncodedGradientEstimator Class Reference

Superclass for gradient estimation. More...

#include <vtkEncodedGradientEstimator.h>

Inheritance diagram for vtkEncodedGradientEstimator:

Inheritance graph
[legend]
Collaboration diagram for vtkEncodedGradientEstimator:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent index)
virtual void SetInput (vtkImageData *)
virtual vtkImageDataGetInput ()
virtual void SetGradientMagnitudeScale (float)
virtual float GetGradientMagnitudeScale ()
virtual void SetGradientMagnitudeBias (float)
virtual float GetGradientMagnitudeBias ()
virtual void SetBoundsClip (int)
virtual int GetBoundsClip ()
virtual void BoundsClipOn ()
virtual void BoundsClipOff ()
virtual void SetBounds (int, int, int, int, int, int)
virtual void SetBounds (int[6])
virtual int * GetBounds ()
virtual void GetBounds (int data[6])
void Update (void)
unsigned short * GetEncodedNormals (void)
int GetEncodedNormalIndex (int xyz_index)
int GetEncodedNormalIndex (int x_index, int y_index, int z_index)
unsigned char * GetGradientMagnitudes (void)
virtual void SetNumberOfThreads (int)
virtual int GetNumberOfThreads ()
void SetDirectionEncoder (vtkDirectionEncoder *direnc)
virtual vtkDirectionEncoderGetDirectionEncoder ()
virtual void SetComputeGradientMagnitudes (int)
virtual int GetComputeGradientMagnitudes ()
virtual void ComputeGradientMagnitudesOn ()
virtual void ComputeGradientMagnitudesOff ()
virtual void SetCylinderClip (int)
virtual int GetCylinderClip ()
virtual void CylinderClipOn ()
virtual void CylinderClipOff ()
virtual float GetLastUpdateTimeInSeconds ()
virtual float GetLastUpdateTimeInCPUSeconds ()
virtual int GetUseCylinderClip ()
int * GetCircleLimits ()
void SetZeroNormalThreshold (float v)
virtual float GetZeroNormalThreshold ()
virtual void SetZeroPad (int)
virtual int GetZeroPad ()
virtual void ZeroPadOn ()
virtual void ZeroPadOff ()
virtual int * GetInputSize ()
virtual void GetInputSize (int data[3])
virtual float * GetInputAspect ()
virtual void GetInputAspect (float data[3])

Static Public Methods

int IsTypeOf (const char *type)
vtkEncodedGradientEstimator * SafeDownCast (vtkObject *o)

Public Attributes

vtkImageDataInput
unsigned short * EncodedNormals
int EncodedNormalsSize [3]
unsigned char * GradientMagnitudes
vtkTimeStamp BuildTime

Protected Methods

 vtkEncodedGradientEstimator ()
 ~vtkEncodedGradientEstimator ()
 vtkEncodedGradientEstimator (const vtkEncodedGradientEstimator &)
void operator= (const vtkEncodedGradientEstimator &)
virtual void UpdateNormals (void)=0
void ComputeCircleLimits (int size)

Protected Attributes

int NumberOfThreads
vtkMultiThreaderThreader
vtkDirectionEncoderDirectionEncoder
float GradientMagnitudeScale
float GradientMagnitudeBias
float LastUpdateTimeInSeconds
float LastUpdateTimeInCPUSeconds
float ZeroNormalThreshold
int CylinderClip
int * CircleLimits
int CircleLimitsSize
int UseCylinderClip
int BoundsClip
int Bounds [6]
int InputSize [3]
float InputAspect [3]
int ComputeGradientMagnitudes
int ZeroPad

Detailed Description

Superclass for gradient estimation.

Date:
2000/12/10 20:08:36
Revision:
1.22

vtkEncodedGradientEstimator is an abstract superclass for gradient estimation. It takes a scalar input of vtkImageData, computes a gradient value for every point, and encodes this value into a three byte value (2 for direction, 1 for magnitude) using the vtkDirectionEncoder. The direction encoder is defaulted to a vtkRecursiveSphereDirectionEncoder, but can be overridden with the SetDirectionEncoder method. The scale and the bias values for the gradient magnitude are used to convert it into a one byte value according to v = m*scale + bias where m is the magnitude and v is the resulting one byte value.

See also:
vtkFiniteDifferenceGradientEstimator vtkDirectionEncoder

Definition at line 68 of file vtkEncodedGradientEstimator.h.


Constructor & Destructor Documentation

vtkEncodedGradientEstimator::vtkEncodedGradientEstimator   [protected]
 

vtkEncodedGradientEstimator::~vtkEncodedGradientEstimator   [protected]
 

vtkEncodedGradientEstimator::vtkEncodedGradientEstimator const vtkEncodedGradientEstimator &    [inline, protected]
 

Definition at line 182 of file vtkEncodedGradientEstimator.h.


Member Function Documentation

virtual const char* vtkEncodedGradientEstimator::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkFiniteDifferenceGradientEstimator.

int vtkEncodedGradientEstimator::IsTypeOf const char *    type [static]
 

Return 1 if this class type 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.

Reimplemented in vtkFiniteDifferenceGradientEstimator.

virtual int vtkEncodedGradientEstimator::IsA const char *    type [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.

Reimplemented in vtkFiniteDifferenceGradientEstimator.

vtkEncodedGradientEstimator* vtkEncodedGradientEstimator::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkFiniteDifferenceGradientEstimator.

void vtkEncodedGradientEstimator::PrintSelf ostream &    os,
vtkIndent    index
[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.

Reimplemented in vtkFiniteDifferenceGradientEstimator.

virtual void vtkEncodedGradientEstimator::SetInput vtkImageData   [virtual]
 

Set/Get the scalar input for which the normals will be calculated

virtual vtkImageData* vtkEncodedGradientEstimator::GetInput   [virtual]
 

virtual void vtkEncodedGradientEstimator::SetGradientMagnitudeScale float    [virtual]
 

Set/Get the scale and bias for the gradient magnitude

virtual float vtkEncodedGradientEstimator::GetGradientMagnitudeScale   [virtual]
 

virtual void vtkEncodedGradientEstimator::SetGradientMagnitudeBias float    [virtual]
 

virtual float vtkEncodedGradientEstimator::GetGradientMagnitudeBias   [virtual]
 

virtual void vtkEncodedGradientEstimator::SetBoundsClip int    [virtual]
 

Turn on / off the bounding of the normal computation by the this->Bounds bounding box

virtual int vtkEncodedGradientEstimator::GetBoundsClip   [virtual]
 

virtual void vtkEncodedGradientEstimator::BoundsClipOn   [virtual]
 

virtual void vtkEncodedGradientEstimator::BoundsClipOff   [virtual]
 

virtual void vtkEncodedGradientEstimator::SetBounds int   ,
int   ,
int   ,
int   ,
int   ,
int   
[virtual]
 

Set / Get the bounds of the computation (used if this->ComputationBounds is 1.) The bounds are specified xmin, xmax, ymin, ymax, zmin, zmax.

virtual void vtkEncodedGradientEstimator::SetBounds int   [6] [virtual]
 

virtual int* vtkEncodedGradientEstimator::GetBounds   [virtual]
 

virtual void vtkEncodedGradientEstimator::GetBounds int    data[6] [virtual]
 

void vtkEncodedGradientEstimator::Update void   
 

Recompute the encoded normals and gradient magnitudes.

unsigned short* vtkEncodedGradientEstimator::GetEncodedNormals void   
 

Get the encoded normals.

int vtkEncodedGradientEstimator::GetEncodedNormalIndex int    xyz_index
 

Get the encoded normal at an x,y,z location in the volume

int vtkEncodedGradientEstimator::GetEncodedNormalIndex int    x_index,
int    y_index,
int    z_index
 

unsigned char* vtkEncodedGradientEstimator::GetGradientMagnitudes void   
 

Get the gradient magnitudes

virtual void vtkEncodedGradientEstimator::SetNumberOfThreads int    [virtual]
 

Get/Set the number of threads to create when encoding normals This defaults to the number of available processors on the machine

virtual int vtkEncodedGradientEstimator::GetNumberOfThreads   [virtual]
 

void vtkEncodedGradientEstimator::SetDirectionEncoder vtkDirectionEncoder   direnc
 

Set / Get the direction encoder used to encode normal directions to fit within two bytes

virtual vtkDirectionEncoder* vtkEncodedGradientEstimator::GetDirectionEncoder   [virtual]
 

virtual void vtkEncodedGradientEstimator::SetComputeGradientMagnitudes int    [virtual]
 

If you don't want to compute gradient magnitudes (but you do want normals for shading) this can be used. Be careful - if if you a non-constant gradient magnitude transfer function and you turn this on, it may crash

virtual int vtkEncodedGradientEstimator::GetComputeGradientMagnitudes   [virtual]
 

virtual void vtkEncodedGradientEstimator::ComputeGradientMagnitudesOn   [virtual]
 

virtual void vtkEncodedGradientEstimator::ComputeGradientMagnitudesOff   [virtual]
 

virtual void vtkEncodedGradientEstimator::SetCylinderClip int    [virtual]
 

If the data in each slice is only contained within a circle circumscribed within the slice, and the slice is square, then don't compute anything outside the circle. This circle through the slices forms a cylinder.

virtual int vtkEncodedGradientEstimator::GetCylinderClip   [virtual]
 

virtual void vtkEncodedGradientEstimator::CylinderClipOn   [virtual]
 

virtual void vtkEncodedGradientEstimator::CylinderClipOff   [virtual]
 

virtual float vtkEncodedGradientEstimator::GetLastUpdateTimeInSeconds   [virtual]
 

Get the time required for the last update in seconds or cpu seconds

virtual float vtkEncodedGradientEstimator::GetLastUpdateTimeInCPUSeconds   [virtual]
 

virtual int vtkEncodedGradientEstimator::GetUseCylinderClip   [virtual]
 

int* vtkEncodedGradientEstimator::GetCircleLimits   [inline]
 

Definition at line 140 of file vtkEncodedGradientEstimator.h.

void vtkEncodedGradientEstimator::SetZeroNormalThreshold float    v
 

Set / Get the ZeroNormalThreshold - this defines the minimum magnitude of a gradient that is considered sufficient to define a direction. Gradients with magnitudes at or less than this value are given a "zero normal" index. These are handled specially in the shader, and you can set the intensity of light for these zero normals in the gradient shader.

virtual float vtkEncodedGradientEstimator::GetZeroNormalThreshold   [virtual]
 

virtual void vtkEncodedGradientEstimator::SetZeroPad int    [virtual]
 

Assume that the data value outside the volume is zero when computing normals.

virtual int vtkEncodedGradientEstimator::GetZeroPad   [virtual]
 

virtual void vtkEncodedGradientEstimator::ZeroPadOn   [virtual]
 

virtual void vtkEncodedGradientEstimator::ZeroPadOff   [virtual]
 

virtual int* vtkEncodedGradientEstimator::GetInputSize   [virtual]
 

virtual void vtkEncodedGradientEstimator::GetInputSize int    data[3] [virtual]
 

virtual float* vtkEncodedGradientEstimator::GetInputAspect   [virtual]
 

virtual void vtkEncodedGradientEstimator::GetInputAspect float    data[3] [virtual]
 

void vtkEncodedGradientEstimator::operator= const vtkEncodedGradientEstimator &    [inline, protected]
 

Definition at line 183 of file vtkEncodedGradientEstimator.h.

virtual void vtkEncodedGradientEstimator::UpdateNormals void    [protected, pure virtual]
 

Reimplemented in vtkFiniteDifferenceGradientEstimator.

void vtkEncodedGradientEstimator::ComputeCircleLimits int    size [protected]
 


Member Data Documentation

vtkImageData* vtkEncodedGradientEstimator::Input
 

Definition at line 164 of file vtkEncodedGradientEstimator.h.

unsigned short* vtkEncodedGradientEstimator::EncodedNormals
 

Definition at line 167 of file vtkEncodedGradientEstimator.h.

int vtkEncodedGradientEstimator::EncodedNormalsSize[3]
 

Definition at line 168 of file vtkEncodedGradientEstimator.h.

unsigned char* vtkEncodedGradientEstimator::GradientMagnitudes
 

Definition at line 171 of file vtkEncodedGradientEstimator.h.

vtkTimeStamp vtkEncodedGradientEstimator::BuildTime
 

Definition at line 174 of file vtkEncodedGradientEstimator.h.

int vtkEncodedGradientEstimator::NumberOfThreads [protected]
 

Definition at line 186 of file vtkEncodedGradientEstimator.h.

vtkMultiThreader* vtkEncodedGradientEstimator::Threader [protected]
 

Definition at line 188 of file vtkEncodedGradientEstimator.h.

vtkDirectionEncoder* vtkEncodedGradientEstimator::DirectionEncoder [protected]
 

Definition at line 190 of file vtkEncodedGradientEstimator.h.

float vtkEncodedGradientEstimator::GradientMagnitudeScale [protected]
 

Definition at line 194 of file vtkEncodedGradientEstimator.h.

float vtkEncodedGradientEstimator::GradientMagnitudeBias [protected]
 

Definition at line 195 of file vtkEncodedGradientEstimator.h.

float vtkEncodedGradientEstimator::LastUpdateTimeInSeconds [protected]
 

Definition at line 197 of file vtkEncodedGradientEstimator.h.

float vtkEncodedGradientEstimator::LastUpdateTimeInCPUSeconds [protected]
 

Definition at line 198 of file vtkEncodedGradientEstimator.h.

float vtkEncodedGradientEstimator::ZeroNormalThreshold [protected]
 

Definition at line 200 of file vtkEncodedGradientEstimator.h.

int vtkEncodedGradientEstimator::CylinderClip [protected]
 

Definition at line 202 of file vtkEncodedGradientEstimator.h.

int* vtkEncodedGradientEstimator::CircleLimits [protected]
 

Definition at line 203 of file vtkEncodedGradientEstimator.h.

int vtkEncodedGradientEstimator::CircleLimitsSize [protected]
 

Definition at line 204 of file vtkEncodedGradientEstimator.h.

int vtkEncodedGradientEstimator::UseCylinderClip [protected]
 

Definition at line 205 of file vtkEncodedGradientEstimator.h.

int vtkEncodedGradientEstimator::BoundsClip [protected]
 

Definition at line 208 of file vtkEncodedGradientEstimator.h.

int vtkEncodedGradientEstimator::Bounds[6] [protected]
 

Definition at line 209 of file vtkEncodedGradientEstimator.h.

int vtkEncodedGradientEstimator::InputSize[3] [protected]
 

Definition at line 211 of file vtkEncodedGradientEstimator.h.

float vtkEncodedGradientEstimator::InputAspect[3] [protected]
 

Definition at line 212 of file vtkEncodedGradientEstimator.h.

int vtkEncodedGradientEstimator::ComputeGradientMagnitudes [protected]
 

Definition at line 214 of file vtkEncodedGradientEstimator.h.

int vtkEncodedGradientEstimator::ZeroPad [protected]
 

Definition at line 216 of file vtkEncodedGradientEstimator.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 12:47:38 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001