ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkLabelObjectLine.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 itkLabelObjectLine_h
19#define itkLabelObjectLine_h
20
21#include "itkMacro.h"
22#include "itkIndex.h"
23#include "itkIndent.h"
24
25namespace itk
26{
41template <unsigned int VImageDimension>
42class ITK_TEMPLATE_EXPORT LabelObjectLine
43{
44public:
46
47 static constexpr unsigned int ImageDimension = VImageDimension;
48
51
53 LabelObjectLine(const IndexType & idx, const LengthType & length);
54 virtual ~LabelObjectLine() = default;
55
59 void
60 SetIndex(const IndexType & idx);
61
62 [[nodiscard]] const IndexType &
63 GetIndex() const;
64
68 void
69 SetLength(const LengthType length);
70
71 [[nodiscard]] const LengthType &
72 GetLength() const;
73
77 [[nodiscard]] bool
78 HasIndex(const IndexType idx) const;
79
80 [[nodiscard]] bool
81 IsNextIndex(const IndexType & idx) const;
82
84 void
85 Print(std::ostream & os, Indent indent = 0) const;
86
87protected:
92 virtual void
93 PrintSelf(std::ostream & os, Indent indent) const;
94
95 virtual void
96 PrintHeader(std::ostream & os, Indent indent) const;
97
98 virtual void
99 PrintTrailer(std::ostream & itkNotUsed(os), Indent itkNotUsed(indent)) const
100 {}
101
102private:
105};
106} // end namespace itk
107
108#ifndef ITK_MANUAL_INSTANTIATION
109# include "itkLabelObjectLine.hxx"
110#endif
111
112#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
bool HasIndex(const IndexType idx) const
virtual void PrintTrailer(std::ostream &os, Indent indent) const
virtual ~LabelObjectLine()=default
const LengthType & GetLength() const
static constexpr unsigned int ImageDimension
LabelObjectLine(const IndexType &idx, const LengthType &length)
const IndexType & GetIndex() const
virtual void PrintHeader(std::ostream &os, Indent indent) const
void SetIndex(const IndexType &idx)
void SetLength(const LengthType length)
bool IsNextIndex(const IndexType &idx) const
virtual void PrintSelf(std::ostream &os, Indent indent) const
void Print(std::ostream &os, Indent indent=0) const
Index< VImageDimension > IndexType
ITK_DEFAULT_COPY_AND_MOVE(LabelObjectLine)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition itkIntTypes.h:86
Represent a n-dimensional index in a n-dimensional image.
Definition itkIndex.h:69