]> Creatis software - creaCLI.git/blob - bbtk_Slicer_PKG/src/bbSlicerGrayscaleFillHole.h
All Slicer modules succesfully compiled into BBTK boxes :P
[creaCLI.git] / bbtk_Slicer_PKG / src / bbSlicerGrayscaleFillHole.h
1 #ifndef __bbSlicerGrayscaleFillHole_h_INCLUDED__
2 #define __bbSlicerGrayscaleFillHole_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 GrayscaleFillHole
25     :
26     public bbtk::AtomicBlackBox {
27         BBTK_BLACK_BOX_INTERFACE ( GrayscaleFillHole , bbtk::AtomicBlackBox ) ;
28
29         // GENERATED ARGS        
30         
31 BBTK_DECLARE_INPUT ( inputVolume , std::string );
32 BBTK_DECLARE_INPUT ( outputVolume , std::string );
33
34         // EO GENERATED ARGS
35
36         BBTK_PROCESS ( Process ) ;
37         void Process ( ) ;
38     private:
39         void execute ( std::string lib , int _argc , char * _argv[] ) ;
40     } ;
41
42     BBTK_BEGIN_DESCRIBE_BLACK_BOX ( GrayscaleFillHole , bbtk::AtomicBlackBox ) ;
43     BBTK_NAME ( "GrayscaleFillHole" ) ;
44     BBTK_AUTHOR ( "Bill Lorensen" ) ;
45     BBTK_DESCRIPTION ( "GrayscaleFillholeImageFilter fills holes in a grayscale image.  Holes are local minima in the grayscale topography that are not connected to boundaries of the image. Gray level values adjacent to a hole are extrapolated across the hole.This filter is used to smooth over local minima without affecting the values of local maxima.  If you take the difference between the output of this filter and the original image and perhaps threshold the difference above a small value, you'll obtain a map of the local minima.This filter uses the itkGrayscaleGeodesicErodeImageFilter.  It provides its own input as the 'mask' input to the geodesic erosion.  The 'marker' image for the geodesic erosion is constructed such that boundary pixels match the boundary pixels of the input image and the interior pixels are set to the maximum pixel value in the input image. Geodesic morphology and the Fillhole algorithm is described in Chapter 6 of Pierre Soille's book 'Morphological Image Analysis: Principles and Applications', Second Edition, Springer, 2003.  A companion filter, Grayscale Grind Peak, removes peaks in grayscale images." ) ;
46     BBTK_CATEGORY ( "Filtering.Morphology" ) ;
47
48     // GENERATED DESCRPTION
49     
50 BBTK_INPUT(GrayscaleFillHole , inputVolume , "inputVolume" , std::string, "");
51 BBTK_INPUT(GrayscaleFillHole , outputVolume , "outputVolume" , std::string, "");
52
53     // EO GENERATED DESCRIPTION
54
55     BBTK_END_DESCRIBE_BLACK_BOX ( GrayscaleFillHole ) ;
56 }
57
58 #endif // __bbSlicerGrayscaleFillHole_h_INCLUDED__
59
60