#ifndef __bbSlicerMeshContourSegmentation_h_INCLUDED__ #define __bbSlicerMeshContourSegmentation_h_INCLUDED__ #include "bbSlicer_EXPORT.h" #include "bbtkAtomicBlackBox.h" #include #include #include #include #include #include #include #include #include #include #include #include "CreationTool.h" namespace bbSlicer { class bbSlicer_EXPORT MeshContourSegmentation : public bbtk::AtomicBlackBox { BBTK_BLACK_BOX_INTERFACE ( MeshContourSegmentation , bbtk::AtomicBlackBox ) ; // GENERATED ARGS BBTK_DECLARE_INPUT ( InputSurface , std::string ); BBTK_DECLARE_INPUT ( ContourSeedPts , std::vector > ); BBTK_DECLARE_INPUT ( OutputModel , std::string ); BBTK_DECLARE_INPUT ( evolve_its , int ); BBTK_DECLARE_INPUT ( mesh_smooth_its , int ); BBTK_DECLARE_INPUT ( H_smooth_its , int ); BBTK_DECLARE_INPUT ( adj_levels , int ); BBTK_DECLARE_INPUT ( showLS , bool ); BBTK_DECLARE_INPUT ( rightHandMesh , bool ); BBTK_DECLARE_INPUT ( is_test , int ); // EO GENERATED ARGS BBTK_PROCESS ( Process ) ; void Process ( ) ; private: void execute ( std::string lib , int _argc , char * _argv[] ) ; } ; BBTK_BEGIN_DESCRIBE_BLACK_BOX ( MeshContourSegmentation , bbtk::AtomicBlackBox ) ; BBTK_NAME ( "MeshContourSegmentation" ) ; BBTK_AUTHOR ( "Peter Karasev, pkarasev@gatech.edu, Allen Tannenbaum, tannenba@ece.gatech.edu" ) ; 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." ) ; BBTK_CATEGORY ( "Segmentation.Specialized" ) ; // GENERATED DESCRPTION BBTK_INPUT(MeshContourSegmentation , InputSurface , "InputSurface" , std::string, ""); BBTK_INPUT(MeshContourSegmentation , ContourSeedPts , "ContourSeedPts" , std::vector >, ""); BBTK_INPUT(MeshContourSegmentation , OutputModel , "OutputModel" , std::string, ""); BBTK_INPUT(MeshContourSegmentation , evolve_its , "evolve_its" , int, ""); BBTK_INPUT(MeshContourSegmentation , mesh_smooth_its , "mesh_smooth_its" , int, ""); BBTK_INPUT(MeshContourSegmentation , H_smooth_its , "H_smooth_its" , int, ""); BBTK_INPUT(MeshContourSegmentation , adj_levels , "adj_levels" , int, ""); BBTK_INPUT(MeshContourSegmentation , showLS , "showLS" , bool, ""); BBTK_INPUT(MeshContourSegmentation , rightHandMesh , "rightHandMesh" , bool, ""); BBTK_INPUT(MeshContourSegmentation , is_test , "is_test" , int, ""); // EO GENERATED DESCRIPTION BBTK_END_DESCRIBE_BLACK_BOX ( MeshContourSegmentation ) ; } #endif // __bbSlicerMeshContourSegmentation_h_INCLUDED__