Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions

MarchingCubesSurfaceEditor Class Reference

Inheritance diagram for MarchingCubesSurfaceEditor:
ParallelTask Task NamedObject CallBacker

List of all members.

Public Member Functions

 MarchingCubesSurfaceEditor (MarchingCubesSurface &)
virtual ~MarchingCubesSurfaceEditor ()
bool setKernel (const Array3D< unsigned char > &, int xpos, int ypos, int zpos)
 Kernel becomes mine.
bool setFactor (int)
int getFactor () const
const Coord3getCenterNormal () const
virtual bool affectedVolume (Interval< int > &xrg, Interval< int > &yrg, Interval< int > &zrg) const

Public Attributes

Notifier
< MarchingCubesSurfaceEditor
shapeChange

Protected Member Functions

void reportShapeChange (bool kernelchange)

Protected Attributes

MarchingCubesSurfacesurface_
int factor_
int prevfactor_
Array3D< unsigned char > * kernel_
Array3D< int > * changedsurface_
Array3D< int > * originalsurface_
float threshold_
Coord3 centernormal_
int xorigin_
int yorigin_
int zorigin_

Private Member Functions

od_int64 nrIterations () const
bool doPrepare (int)
bool doWork (od_int64, od_int64, int)
bool doFinish (bool)

Detailed Description

Editor for MarchingCubesSurfaces. It operates by converting a part of the MarchingCubesSurface to an implicit represetation (a scalar field and a threshold), modifies that scalar field and re-generates the MarchingCubesSurfaces.

The modification of the implicit representation is guided by:

NewImplicitShape = OriginalShape + Kernel * factor

The Kernel is a scalar field (values between 0 and 255) represents the shape of the movement, and the factor is set by from the outside.


Constructor & Destructor Documentation

MarchingCubesSurfaceEditor::MarchingCubesSurfaceEditor ( MarchingCubesSurface  ) 
virtual MarchingCubesSurfaceEditor::~MarchingCubesSurfaceEditor (  )  [virtual]

Member Function Documentation

virtual bool MarchingCubesSurfaceEditor::affectedVolume ( Interval< int > &  xrg,
Interval< int > &  yrg,
Interval< int > &  zrg 
) const [virtual]
bool MarchingCubesSurfaceEditor::doFinish ( bool   )  [private, virtual]

Reimplemented from ParallelTask.

bool MarchingCubesSurfaceEditor::doPrepare ( int   )  [private, virtual]

Reimplemented from ParallelTask.

bool MarchingCubesSurfaceEditor::doWork ( od_int64  ,
od_int64  ,
int   
) [private]
const Coord3& MarchingCubesSurfaceEditor::getCenterNormal (  )  const
int MarchingCubesSurfaceEditor::getFactor (  )  const [inline]
od_int64 MarchingCubesSurfaceEditor::nrIterations (  )  const [private, virtual]

Implements ParallelTask.

void MarchingCubesSurfaceEditor::reportShapeChange ( bool  kernelchange  )  [protected]

Should be called by inheriting class if it has changed kernel size or kernel position.

bool MarchingCubesSurfaceEditor::setFactor ( int   ) 

a value of 255 is one voxel if the kernel is 255

bool MarchingCubesSurfaceEditor::setKernel ( const Array3D< unsigned char > &  ,
int  xpos,
int  ypos,
int  zpos 
)

Kernel becomes mine.


Member Data Documentation

Array3D<unsigned char>* MarchingCubesSurfaceEditor::kernel_ [protected]