#include <vtkPointData.h>
#include <vtkUnstructuredGrid.h>
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
-#else
-static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
-#endif
-
vtkCxxRevisionMacro(VTKViewer_ShrinkFilter, "$Revision$");
vtkStandardNewMacro(VTKViewer_ShrinkFilter);
-
+/*!Constructor. Sets store mapping to zero.*/
VTKViewer_ShrinkFilter::VTKViewer_ShrinkFilter():
myStoreMapping(0)
{}
-
+/*!Destructor.*/
VTKViewer_ShrinkFilter::~VTKViewer_ShrinkFilter()
{}
+/*!Execute method. Calculate output.*/
void VTKViewer_ShrinkFilter::Execute()
{
vtkPoints *newPts;
int i, j, numIds, abort=0;
vtkIdType cellId, numCells, numPts;
vtkIdType oldId, newId;
- float center[3], *p, pt[3];
+ vtkFloatingPointType center[3], *p, pt[3];
vtkPointData *pd, *outPD;;
vtkIdList *ptIds, *newPtIds;
vtkDataSet *input= this->GetInput();
vtkUnstructuredGrid *output = this->GetOutput();
vtkIdType tenth;
- float decimal;
+ vtkFloatingPointType decimal;
vtkDebugMacro(<<"Shrinking cells");
newPts->Delete();
}
-
+/*!Sets store mapping.*/
void VTKViewer_ShrinkFilter::SetStoreMapping(int theStoreMapping){
myStoreMapping = theStoreMapping;
this->Modified();
}
+/*!Return node object id by vtk node id.
+ *\retval -1 - if no object, else return id.
+ */
vtkIdType VTKViewer_ShrinkFilter::GetNodeObjId(int theVtkID){
if(myVTK2ObjIds.empty() || theVtkID > myVTK2ObjIds.size()) return -1;
return myVTK2ObjIds.at(theVtkID);