ITK
4.13.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
#include "
itkMath.h
"
24
25
namespace
itk
26
{
27
namespace
Functor
28
{
34
template
<
typename
TInput,
typename
TMask,
typename
TOutput = TInput >
35
class
MaskNegatedInput
36
{
37
public
:
38
typedef
typename
NumericTraits< TInput >::AccumulateType
AccumulatorType
;
39
40
MaskNegatedInput
()
41
:
m_OutsideValue
(
NumericTraits
< TOutput >::ZeroValue())
42
,
m_MaskingValue
(
NumericTraits
< TMask >::ZeroValue())
43
{
44
}
45
~MaskNegatedInput
() {}
46
bool
operator!=
(
const
MaskNegatedInput
&)
const
47
{
48
return
false
;
49
}
50
51
bool
operator==
(
const
MaskNegatedInput
& other)
const
52
{
53
return
!( *
this
!= other );
54
}
55
56
inline
TOutput
operator()
(
const
TInput & A,
const
TMask & B)
const
57
{
58
if
( B !=
m_MaskingValue
)
59
{
60
return
m_OutsideValue
;
61
}
62
else
63
{
64
return
static_cast<
TOutput
>
( A );
65
}
66
}
67
69
void
SetOutsideValue
(
const
TOutput & outsideValue)
70
{
71
m_OutsideValue
= outsideValue;
72
}
73
75
const
TOutput &
GetOutsideValue
()
const
76
{
77
return
m_OutsideValue
;
78
}
79
81
void
SetMaskingValue
(
const
TMask & maskingValue)
82
{
83
m_MaskingValue
= maskingValue;
84
}
85
87
const
TMask &
GetMaskingValue
()
const
88
{
89
return
m_MaskingValue
;
90
}
91
private
:
92
TOutput
m_OutsideValue
;
93
TMask
m_MaskingValue
;
94
};
95
}
96
99
140
149
153
165
168
172
175
184
191
200
202
211
itk::Functor::MaskNegatedInput::~MaskNegatedInput
~MaskNegatedInput()
Definition:
itkMaskNegatedImageFilter.h:45
itk::Functor::MaskNegatedInput
Definition:
itkMaskNegatedImageFilter.h:35
itk::Functor::MaskNegatedInput::SetOutsideValue
void SetOutsideValue(const TOutput &outsideValue)
Definition:
itkMaskNegatedImageFilter.h:69
itk::Functor::MaskNegatedInput::GetMaskingValue
const TMask & GetMaskingValue() const
Definition:
itkMaskNegatedImageFilter.h:87
itk::Functor::MaskNegatedInput::SetMaskingValue
void SetMaskingValue(const TMask &maskingValue)
Definition:
itkMaskNegatedImageFilter.h:81
itk::Functor::MaskNegatedInput::m_OutsideValue
TOutput m_OutsideValue
Definition:
itkMaskNegatedImageFilter.h:92
itk::Functor::MaskNegatedInput::GetOutsideValue
const TOutput & GetOutsideValue() const
Definition:
itkMaskNegatedImageFilter.h:75
itk::Functor::MaskNegatedInput::operator==
bool operator==(const MaskNegatedInput &other) const
Definition:
itkMaskNegatedImageFilter.h:51
itkMath.h
itk::Functor::MaskNegatedInput::MaskNegatedInput
MaskNegatedInput()
Definition:
itkMaskNegatedImageFilter.h:40
itk::Functor::MaskNegatedInput::operator()
TOutput operator()(const TInput &A, const TMask &B) const
Definition:
itkMaskNegatedImageFilter.h:56
itk::Functor::MaskNegatedInput::m_MaskingValue
TMask m_MaskingValue
Definition:
itkMaskNegatedImageFilter.h:93
itk::Functor::MaskNegatedInput::operator!=
bool operator!=(const MaskNegatedInput &) const
Definition:
itkMaskNegatedImageFilter.h:46
itkNumericTraits.h
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition:
itkNumericTraits.h:78
itkBinaryFunctorImageFilter.h
itk::Functor::MaskNegatedInput::AccumulatorType
NumericTraits< TInput >::AccumulateType AccumulatorType
Definition:
itkMaskNegatedImageFilter.h:38
Generated on Tue Dec 19 2017 04:35:33 for ITK by
1.8.5