MCPcopy Create free account
hub / github.com/MITK/MITK / RangeBasedMasking

Class RangeBasedMasking

Modules/BasicImageProcessing/src/mitkMaskCleaningOperation.cpp:30–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 {
29 template< class TInput, class TOutput>
30 class RangeBasedMasking
31 {
32 public:
33 RangeBasedMasking() {};
34 ~RangeBasedMasking() {};
35 bool operator!=(const RangeBasedMasking &) const
36 {
37 return false;
38 }
39 bool operator==(const RangeBasedMasking & other) const
40 {
41 return !(*this != other);
42 }
43 inline TOutput operator()(const TInput & A, const TOutput & B) const
44 {
45 unsigned short erg = B;
46 if (lowerLimitOn && (A < lowerLimit))
47 {
48 erg = 0;
49 }
50 if (upperLimitOn && (upperLimit < A))
51 {
52 erg = 0;
53 }
54 return erg;
55 }
56
57 bool lowerLimitOn = false;
58 bool upperLimitOn = false;
59 double lowerLimit = 0;
60 double upperLimit = 1;
61 };
62 }
63}
64

Callers 2

MaskOutlierFilteringMethod · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected