]> Creatis software - creaCLI.git/blob - bbtk_Slicer_PKG/src/bbSlicerModelMaker.h
All Slicer modules succesfully compiled into BBTK boxes :P
[creaCLI.git] / bbtk_Slicer_PKG / src / bbSlicerModelMaker.h
1 #ifndef __bbSlicerModelMaker_h_INCLUDED__
2 #define __bbSlicerModelMaker_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 ModelMaker
25     :
26     public bbtk::AtomicBlackBox {
27         BBTK_BLACK_BOX_INTERFACE ( ModelMaker , bbtk::AtomicBlackBox ) ;
28
29         // GENERATED ARGS        
30         
31 BBTK_DECLARE_INPUT ( InputVolume , std::string );
32 BBTK_DECLARE_INPUT ( ColorTable , std::string );
33 BBTK_DECLARE_INPUT ( ModelSceneFile , std::string );
34 BBTK_DECLARE_INPUT ( Name , std::string );
35 BBTK_DECLARE_INPUT ( GenerateAll , bool );
36 BBTK_DECLARE_INPUT ( Labels , std::vector<int> );
37 BBTK_DECLARE_INPUT ( StartLabel , int );
38 BBTK_DECLARE_INPUT ( EndLabel , int );
39 BBTK_DECLARE_INPUT ( SkipUnNamed , bool );
40 BBTK_DECLARE_INPUT ( JointSmoothing , bool );
41 BBTK_DECLARE_INPUT ( Smooth , int );
42 BBTK_DECLARE_INPUT ( FilterType , std::string );
43 BBTK_DECLARE_INPUT ( Decimate , float );
44 BBTK_DECLARE_INPUT ( SplitNormals , bool );
45 BBTK_DECLARE_INPUT ( PointNormals , bool );
46 BBTK_DECLARE_INPUT ( Pad , bool );
47 BBTK_DECLARE_INPUT ( SaveIntermediateModels , bool );
48 BBTK_DECLARE_INPUT ( debug , bool );
49
50         // EO GENERATED ARGS
51
52         BBTK_PROCESS ( Process ) ;
53         void Process ( ) ;
54     private:
55         void execute ( std::string lib , int _argc , char * _argv[] ) ;
56     } ;
57
58     BBTK_BEGIN_DESCRIBE_BLACK_BOX ( ModelMaker , bbtk::AtomicBlackBox ) ;
59     BBTK_NAME ( "ModelMaker" ) ;
60     BBTK_AUTHOR ( "Nicole Aucoin, BWH Ron Kikinis, BWH, Bill Lorensen GE" ) ;
61     BBTK_DESCRIPTION ( "Create 3D surface models from segmented data. pModels are imported into Slicer under a model hierarchy node in a MRML scene. The model colors are set by the color table associated with the input volume these colours will only be visible if you load the model scene file. /ppbCreate Multiple:/b/pp If you specify a list of Labels, it will over ride any start/end label settings. /pp If you click iGenerate All/i it will over ride the list of lables and any start/end label settings. /ppbModel Maker Settings:/b/pp You can set the number of smoothing iterations, target reduction in number of polygons decimal percentage. Use 0 and 1 if you wish no smoothing nor decimation. brYou can set the flags to split normals or generate point normals in this pane as well. brYou can save a copy of the models after intermediate steps marching cubes, smoothing, and decimation if not joint smoothing, otherwise just after decimation; these models are not saved in the mrml file, turn off deleting temporary files first in the python window: brislicer.modules.modelmaker.cliModuleLogic.DeleteTemporaryFilesOff/i/p" ) ;
62     BBTK_CATEGORY ( "Surface Models" ) ;
63
64     // GENERATED DESCRPTION
65     
66 BBTK_INPUT(ModelMaker , InputVolume , "InputVolume" , std::string, "");
67 BBTK_INPUT(ModelMaker , ColorTable , "ColorTable" , std::string, "");
68 BBTK_INPUT(ModelMaker , ModelSceneFile , "ModelSceneFile" , std::string, "");
69 BBTK_INPUT(ModelMaker , Name , "Name" , std::string, "");
70 BBTK_INPUT(ModelMaker , GenerateAll , "GenerateAll" , bool, "");
71 BBTK_INPUT(ModelMaker , Labels , "Labels" , std::vector<int>, "");
72 BBTK_INPUT(ModelMaker , StartLabel , "StartLabel" , int, "");
73 BBTK_INPUT(ModelMaker , EndLabel , "EndLabel" , int, "");
74 BBTK_INPUT(ModelMaker , SkipUnNamed , "SkipUnNamed" , bool, "");
75 BBTK_INPUT(ModelMaker , JointSmoothing , "JointSmoothing" , bool, "");
76 BBTK_INPUT(ModelMaker , Smooth , "Smooth" , int, "");
77 BBTK_INPUT(ModelMaker , FilterType , "FilterType" , std::string, "");
78 BBTK_INPUT(ModelMaker , Decimate , "Decimate" , float, "");
79 BBTK_INPUT(ModelMaker , SplitNormals , "SplitNormals" , bool, "");
80 BBTK_INPUT(ModelMaker , PointNormals , "PointNormals" , bool, "");
81 BBTK_INPUT(ModelMaker , Pad , "Pad" , bool, "");
82 BBTK_INPUT(ModelMaker , SaveIntermediateModels , "SaveIntermediateModels" , bool, "");
83 BBTK_INPUT(ModelMaker , debug , "debug" , bool, "");
84
85     // EO GENERATED DESCRIPTION
86
87     BBTK_END_DESCRIBE_BLACK_BOX ( ModelMaker ) ;
88 }
89
90 #endif // __bbSlicerModelMaker_h_INCLUDED__
91
92