|
VMTK
|
Implements vtkImplicitFunction to evaluate the minimum sphere function for an envelope created by an interpolation of sphere radii along a centerline. More...
#include <vtkvmtkPolyBallLine.h>
Public Types | |
| typedef vtkImplicitFunction | Superclass |
Public Member Functions | |
| virtual int | IsA (const char *type) |
| vtkvmtkPolyBallLine * | NewInstance () const |
| void | PrintSelf (std::ostream &os, vtkIndent indent) override |
| double | EvaluateFunction (double x[3]) override |
| double | EvaluateFunction (double x, double y, double z) override |
| void | EvaluateGradient (double x[3], double n[3]) override |
| virtual vtkIdType | GetLastPolyBallCellId () |
| virtual vtkIdType | GetLastPolyBallCellSubId () |
| virtual double | GetLastPolyBallCellPCoord () |
| virtual double * | GetLastPolyBallCenter () |
| virtual void | GetLastPolyBallCenter (double data[3]) |
| virtual double | GetLastPolyBallCenterRadius () |
| virtual void | SetInput (vtkPolyData *) |
| virtual vtkPolyData * | GetInput () |
| virtual void | SetInputCellIds (vtkIdList *) |
| virtual vtkIdList * | GetInputCellIds () |
| virtual void | SetInputCellId (vtkIdType) |
| virtual vtkIdType | GetInputCellId () |
| virtual void | SetPolyBallRadiusArrayName (const char *) |
| virtual char * | GetPolyBallRadiusArrayName () |
| virtual void | SetUseRadiusInformation (int) |
| virtual int | GetUseRadiusInformation () |
| virtual void | UseRadiusInformationOn () |
| virtual void | UseRadiusInformationOff () |
Static Public Member Functions | |
| static vtkvmtkPolyBallLine * | New () |
| static int | IsTypeOf (const char *type) |
| static vtkvmtkPolyBallLine * | SafeDownCast (vtkObjectBase *o) |
| static double | ComplexDot (double x[4], double y[4]) |
Protected Member Functions | |
| virtual vtkObjectBase * | NewInstanceInternal () const |
| vtkvmtkPolyBallLine () | |
| ~vtkvmtkPolyBallLine () | |
Protected Attributes | |
| vtkPolyData * | Input |
| vtkIdList * | InputCellIds |
| vtkIdType | InputCellId |
| char * | PolyBallRadiusArrayName |
| vtkIdType | LastPolyBallCellId |
| vtkIdType | LastPolyBallCellSubId |
| double | LastPolyBallCellPCoord |
| double | LastPolyBallCenter [3] |
| double | LastPolyBallCenterRadius |
| int | UseRadiusInformation |
Implements vtkImplicitFunction to evaluate the minimum sphere function for an envelope created by an interpolation of sphere radii along a centerline.
See detailed description of implicit function in the documentation for vtkvmtkPolyBall class.
Similar to vtkvmtkPolyBall, the core function of this class is to evaluate the minimum sphere function from on input centerline with associated sphere radii and a query point location. Unlike vtkvmtkPolyBall, this class constructs a continuous tubular envelope whose shape is defined by the linear interpolation of the circular boundary profiles (with radius equal to the associated sphere radii) between every consecutive point on the line. As the boundary profiles are constructed from the centerline sphere radii, the tubular envelope generated is guaranteed to lie completely within the surface volume. When evaluated, this is essentially equivalent to evaluating a polyball function for an infinitely large collection of spheres along an input dataset.
This is the implicit function underlying vtkvmtkPolyBallModeller (used by the vmtkcenterlinemodeller pype script to rasterize a "tube function" image from centerlines with maximum inscribed sphere radii), and it is also used directly wherever vmtk needs to test whether a point lies inside the tubular structure swept by a set of centerlines (e.g. flow extension generation, centerline-based surface clipping). The Input poly data is expected to be a vtkPolyData composed of line/polyline cells whose points carry a point data array (see PolyBallRadiusArrayName) with the sphere radius at each point, such as the MaximumInscribedSphereRadius array produced by vmtkcenterlines / vtkvmtkPolyDataCenterlines.
Definition at line 55 of file vtkvmtkPolyBallLine.h.
| typedef vtkImplicitFunction vtkvmtkPolyBallLine::Superclass |
Definition at line 60 of file vtkvmtkPolyBallLine.h.
|
protected |
Definition at line 31 of file vtkvmtkPolyBallLine.cxx.
|
protected |
Definition at line 45 of file vtkvmtkPolyBallLine.cxx.
|
static |
|
static |
|
virtual |
|
static |
|
protectedvirtual |
| vtkvmtkPolyBallLine * vtkvmtkPolyBallLine::NewInstance | ( | ) | const |
|
override |
Definition at line 247 of file vtkvmtkPolyBallLine.cxx.
|
override |
Evaluate the polyball-line function at point x: the squared distance from x to the closest point on the tubular envelope's medial axis, minus the squared interpolated radius at that closest point. Negative values are inside the envelope, positive values are outside, zero is on the surface. As a side effect, the identity of the closest centerline segment and interpolated sphere are cached and can be retrieved with GetLastPolyBallCellId, GetLastPolyBallCellSubId, GetLastPolyBallCellPCoord, GetLastPolyBallCenter and GetLastPolyBallCenterRadius.
Definition at line 71 of file vtkvmtkPolyBallLine.cxx.
|
inlineoverride |
Definition at line 71 of file vtkvmtkPolyBallLine.h.
|
override |
Evaluate the gradient of the polyball-line function at point x. Not implemented: calling this currently only emits a warning and leaves n unchanged.
Definition at line 241 of file vtkvmtkPolyBallLine.cxx.
|
virtual |
Set/get the input poly data whose line/polyline cells define the centerline(s) used to build the tubular envelope. Each point of Input should carry a sphere radius value in the array named PolyBallRadiusArrayName when UseRadiusInformation is on.
|
virtual |
Set/get the input poly data whose line/polyline cells define the centerline(s) used to build the tubular envelope. Each point of Input should carry a sphere radius value in the array named PolyBallRadiusArrayName when UseRadiusInformation is on.
|
virtual |
Set/get the subset of Input cell ids over which the function is evaluated. When set, only these cells contribute to the minimum sphere function; this is useful to restrict evaluation to a single branch or a group of centerlines. If both InputCellIds and InputCellId are unset (default), all line cells in Input are used.
|
virtual |
Set/get the subset of Input cell ids over which the function is evaluated. When set, only these cells contribute to the minimum sphere function; this is useful to restrict evaluation to a single branch or a group of centerlines. If both InputCellIds and InputCellId are unset (default), all line cells in Input are used.
|
virtual |
Set/get a single Input cell id over which the function is evaluated. Ignored if InputCellIds is set. Default is -1, meaning no single-cell restriction (all cells, or those in InputCellIds, are used).
|
virtual |
Set/get a single Input cell id over which the function is evaluated. Ignored if InputCellIds is set. Default is -1, meaning no single-cell restriction (all cells, or those in InputCellIds, are used).
|
virtual |
Set/get the name of the point data array of Input holding the sphere radius at each centerline point (e.g. the MaximumInscribedSphereRadius array produced by centerline extraction). Required whenever UseRadiusInformation is on. Commonly named "MaximumInscribedSphereRadius".
|
virtual |
Set/get the name of the point data array of Input holding the sphere radius at each centerline point (e.g. the MaximumInscribedSphereRadius array produced by centerline extraction). Required whenever UseRadiusInformation is on. Commonly named "MaximumInscribedSphereRadius".
|
virtual |
Get the id, within Input, of the cell containing the closest sphere/segment found by the most recent EvaluateFunction call.
|
virtual |
Get the sub-id (index of the line segment within its cell, i.e. the segment between points i and i+1) of the closest segment found by the most recent EvaluateFunction call.
|
virtual |
Get the parametric coordinate (in [0,1], measured from the start of the closest segment) of the closest sphere center found by the most recent EvaluateFunction call.
|
virtual |
Get the (x,y,z) coordinates of the closest interpolated sphere center found by the most recent EvaluateFunction call.
|
virtual |
|
virtual |
Get the radius of the closest interpolated sphere found by the most recent EvaluateFunction call.
|
virtual |
Toggle use of the per-point sphere radii stored in PolyBallRadiusArrayName when evaluating the function. When off, radii are treated as zero everywhere, so the function reduces to the squared distance to the polyline (its zero level set degenerates to the centerline itself rather than a tubular envelope). Default: on.
|
virtual |
Toggle use of the per-point sphere radii stored in PolyBallRadiusArrayName when evaluating the function. When off, radii are treated as zero everywhere, so the function reduces to the squared distance to the polyline (its zero level set degenerates to the centerline itself rather than a tubular envelope). Default: on.
|
virtual |
Toggle use of the per-point sphere radii stored in PolyBallRadiusArrayName when evaluating the function. When off, radii are treated as zero everywhere, so the function reduces to the squared distance to the polyline (its zero level set degenerates to the centerline itself rather than a tubular envelope). Default: on.
|
virtual |
Toggle use of the per-point sphere radii stored in PolyBallRadiusArrayName when evaluating the function. When off, radii are treated as zero everywhere, so the function reduces to the squared distance to the polyline (its zero level set degenerates to the centerline itself rather than a tubular envelope). Default: on.
|
static |
Dot product in Minkowski (3+1)-D space: the sum of the products of the first three (spatial) components minus the product of the fourth (radius) components, i.e. x[0]*y[0] + x[1]*y[1] + x[2]*y[2] - x[3]*y[3]. Used internally to project the query point onto the cone swept by the linearly interpolated sphere radii along each centerline segment; exposed as a static utility for reuse.
Definition at line 66 of file vtkvmtkPolyBallLine.cxx.
|
protected |
Definition at line 154 of file vtkvmtkPolyBallLine.h.
|
protected |
Definition at line 155 of file vtkvmtkPolyBallLine.h.
|
protected |
Definition at line 156 of file vtkvmtkPolyBallLine.h.
|
protected |
Definition at line 158 of file vtkvmtkPolyBallLine.h.
|
protected |
Definition at line 159 of file vtkvmtkPolyBallLine.h.
|
protected |
Definition at line 160 of file vtkvmtkPolyBallLine.h.
|
protected |
Definition at line 161 of file vtkvmtkPolyBallLine.h.
|
protected |
Definition at line 162 of file vtkvmtkPolyBallLine.h.
|
protected |
Definition at line 163 of file vtkvmtkPolyBallLine.h.
|
protected |
Definition at line 165 of file vtkvmtkPolyBallLine.h.