ImageHistogram1D.h
1 /*
2  * Developing brain Region Annotation With Expectation-Maximization (Draw-EM)
3  *
4  * Copyright 2013-2016 Imperial College London
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 
20 #ifndef _ImageHistogram1D_H
21 
22 #define _ImageHistogram1D_H
23 
24 #include "mirtk/Histogram1D.h"
25 #include "mirtk/GenericImage.h"
26 
27 namespace mirtk {
28 
29 template <class VoxelType>
30 class ImageHistogram1D : public Histogram1D<VoxelType>
31 {
32 protected:
33  /// min for equalize
34  VoxelType _emin;
35  /// max for equalize
36  VoxelType _emax;
37 
38 public:
39  /// Evaluate the histogram from a given image with padding value
40  virtual void Evaluate(GenericImage<VoxelType> *, VoxelType padding = -10000);
41  /// Histogram Equalization
42  virtual void Equalize(VoxelType min,VoxelType max);
43  /// Back project the equalized histogram to image
44  virtual void BackProject(GenericImage<VoxelType> *);
45 };
46 
47 }
48 #endif
Definition: IOConfig.h:41