]> Creatis software - creaCLI.git/blob - bbtk_Slicer_PKG/src/bbSlicerMeshContourSegmentation.h
All Slicer modules succesfully compiled into BBTK boxes :P
[creaCLI.git] / bbtk_Slicer_PKG / src / bbSlicerMeshContourSegmentation.h
1 #ifndef __bbSlicerMeshContourSegmentation_h_INCLUDED__
2 #define __bbSlicerMeshContourSegmentation_h_INCLUDED__
3
4 #include "bbSlicer_EXPORT.h"
5 #include "bbtkAtomicBlackBox.h"
6
7 #include <vector>
8 #include <cstdlib>
9 #include <dlfcn.h>
10 #include <sstream>
11 #include <fstream>
12 #include <iostream>
13
14 #include <ModuleDescriptionUtilities.h>
15 #include <ModuleDescriptionParser.h>
16 #include <ModuleParameterGroup.h>
17 #include <ModuleDescription.h>
18 #include <ModuleParameter.h>
19
20 #include "CreationTool.h"
21
22 namespace bbSlicer {
23
24     class bbSlicer_EXPORT MeshContourSegmentation
25     :
26     public bbtk::AtomicBlackBox {
27         BBTK_BLACK_BOX_INTERFACE ( MeshContourSegmentation , bbtk::AtomicBlackBox ) ;
28
29         // GENERATED ARGS        
30         
31 BBTK_DECLARE_INPUT ( InputSurface , std::string );
32 BBTK_DECLARE_INPUT ( ContourSeedPts , std::vector<std::vector<float> > );
33 BBTK_DECLARE_INPUT ( OutputModel , std::string );
34 BBTK_DECLARE_INPUT ( evolve_its , int );
35 BBTK_DECLARE_INPUT ( mesh_smooth_its , int );
36 BBTK_DECLARE_INPUT ( H_smooth_its , int );
37 BBTK_DECLARE_INPUT ( adj_levels , int );
38 BBTK_DECLARE_INPUT ( showLS , bool );
39 BBTK_DECLARE_INPUT ( rightHandMesh , bool );
40 BBTK_DECLARE_INPUT ( is_test , int );
41
42         // EO GENERATED ARGS
43
44         BBTK_PROCESS ( Process ) ;
45         void Process ( ) ;
46     private:
47         void execute ( std::string lib , int _argc , char * _argv[] ) ;
48     } ;
49
50     BBTK_BEGIN_DESCRIBE_BLACK_BOX ( MeshContourSegmentation , bbtk::AtomicBlackBox ) ;
51     BBTK_NAME ( "MeshContourSegmentation" ) ;
52     BBTK_AUTHOR ( "Peter Karasev, pkarasev@gatech.edu, Allen Tannenbaum, tannenba@ece.gatech.edu" ) ;
53     BBTK_DESCRIPTION ( "Sparse-Field Levelset Mesh Segmentation. Given some initial points in polydata will construct a contour and evolve it to high mean-curvature areas, returning the interior region indices.Once the output surface has been loaded into Slicer, go to the Models module, Model Display pane, and set the Scalar Visibility Flag, select the LevelSetValue as the active scalar array, and pick the FreeSurfer RedGreen Scalar Color Map. The InitialCurvature and SmoothedCurvature may appear if the path finding failed.  An example calling convention from the commandline for this module:--inputScene C:/.../bin/Release/LSVTKOut1.vtk' -c '1.5,1.5,0' -c '-1.5,1.5,0' -c '-1.5,-1.5,0' -c '1.5,-1.5,0' --outputFilename 'tempOut.vtk'This gives it an initial geometry in the vtk file, four seed points in x,y,z coordinates, and where to write the output.The resulting output contains a colormap that defines interior/exterior of the surface as determined by evolving the curve into high mean curvature areas." ) ;
54     BBTK_CATEGORY ( "Segmentation.Specialized" ) ;
55
56     // GENERATED DESCRPTION
57     
58 BBTK_INPUT(MeshContourSegmentation , InputSurface , "InputSurface" , std::string, "");
59 BBTK_INPUT(MeshContourSegmentation , ContourSeedPts , "ContourSeedPts" , std::vector<std::vector<float> >, "");
60 BBTK_INPUT(MeshContourSegmentation , OutputModel , "OutputModel" , std::string, "");
61 BBTK_INPUT(MeshContourSegmentation , evolve_its , "evolve_its" , int, "");
62 BBTK_INPUT(MeshContourSegmentation , mesh_smooth_its , "mesh_smooth_its" , int, "");
63 BBTK_INPUT(MeshContourSegmentation , H_smooth_its , "H_smooth_its" , int, "");
64 BBTK_INPUT(MeshContourSegmentation , adj_levels , "adj_levels" , int, "");
65 BBTK_INPUT(MeshContourSegmentation , showLS , "showLS" , bool, "");
66 BBTK_INPUT(MeshContourSegmentation , rightHandMesh , "rightHandMesh" , bool, "");
67 BBTK_INPUT(MeshContourSegmentation , is_test , "is_test" , int, "");
68
69     // EO GENERATED DESCRIPTION
70
71     BBTK_END_DESCRIBE_BLACK_BOX ( MeshContourSegmentation ) ;
72 }
73
74 #endif // __bbSlicerMeshContourSegmentation_h_INCLUDED__
75
76