ITK
4.8.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Filtering
ImageIntensity
include
itkMaskNegatedImageFilter.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright Insight Software Consortium
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0.txt
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*=========================================================================*/
18
#ifndef itkMaskNegatedImageFilter_h
19
#define itkMaskNegatedImageFilter_h
20
21
#include "
itkBinaryFunctorImageFilter.h
"
22
#include "
itkNumericTraits.h
"
23
24
namespace
itk
25
{
26
namespace
Functor
27
{
33
template
<
typename
TInput,
typename
TMask,
typename
TOutput = TInput >
34
class
MaskNegatedInput
35
{
36
public
:
37
typedef
typename
NumericTraits< TInput >::AccumulateType
AccumulatorType
;
38
39
MaskNegatedInput
()
40
:
m_OutsideValue
(
NumericTraits
< TOutput >::ZeroValue())
41
,
m_MaskingValue
(
NumericTraits
< TMask >::ZeroValue())
42
{
43
}
44
~MaskNegatedInput
() {}
45
bool
operator!=
(
const
MaskNegatedInput
&)
const
46
{
47
return
false
;
48
}
49
50
bool
operator==
(
const
MaskNegatedInput
& other)
const
51
{
52
return
!( *
this
!= other );
53
}
54
55
inline
TOutput
operator()
(
const
TInput & A,
const
TMask & B)
const
56
{
57
if
( B !=
m_MaskingValue
)
58
{
59
return
m_OutsideValue
;
60
}
61
else
62
{
63
return
static_cast<
TOutput
>
( A );
64
}
65
}
66
68
void
SetOutsideValue
(
const
TOutput & outsideValue)
69
{
70
m_OutsideValue
= outsideValue;
71
}
72
74
const
TOutput &
GetOutsideValue
()
const
75
{
76
return
m_OutsideValue
;
77
}
78
80
void
SetMaskingValue
(
const
TMask & maskingValue)
81
{
82
m_MaskingValue
= maskingValue;
83
}
84
86
const
TMask &
GetMaskingValue
()
const
87
{
88
return
m_MaskingValue
;
89
}
90
private
:
91
TOutput
m_OutsideValue
;
92
TMask
m_MaskingValue
;
93
};
94
}
95
98
139
148
152
164
167
171
174
183
190
199
201
210
itk::Functor::MaskNegatedInput::~MaskNegatedInput
~MaskNegatedInput()
Definition:
itkMaskNegatedImageFilter.h:44
itk::Functor::MaskNegatedInput
Definition:
itkMaskNegatedImageFilter.h:34
itk::Functor::MaskNegatedInput::SetOutsideValue
void SetOutsideValue(const TOutput &outsideValue)
Definition:
itkMaskNegatedImageFilter.h:68
itk::Functor::MaskNegatedInput::GetMaskingValue
const TMask & GetMaskingValue() const
Definition:
itkMaskNegatedImageFilter.h:86
itk::Functor::MaskNegatedInput::SetMaskingValue
void SetMaskingValue(const TMask &maskingValue)
Definition:
itkMaskNegatedImageFilter.h:80
itk::Functor::MaskNegatedInput::m_OutsideValue
TOutput m_OutsideValue
Definition:
itkMaskNegatedImageFilter.h:91
itk::Functor::MaskNegatedInput::GetOutsideValue
const TOutput & GetOutsideValue() const
Definition:
itkMaskNegatedImageFilter.h:74
itk::Functor::MaskNegatedInput::operator==
bool operator==(const MaskNegatedInput &other) const
Definition:
itkMaskNegatedImageFilter.h:50
itk::Functor::MaskNegatedInput::MaskNegatedInput
MaskNegatedInput()
Definition:
itkMaskNegatedImageFilter.h:39
itk::Functor::MaskNegatedInput::operator()
TOutput operator()(const TInput &A, const TMask &B) const
Definition:
itkMaskNegatedImageFilter.h:55
itk::Functor::MaskNegatedInput::m_MaskingValue
TMask m_MaskingValue
Definition:
itkMaskNegatedImageFilter.h:92
itk::Functor::MaskNegatedInput::operator!=
bool operator!=(const MaskNegatedInput &) const
Definition:
itkMaskNegatedImageFilter.h:45
itkNumericTraits.h
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition:
itkNumericTraits.h:70
itkBinaryFunctorImageFilter.h
itk::Functor::MaskNegatedInput::AccumulatorType
NumericTraits< TInput >::AccumulateType AccumulatorType
Definition:
itkMaskNegatedImageFilter.h:37
Generated on Fri Jul 3 2015 03:33:05 for ITK by
1.8.5