annotate OrthancStone/Sources/Toolbox/SubvoxelReader.h @ 1512:244ad1e4e76a

reorganization of folders
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 07 Jul 2020 16:21:02 +0200
parents Framework/Toolbox/SubvoxelReader.h@7f16987131e1
children 85e117739eca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
1270
2d8ab34c8c91 upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 439
diff changeset
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include "../Volumes/ImageBuffer3D.h"
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #include "GeometryToolbox.h"
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
1455
30deba7bc8e2 simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1270
diff changeset
27 #include <Images/ImageTraits.h>
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 #include <boost/noncopyable.hpp>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 #include <cmath>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 namespace OrthancStone
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 namespace Internals
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 {
1488
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
36 /*
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
37 WARNING : the slice order is different between this class and ImageBuffer3D
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
38
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
39 See the comment above ImageBuffer3D declaration.
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
40
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
41 The slices are supposed to be stored in INCREASING z-order in this class!
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
42 */
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 class SubvoxelReaderBase : public boost::noncopyable
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 private:
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 const ImageBuffer3D& source_;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 unsigned int width_;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 unsigned int height_;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 unsigned int depth_;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 public:
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 SubvoxelReaderBase(const ImageBuffer3D& source) :
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 source_(source),
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 width_(source.GetWidth()),
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 height_(source.GetHeight()),
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 depth_(source.GetDepth())
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 ORTHANC_FORCE_INLINE
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 const Orthanc::ImageAccessor& GetSource() const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 return source_.GetInternalImage();
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 ORTHANC_FORCE_INLINE
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 unsigned int GetWidth() const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 return width_;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 ORTHANC_FORCE_INLINE
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 unsigned int GetHeight() const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 return height_;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 ORTHANC_FORCE_INLINE
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 unsigned int GetDepth() const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 return depth_;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 ORTHANC_FORCE_INLINE
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 unsigned int ComputeRow(unsigned int y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 unsigned int z) const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 return z * height_ + y;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 };
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93
1488
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
94 /*
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
95 WARNING : the slice order is different between this class and ImageBuffer3D
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
96
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
97 See the comment above ImageBuffer3D declaration.
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
98
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
99 The slices are supposed to be stored in INCREASING z-order in this class!
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
100 */
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 template <Orthanc::PixelFormat Format,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 ImageInterpolation Interpolation>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 class SubvoxelReader;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
1488
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
106 /*
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
107 WARNING : the slice order is different between this class and ImageBuffer3D
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
108
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
109 See the comment above ImageBuffer3D declaration.
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
110
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
111 The slices are supposed to be stored in INCREASING z-order in this class!
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
112 */
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 template <Orthanc::PixelFormat Format>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 class SubvoxelReader<Format, ImageInterpolation_Nearest> :
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 public Internals::SubvoxelReaderBase
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 public:
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 typedef Orthanc::PixelTraits<Format> Traits;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 typedef typename Traits::PixelType PixelType;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 SubvoxelReader(const ImageBuffer3D& source) :
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 SubvoxelReaderBase(source)
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 inline bool GetValue(PixelType& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 float z) const;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 inline bool GetFloatValue(float& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 float z) const;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 };
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137
1488
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
138 /*
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
139 WARNING : the slice order is different between this class and ImageBuffer3D
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
140
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
141 See the comment above ImageBuffer3D declaration.
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
142
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
143 The slices are supposed to be stored in INCREASING z-order in this class!
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
144 */
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 template <Orthanc::PixelFormat Format>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 class SubvoxelReader<Format, ImageInterpolation_Bilinear> :
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 public Internals::SubvoxelReaderBase
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 public:
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 typedef Orthanc::PixelTraits<Format> Traits;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 typedef typename Traits::PixelType PixelType;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 SubvoxelReader(const ImageBuffer3D& source) :
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 SubvoxelReaderBase(source)
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 inline bool Sample(float& f00,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 float& f01,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 float& f10,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 float& f11,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 unsigned int ux,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 unsigned int uy,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 unsigned int uz) const;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 inline bool GetValue(PixelType& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 float z) const;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 inline bool GetFloatValue(float& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 float z) const;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 };
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177
1488
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
178 /*
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
179 WARNING : the slice order is different between this class and ImageBuffer3D
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
180
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
181 See the comment above ImageBuffer3D declaration.
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
182
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
183 The slices are supposed to be stored in INCREASING z-order in this class!
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
184 */
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 template <Orthanc::PixelFormat Format>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 class SubvoxelReader<Format, ImageInterpolation_Trilinear> :
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 public Internals::SubvoxelReaderBase
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 private:
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 SubvoxelReader<Format, ImageInterpolation_Bilinear> bilinear_;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 public:
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 typedef Orthanc::PixelTraits<Format> Traits;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 typedef typename Traits::PixelType PixelType;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 SubvoxelReader(const ImageBuffer3D& source) :
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 SubvoxelReaderBase(source),
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 bilinear_(source)
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 inline bool GetValue(PixelType& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 float z) const;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 inline bool GetFloatValue(float& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 float z) const;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 };
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213
1488
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
214 /*
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
215 See important comment above
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
216 */
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 template <Orthanc::PixelFormat Format>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 bool SubvoxelReader<Format, ImageInterpolation_Nearest>::GetValue(PixelType& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 float z) const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 if (x < 0 ||
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 y < 0 ||
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 z < 0)
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228 return false;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 unsigned int ux = static_cast<unsigned int>(std::floor(x));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 unsigned int uy = static_cast<unsigned int>(std::floor(y));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 unsigned int uz = static_cast<unsigned int>(std::floor(z));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236 if (ux < GetWidth() &&
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 uy < GetHeight() &&
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238 uz < GetDepth())
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 Orthanc::ImageTraits<Format>::GetPixel(target, GetSource(), ux, ComputeRow(uy, uz));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 return true;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 return false;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
246 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 template <Orthanc::PixelFormat Format>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252 bool SubvoxelReader<Format, ImageInterpolation_Nearest>::GetFloatValue(float& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 float z) const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 PixelType value;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 if (GetValue(value, x, y, z))
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
260 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261 target = Traits::PixelToFloat(value);
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
262 return true;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
263 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
264 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
266 return false;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
267 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
268 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
269
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
270
1488
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
271 /*
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
272 See important comment above
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
273 */
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
274
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
275 template <Orthanc::PixelFormat Format>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276 bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::Sample(float& f00,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
277 float& f01,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
278 float& f10,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
279 float& f11,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
280 unsigned int ux,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
281 unsigned int uy,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
282 unsigned int uz) const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
283 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
284 if (ux < GetWidth() &&
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
285 uy < GetHeight() &&
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
286 uz < GetDepth())
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
287 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
288 f00 = Orthanc::ImageTraits<Format>::GetFloatPixel(GetSource(), ux, ComputeRow(uy, uz));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
289 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
290 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
291 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
292 // Pixel is out of the volume
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
293 return false;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
294 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
295
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
296 if (ux + 1 < GetWidth())
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
297 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
298 f01 = Orthanc::ImageTraits<Format>::GetFloatPixel(GetSource(), ux + 1, ComputeRow(uy, uz));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
299 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
300 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
301 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
302 f01 = f00;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
303 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
304
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305 if (uy + 1 < GetHeight())
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
306 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
307 f10 = Orthanc::ImageTraits<Format>::GetFloatPixel(GetSource(), ux, ComputeRow(uy + 1, uz));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
308 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
309 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
310 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
311 f10 = f00;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
312 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
313
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
314 if (ux + 1 < GetWidth() &&
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
315 uy + 1 < GetHeight())
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
316 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
317 f11 = Orthanc::ImageTraits<Format>::GetFloatPixel(GetSource(), ux + 1, ComputeRow(uy + 1, uz));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
318 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
319 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
320 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
321 f11 = f00;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
322 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
323
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
324 return true;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
325 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
326
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
327
1488
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
328 /*
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
329 See important comment above
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
330 */
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
331
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
332 template <Orthanc::PixelFormat Format>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
333 bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::GetFloatValue(float& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
334 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
335 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
336 float z) const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
337 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
338 x -= 0.5f;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
339 y -= 0.5f;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
340
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
341 if (x < 0 ||
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
342 y < 0 ||
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
343 z < 0)
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
344 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
345 return false;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
346 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
347 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
348 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
349 unsigned int ux = static_cast<unsigned int>(std::floor(x));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
350 unsigned int uy = static_cast<unsigned int>(std::floor(y));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
351 unsigned int uz = static_cast<unsigned int>(std::floor(z));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
352
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
353 float f00, f01, f10, f11;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
354 if (Sample(f00, f01, f10, f11, ux, uy, uz))
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
355 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
356 float ax = x - static_cast<float>(ux);
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
357 float ay = y - static_cast<float>(uy);
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
358
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
359 target = GeometryToolbox::ComputeBilinearInterpolationUnitSquare(ax, ay, f00, f01, f10, f11);
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
360 return true;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
361 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
362 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
363 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
364 return false;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
365 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
366 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
367 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
368
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
369
1488
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
370 /*
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
371 See important comment above
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
372 */
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
373
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
374 template <Orthanc::PixelFormat Format>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
375 bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::GetValue(PixelType& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
376 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
377 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
378 float z) const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
379 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
380 float value;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
381
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
382 if (GetFloatValue(value, x, y, z))
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
383 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
384 Traits::FloatToPixel(target, value);
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
385 return true;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
386 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
387 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
388 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
389 return false;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
390 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
391 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
392
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
393
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
394
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
395 template <Orthanc::PixelFormat Format>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
396 bool SubvoxelReader<Format, ImageInterpolation_Trilinear>::GetFloatValue(float& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
397 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
398 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
399 float z) const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
400 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
401 x -= 0.5f;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
402 y -= 0.5f;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
403 z -= 0.5f;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
404
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
405 if (x < 0 ||
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
406 y < 0 ||
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
407 z < 0)
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
408 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
409 return false;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
410 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
411 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
412 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
413 unsigned int ux = static_cast<unsigned int>(std::floor(x));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
414 unsigned int uy = static_cast<unsigned int>(std::floor(y));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
415 unsigned int uz = static_cast<unsigned int>(std::floor(z));
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
416
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
417 float f000, f001, f010, f011;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
418 if (bilinear_.Sample(f000, f001, f010, f011, ux, uy, uz))
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
419 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
420 const float ax = x - static_cast<float>(ux);
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
421 const float ay = y - static_cast<float>(uy);
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
422
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
423 float f100, f101, f110, f111;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
424
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
425 if (bilinear_.Sample(f100, f101, f110, f111, ux, uy, uz + 1))
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
426 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
427 const float az = z - static_cast<float>(uz);
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
428 target = GeometryToolbox::ComputeTrilinearInterpolationUnitSquare
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
429 (ax, ay, az, f000, f001, f010, f011, f100, f101, f110, f111);
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
430 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
431 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
432 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
433 target = GeometryToolbox::ComputeBilinearInterpolationUnitSquare
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
434 (ax, ay, f000, f001, f010, f011);
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
435 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
436
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
437 return true;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
438 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
439 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
440 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
441 return false;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
442 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
443 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
444 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
445
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
446
1488
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
447 /*
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
448 See important comment above
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
449 */
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1455
diff changeset
450
183
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
451
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
452 template <Orthanc::PixelFormat Format>
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
453 bool SubvoxelReader<Format, ImageInterpolation_Trilinear>::GetValue(PixelType& target,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
454 float x,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
455 float y,
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
456 float z) const
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
457 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
458 float value;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
459
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
460 if (GetFloatValue(value, x, y, z))
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
461 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
462 Traits::FloatToPixel(target, value);
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
463 return true;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
464 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
465 else
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
466 {
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
467 return false;
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
468 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
469 }
98da3a8d4820 SubvoxelReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
470 }