LibCarna Version 3.4.0
Loading...
Searching...
No Matches
VolumeSegment.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#ifndef VOLUMESEGMENT_H_6014714286
16#define VOLUMESEGMENT_H_6014714286
17
23#include <LibCarna/LibCarna.hpp>
27#include <memory>
28
29namespace LibCarna
30{
31
32namespace base
33{
34
35
36
37// ----------------------------------------------------------------------------------
38// VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >
39// ----------------------------------------------------------------------------------
40
46template< typename SegmentNormalsVolumeType >
48{
49
51
52 std::unique_ptr< Association< SegmentNormalsVolumeType > > myNormals;
53
54public:
55
60
65
71
75
79 bool hasNormals() const;
80
81}; // VolumeSegmentNormalsComponent
82
83
84template< typename SegmentNormalsVolumeType >
88
89
90template< typename SegmentNormalsVolumeType >
95
96
97template< typename SegmentNormalsVolumeType >
103
104
105template< typename SegmentNormalsVolumeType >
107{
108 LIBCARNA_ASSERT( hasNormals() );
109 return **myNormals;
110}
111
112
113template< typename SegmentNormalsVolumeType >
115{
116 return myNormals.get() != nullptr && myNormals->get() != nullptr;
117}
118
119
120
121// ----------------------------------------------------------------------------------
122// VolumeSegmentNormalsComponent< void >
123// ----------------------------------------------------------------------------------
124
130template< >
132{
133
134public:
135
140
141}; // VolumeSegmentNormalsComponent
142
143
147
148
149
150// ----------------------------------------------------------------------------------
151// VolumeSegment
152// ----------------------------------------------------------------------------------
153
159template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
160class VolumeSegment : public VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >
161{
162
164
165public:
166
172
177
182
188
197
202
208
212
216 bool hasIntensities() const;
217
223
224private:
225
226 std::unique_ptr< Association< SegmentIntensityVolumeType > > myIntensities;
227
228}; // VolumeSegment
229
230
231template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
237
238
239template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
244
245
246template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
252
253
254template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
260
261
262template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
264{
265 return myIntensities.get() != nullptr && myIntensities->get() != nullptr;
266}
267
268
269
270} // namespace LibCarna :: base
271
272} // namespace LibCarna
273
274#endif // VOLUMESEGMENT_H_6014714286
Defines LibCarna::base::Association.
Defines LibCarna::base::LibCarnaException and LibCarna::base::AssertionFailure.
#define LIBCARNA_ASSERT(expression)
If the given expression is false, a break point is raised in debug mode and an AssertionFailure throw...
Contains forward-declarations.
Defines LibCarna::base::VolumeGrid.
AssociatedObjectType * get() const
Returns raw pointer to the referenced object.
Represents a particular partitioning of volumetric data.
Represents the normal map component of an VolumeSegment object.
SegmentNormalsVolumeType & normals()
References the normal map of this partition.
bool hasNormals() const
Tells whether this partition has a normal map associated.
void setNormals(Association< SegmentNormalsVolumeType > *volume)
Sets the normal map of this partition.
const SegmentNormalsVolumeType & normals() const
Represents a single volumetric data partition.
math::Vector3ui offset
Holds the coordinate offset this partition within the whole volumetric data partitioning.
SegmentNormalsVolumeType NormalsVolume
Reflects the type to use for storing the normal map of a single partition.
bool hasIntensities() const
Tells whether this partition has intensity volume data associated.
VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > Grid
Reflects the type to use for representation of the whole volumetric data partitioning.
const SegmentIntensityVolumeType & intensities() const
Grid & grid
References the volumetric data partitioning this partition belongs to.
SegmentIntensityVolumeType IntensityVolume
Reflects the type to use for storing the intensity volume of a single partition.
VolumeSegment(Grid &grid)
Instantiates.
SegmentIntensityVolumeType & intensities()
References the intensity volume data of this partition.
void setIntensities(Association< SegmentIntensityVolumeType > *intensities)
Sets the intensity volume data of this partition.
Eigen::Matrix< unsigned int, 3, 1 > Vector3ui
Defines vector.
Definition math.hpp:203
#define NON_COPYABLE
Marks the class that it is placed in as non-copyable.