Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
HopSlimeC::HopSlimeC(void)
HopSlimeC::HopSlimeC(SlimeC &)
HopSlimeC::HopSlimeC(const HopSlimeC &)
HopSlimeC::operator=(const HopSlimeC &)
HopSlimeC::~HopSlimeC(void)
HopSlimeC::SetConst(double,double,double)
HopSlimeC::UseStuffToRecomputeDist(ItVertC,PointStuffC &)
HopSlimeC::FindDistLoadStuff(ItVertC,PointStuffC &)
HopSlimeC::DistToPatch(ItVertC,const Vector3dC &)
HopSlimeC::MakeMap(VectorSetC &,char *,int)
HopSlimeC::OldMakeMap(VectorSetC &,char *,double)
HopSlimeC::LoadMap(VectorSetC &,char *)
HopSlimeC::ReprojectOnNeighbours(ItVertC)
HopSlimeC::ReprojectWithinOnePatch(ItVertC)
HopSlimeC::PListOf(const ItVertC &)
HopSlimeC::ShowStats(void)
HopSlimeC::ComputeEnergy(int)
HopSlimeC::ComputeLocalSpringEnergy(DListC &,int)
HopSlimeC::ComputeLocalDataEnergy(DListC &,int)
HopSlimeC::Compute_Spring_Energy(ItVertC)
HopSlimeC::Compute_Data_Energy(ItVertC)
HopSlimeC::RefinePosn(ItVertC)
HopSlimeC::CheckRefine(HSListC &,SArray1dC &,Vector3dC &)
HopSlimeC::OptimizeVectors(int,int)
HopSlimeC::OptimizeMesh(int)
HopSlimeC::UnmarkedFaces(void)
HopSlimeC::IsFaceMarked(VTFaceC &)
HopSlimeC::FirstUnmarkedFace(void)
HopSlimeC::MarkFaceandMovetoEnd(ItTriC &)
HopSlimeC::RemoveDuplicates(DListC &)
HopSlimeC::RemoveDuplicates(DListC &,DListC &)
HopSlimeC::CollapseFace(ItTriC,ItVertC,ItVertC,ItVertC &,TEdgeC &,TEdgeC &)
HopSlimeC::FaceCollapseAllowed(ItTriC,ItVertC &,ItVertC &)
HopSlimeC::ExpandFace(TEdgeC,TEdgeC,ItTriC &,ItVertC &,ItVertC &)
HopSlimeC::FaceExpandAllowed(ItTriC,TEdgeC &,TEdgeC &,ItVertC &)
HopSlimeC::GetNeighbourhood(ItVertC,ItTriC,DListC &)
HopSlimeC::GetVertsAroundNeighbourhood(DListC,DListC &)
HopSlimeC::RestoreNeighbourhood(DListC &)
HopSlimeC::OptimizeOneVertex(ItVertC,int)
HopSlimeC::SetLogFile(ostream *)
HopSlimeC
 
include "amma/HoppeSlime.hh"
User Level:Default
Library:HoppeOpt
Example: regtool.cc
Section:default.Andrew Stoddart
In Scope:std

Comments:
------------------------------------------------------------------------- ********** HopSlimeC ************************************************ ------------------------------------------------------------------------- Note about the Nearest Neighbour strategy. (u,v) will not be exact, but d will be an exact distance |d-r(u,v)| REMEMBER : Slime patches correspond to VERTICES FACES are collapsed -------------------------------------------------------------------------

Variables:
SlimeC sl;

VTRingC vt;
Note that Slime also has a vt member - these should be handles to the same thing

int blocksize;

double cost_spring;
const double cost_data = 1.0;

double cost_rep;

double cost_vert;

ostream * log;

Methods:
HopSlimeC()
Null Constructor

HopSlimeC(SlimeC & sl)
Constructor, takes a handle to vt

HopSlimeC(const HopSlimeC & s)
Copy constructor

HopSlimeC & operator=(const HopSlimeC & s)
Assignment

~HopSlimeC()
Destructor

void SetConst(double ks,double kr,double kv)
Set the constants to new values, must be called!!

void UseStuffToRecomputeDist(ItVertC iv,PointStuffC & p)
Using the local weighting factors in stuff and the current control point positions recompute the distance, dont repeat the NN search

void FindDistLoadStuff(ItVertC iv,PointStuffC & p)
given patch iv and p.v find closest point returning d, uv, uM if iv is not a valid patch DO NOTHING

double DistToPatch(ItVertC iv,const Vector3dC & data)
given patch iv and p.v find closest point returning data if iv is not a valid slime patch return a BIG number

void MakeMap(VectorSetC & points,char * mapfile,int ngrid)
write a file containing the nearest vertex foreach point

void OldMakeMap(VectorSetC & points,char * mapfile,double th = 0)
write a file containing the nearest vertex foreach point

void LoadMap(VectorSetC & points,char * mapfile)
read file containing the nearest vertex foreach point call DistToPatch(ItVertC iv, PointStuffC & p); to set uv & uM void SaveMap(VectorSetC & points, char * mapfile);

void ReprojectOnNeighbours(ItVertC iv)
reproject all the points attached to patch iv onto iv or one of its neighnours that shares an edge all data inside PStuff is updated for each data point considered

void ReprojectWithinOnePatch(ItVertC iv)
reproject all the points attached to patch iv within patch iv all of PStuff is updated for all points

HSListC & PListOf(const ItVertC & iv)
return a reference to the list on patch iv

void ShowStats()
compute and display some statistics

double ComputeEnergy(int t)
compute the overall energy, print if (t)

double ComputeLocalSpringEnergy(DListC<PLBackupC> & nhood,int t)
compute the spring energy in neighbourhood "nhood", print if (t)

double ComputeLocalDataEnergy(DListC<PLBackupC> & nhood,int t)
compute the data energy in neighbourhood "nhood", print if (t)

double Compute_Spring_Energy(ItVertC iv)
compute the spring energy, /2 to avoid double counting

double Compute_Data_Energy(ItVertC iv)
compute the data energy using values in PointStuffC

double RefinePosn(ItVertC iv)
considering uv fixed, for one vertex, this solves a quadratic to minimize the sum of data and spring energies

void CheckRefine(HSListC & plist,SArray1dC<Vector3dC> & control,Vector3dC & vmid)
a check used to debug RefinePosn(ItVertC iv), it computes the data and spring energies

void OptimizeVectors(int nrefine,int niterate)


void OptimizeMesh(int nrefine)


BooleanT UnmarkedFaces()
returns TRUE if there are unmarked faces in "vt", FALSE otherwise

BooleanT IsFaceMarked(VTFaceC & f)
returns TRUE if "f" is marked, FALSE otherwise

ItTriC FirstUnmarkedFace()
returns iterator of first unmarked patch in "vt", if none left then return ...

void MarkFaceandMovetoEnd(ItTriC & it)
marks face "it" and moves it to the end of "vt"

void RemoveDuplicates(DListC<PLBackupC> & list1)

void RemoveDuplicates(DListC<PLBackupC> & list1,DListC<PLBackupC> & list2)
ItTriC UncollapseFaceandMovetoEnd(TEdgeC te1, TEdgeC te2, ItTriC &itnew, ItVertC iv1, ItVertC iv2); Undoes a face collapse by calling vt.ExpandFace with "te1", "te2", "v1" and "v2".

BooleanT CollapseFace(ItTriC face,ItVertC iv1,ItVertC iv2,ItVertC & ivnew,TEdgeC & te1,TEdgeC & te2)
Performs a aface collapse, saving information necessary to undo the collapse.

BooleanT FaceCollapseAllowed(ItTriC it,ItVertC & iv1,ItVertC & iv2)
returns TRUE if and only if "it" can be collapsed on it's shortest diagonal, sets iv1 and iv2 to the vertices that will disappear

BooleanT ExpandFace(TEdgeC te1,TEdgeC te2,ItTriC & itnew,ItVertC & iv1,ItVertC & iv2)
expands a face along the TEdges "te1" and "te2". No checking is performed as it is assumed that "te1" and "te2" were returned by FaceExpandAllowed(). Returns the new face "itnew" and the two new verts "iv1" and "iv2"

BooleanT FaceExpandAllowed(ItTriC it,TEdgeC & te1,TEdgeC & te2,ItVertC & ivold)
determines if face expand can be performed on a vertex of face "it". if so, the TEdges "te1" and "te2" neccessary for FaceExpand() are returned. The vertex that will be removed, "ivold" is also returned.

void GetNeighbourhood(ItVertC iv,ItTriC face,DListC<PLBackupC> & nhood)
makes a copy of the verts forming a neighbouhood of "iv" that don't belong to "face".

void GetVertsAroundNeighbourhood(DListC<PLBackupC> nhood,DListC<PLBackupC> & list)
creates a list of all the vertices around the vertices in "nhood", returning the list in "list".

void RestoreNeighbourhood(DListC<PLBackupC> & nhood)
restores neighbourhood of vertices in "nhood".

void OptimizeOneVertex(ItVertC iv,int refine)

void SetLogFile(ostream * log)
temporary hack. if this is not null, expand and collapse operations will be logged to this file.


Programmer:Andrew Stoddart, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001