1 #ifndef __bbSlicerHistogramMatching_h_INCLUDED__
2 #define __bbSlicerHistogramMatching_h_INCLUDED__
4 #include "bbSlicer_EXPORT.h"
5 #include "bbtkAtomicBlackBox.h"
14 #include <ModuleDescriptionUtilities.h>
15 #include <ModuleDescriptionParser.h>
16 #include <ModuleParameterGroup.h>
17 #include <ModuleDescription.h>
18 #include <ModuleParameter.h>
20 #include "CreationTool.h"
24 class bbSlicer_EXPORT HistogramMatching
26 public bbtk::AtomicBlackBox {
27 BBTK_BLACK_BOX_INTERFACE ( HistogramMatching , bbtk::AtomicBlackBox ) ;
31 BBTK_DECLARE_INPUT ( numberOfHistogramLevels , int );
32 BBTK_DECLARE_INPUT ( numberOfMatchPoints , int );
33 BBTK_DECLARE_INPUT ( thresholdAtMeanIntensity , bool );
34 BBTK_DECLARE_INPUT ( inputVolume , std::string );
35 BBTK_DECLARE_INPUT ( referenceVolume , std::string );
36 BBTK_DECLARE_INPUT ( outputVolume , std::string );
40 BBTK_PROCESS ( Process ) ;
43 void execute ( std::string lib , int _argc , char * _argv[] ) ;
46 BBTK_BEGIN_DESCRIBE_BLACK_BOX ( HistogramMatching , bbtk::AtomicBlackBox ) ;
47 BBTK_NAME ( "HistogramMatching" ) ;
48 BBTK_AUTHOR ( "Bill Lorensen" ) ;
49 BBTK_DESCRIPTION ( "Normalizes the grayscale values of a source image based on the grayscale values of a reference image. This filter uses a histogram matching technique where the histograms of the two images are matched only at a specified number of quantile values.The filter was orginally designed to normalize MR images of the sameMR protocol and same body part. The algorithm works best if background pixels are excluded from both the source and reference histograms. A simple background exclusion method is to exclude all pixels whose grayscale values are smaller than the mean grayscale value. ThresholdAtMeanIntensity switches on this simple background exclusion method.Number of match points governs the number of quantile values to be matched.The filter assumes that both the source and reference are of the same type and that the input and output image type have the same number of dimension and have scalar pixel types." ) ;
50 BBTK_CATEGORY ( "Filtering" ) ;
52 // GENERATED DESCRPTION
54 BBTK_INPUT(HistogramMatching , numberOfHistogramLevels , "numberOfHistogramLevels" , int, "");
55 BBTK_INPUT(HistogramMatching , numberOfMatchPoints , "numberOfMatchPoints" , int, "");
56 BBTK_INPUT(HistogramMatching , thresholdAtMeanIntensity , "thresholdAtMeanIntensity" , bool, "");
57 BBTK_INPUT(HistogramMatching , inputVolume , "inputVolume" , std::string, "");
58 BBTK_INPUT(HistogramMatching , referenceVolume , "referenceVolume" , std::string, "");
59 BBTK_INPUT(HistogramMatching , outputVolume , "outputVolume" , std::string, "");
61 // EO GENERATED DESCRIPTION
63 BBTK_END_DESCRIBE_BLACK_BOX ( HistogramMatching ) ;
66 #endif // __bbSlicerHistogramMatching_h_INCLUDED__