/
ModuleEntry.h
74 lines (59 loc) · 2.51 KB
/
ModuleEntry.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// this file defines a function that communicates
// with the application using the module.
// input function requires a vtkPolyData and
// possible also vtkPoints as initializers.
// It then returns a vtkPolyData.
// the application is responsible for reading or creating
// data files to send as vtkPolyData,
// accepting user input for initial points,
// and handling the output polyData (either to display or
// write to file).
#ifndef __module_entry_h
#define __module_entry_h
#include "vtkComputeLocalGeometry.h"
#include "vtkInitClosedPath.h"
#include "vtkLevelSetMeshEvolver.h"
#include "vtkPolyData.h"
#include "vtkPoints.h"
#include "vtkSmartPointer.h"
#include "vtkFloatArray.h"
#include "vtkTriangleFilter.h"
#include <vector>
#if defined(WIN32) && !defined(MeshContourSegmentationLib_STATIC)
#if defined(MeshContourSegmentationLib_EXPORTS)
#define MESHCONTOURSEGMENTATIONLIB_EXPORT __declspec( dllexport )
#else
#define MESHCONTOURSEGMENTATIONLIB_EXPORT __declspec( dllimport )
#endif
#else
#define MESHCONTOURSEGMENTATIONLIB_EXPORT
#endif
namespace MeshContourEvolver
{
struct InitParam
{
int evolve_its;
int mesh_smooth_its;
int H_smooth_its;
int adj_levels;
int rightHandMesh;
};
// Input: mesh and indices of vertices for initialization
// vtkPolyData* entry_main( vtkPolyData* inputMesh, vtkIntArray* initVertIdx, bool bForceRecompute = false);
void MESHCONTOURSEGMENTATIONLIB_EXPORT entry_main( vtkPolyData* inputMesh, vtkIntArray* initVertIdx,
vtkPolyData *outputMesh, InitParam init,
bool bForceRecompute = false );
// Input: mesh and 3D points for initialization. This is what you get
// when inputting 'fiducials' in Slicer GUI. The 3D points
// are not on the mesh, you need to first find closest points on the mesh.
void MESHCONTOURSEGMENTATIONLIB_EXPORT entry_main( vtkPolyData* inputMesh,
std::vector<std::vector<float> >& initPoints3D,
vtkPolyData* outputMesh, InitParam init,
bool bForceRecompute = false);
// Input: mesh only. No initialization of points; either continue
// evolution of existing curve or only pre-compute geometry!
void MESHCONTOURSEGMENTATIONLIB_EXPORT entry_main( vtkPolyData* inputMesh,
vtkPolyData* outputMesh,
InitParam init);
}
#endif