VTK
|
Use finite differences to estimate gradient. More...
#include <vtkFiniteDifferenceGradientEstimator.h>
Public Types | |
typedef vtkEncodedGradientEstimator | Superclass |
Public Types inherited from vtkEncodedGradientEstimator | |
typedef vtkObject | Superclass |
Public Types inherited from vtkObject | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkFiniteDifferenceGradientEstimator * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | SetSampleSpacingInVoxels (int) |
virtual int | GetSampleSpacingInVoxels () |
Public Member Functions inherited from vtkEncodedGradientEstimator | |
vtkEncodedGradientEstimator * | NewInstance () const |
void | Update (void) |
unsigned short * | GetEncodedNormals (void) |
unsigned char * | GetGradientMagnitudes (void) |
virtual int | GetUseCylinderClip () |
int * | GetCircleLimits () |
virtual int * | GetInputSize () |
virtual void | GetInputSize (int data[3]) |
virtual float * | GetInputAspect () |
virtual void | GetInputAspect (float data[3]) |
virtual void | SetInputData (vtkImageData *) |
virtual vtkImageData * | GetInputData () |
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]) |
int | GetEncodedNormalIndex (vtkIdType xyz_index) |
int | GetEncodedNormalIndex (int x_index, int y_index, int z_index) |
virtual void | SetNumberOfThreads (int) |
virtual int | GetNumberOfThreads () |
void | SetDirectionEncoder (vtkDirectionEncoder *direnc) |
virtual vtkDirectionEncoder * | GetDirectionEncoder () |
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 () |
void | SetZeroNormalThreshold (float v) |
virtual float | GetZeroNormalThreshold () |
virtual void | SetZeroPad (int) |
virtual int | GetZeroPad () |
virtual void | ZeroPadOn () |
virtual void | ZeroPadOff () |
Public Member Functions inherited from vtkObject | |
vtkObject * | NewInstance () 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) |
vtkCommand * | GetCommand (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 int | IsTypeOf (const char *type) |
static vtkFiniteDifferenceGradientEstimator * | SafeDownCast (vtkObjectBase *o) |
static vtkFiniteDifferenceGradientEstimator * | New () |
Static Public Member Functions inherited from vtkEncodedGradientEstimator | |
static int | IsTypeOf (const char *type) |
static vtkEncodedGradientEstimator * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkObject | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
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 vtkObjectBase * | New () |
Public Attributes | |
int | SampleSpacingInVoxels |
Public Attributes inherited from vtkEncodedGradientEstimator | |
vtkImageData * | InputData |
unsigned short * | EncodedNormals |
int | EncodedNormalsSize [3] |
unsigned char * | GradientMagnitudes |
vtkTimeStamp | BuildTime |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkFiniteDifferenceGradientEstimator () | |
~vtkFiniteDifferenceGradientEstimator () | |
Protected Member Functions inherited from vtkEncodedGradientEstimator | |
vtkEncodedGradientEstimator () | |
~vtkEncodedGradientEstimator () | |
virtual void | ReportReferences (vtkGarbageCollector *) |
void | ComputeCircleLimits (int size) |
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 &) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
void | UpdateNormals (void) |
Additional Inherited Members | |
Protected Attributes inherited from vtkEncodedGradientEstimator | |
int | NumberOfThreads |
vtkMultiThreader * | Threader |
vtkDirectionEncoder * | DirectionEncoder |
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 |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Use finite differences to estimate gradient.
vtkFiniteDifferenceGradientEstimator is a concrete subclass of vtkEncodedGradientEstimator that uses a central differences technique to estimate the gradient. The gradient at some sample location (x,y,z) would be estimated by:
nx = (f(x-dx,y,z) - f(x+dx,y,z)) / 2*dx; ny = (f(x,y-dy,z) - f(x,y+dy,z)) / 2*dy; nz = (f(x,y,z-dz) - f(x,y,z+dz)) / 2*dz;
This value is normalized to determine a unit direction vector and a magnitude. The normal is computed in voxel space, and dx = dy = dz = SampleSpacingInVoxels. A scaling factor is applied to convert this normal from voxel space to world coordinates.
Definition at line 47 of file vtkFiniteDifferenceGradientEstimator.h.
Definition at line 50 of file vtkFiniteDifferenceGradientEstimator.h.
|
protected |
|
protected |
|
static |
|
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 vtkEncodedGradientEstimator.
|
static |
|
protectedvirtual |
Reimplemented from vtkEncodedGradientEstimator.
vtkFiniteDifferenceGradientEstimator* vtkFiniteDifferenceGradientEstimator::NewInstance | ( | ) | const |
|
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 vtkEncodedGradientEstimator.
|
static |
Construct a vtkFiniteDifferenceGradientEstimator with a SampleSpacingInVoxels of 1.
|
virtual |
Set/Get the spacing between samples for the finite differences method used to compute the normal. This spacing is in voxel units.
|
virtual |
Set/Get the spacing between samples for the finite differences method used to compute the normal. This spacing is in voxel units.
|
protectedvirtual |
Recompute the encoded normals and gradient magnitudes.
Implements vtkEncodedGradientEstimator.
int vtkFiniteDifferenceGradientEstimator::SampleSpacingInVoxels |
Definition at line 61 of file vtkFiniteDifferenceGradientEstimator.h.