aimsdata  4.7.0
Neuroimaging data handling
border.h
Go to the documentation of this file.
1 /* This software and supporting documentation are distributed by
2  * Institut Federatif de Recherche 49
3  * CEA/NeuroSpin, Batiment 145,
4  * 91191 Gif-sur-Yvette cedex
5  * France
6  *
7  * This software is governed by the CeCILL-B license under
8  * French law and abiding by the rules of distribution of free software.
9  * You can use, modify and/or redistribute the software under the
10  * terms of the CeCILL-B license as circulated by CEA, CNRS
11  * and INRIA at the following URL "http://www.cecill.info".
12  *
13  * As a counterpart to the access to the source code and rights to copy,
14  * modify and redistribute granted by the license, users are provided only
15  * with a limited warranty and the software's author, the holder of the
16  * economic rights, and the successive licensors have only limited
17  * liability.
18  *
19  * In this respect, the user's attention is drawn to the risks associated
20  * with loading, using, modifying and/or developing or reproducing the
21  * software by the user in light of its specific status of free software,
22  * that may mean that it is complicated to manipulate, and that also
23  * therefore means that it is reserved for developers and experienced
24  * professionals having in-depth computer knowledge. Users are therefore
25  * encouraged to load and test the software's suitability as regards their
26  * requirements in conditions enabling the security of their systems and/or
27  * data to be ensured and, more generally, to use and operate it in the
28  * same conditions as regards security.
29  *
30  * The fact that you are presently reading this means that you have had
31  * knowledge of the CeCILL-B license and that you accept its terms.
32  */
33 
34 /*
35  * Offset border class
36  */
37 #ifndef AIMS_BORDER_BORDER_H
38 #define AIMS_BORDER_BORDER_H
39 
41 
42 namespace aims {
43 
44 
48 { public:
51 
59  Border(int dimx,int dimy,int dimz,int width=0);
60 
62  virtual ~Border();
64 
67  int borderWidth() const;
70  int oFirstPoint() const;
72  int oLastPoint() const;
74  int oLine() const;
76  int oPointBetweenLine() const;
78  int oSlice() const;
80  int oLineBetweenSlice() const;
82  int oVolume() const;
84  int oSliceBetweenVolume() const;
86 
87  protected:
90 
98  int _oLine;
102  int _oSlice;
106  int _oVolume;
109 
111 
114  void _setBorder(int dimx,int dimy,int dimz,int width);
117 
118 };
119 
120 
121 inline
122 Border::Border(int dimx,int dimy,int dimz,int width)
123 {
124  _setBorder(dimx,dimy,dimz,width);
125 }
126 
127 
128 inline
130 {
131 }
132 
133 
134 inline
136 {
137  return _borderWidth;
138 }
139 
140 
141 inline
143 {
144  return _oFirstPoint;
145 }
146 
147 
148 inline
150 {
151  return _oLastPoint;
152 }
153 
154 
155 inline
156 int Border::oLine() const
157 {
158  return _oLine;
159 }
160 
161 
162 inline
164 {
165  return _oPointBetweenLine;
166 }
167 
168 
169 inline
170 int Border::oSlice() const
171 {
172  return _oSlice;
173 }
174 
175 
176 inline
178 {
179  return _oLineBetweenSlice;
180 }
181 
182 
183 inline
184 int Border::oVolume() const
185 {
186  return _oVolume;
187 }
188 
189 
190 inline
192 {
193  return _oSliceBetweenVolume;
194 }
195 
196 
197 }
198 
199 
200 #endif
int _borderWidth
Border width.
Definition: border.h:92
int oLineBetweenSlice() const
Number of lines between 2 consecutive slices.
Definition: border.h:177
int _oLastPoint
Offset up to last point.
Definition: border.h:96
int _oSlice
Length of a slice.
Definition: border.h:102
int oPointBetweenLine() const
Offset between the end of a line and the start of the consecutive line.
Definition: border.h:163
int oLine() const
Offset between 2 consecutive lines.
Definition: border.h:156
#define AIMSDATA_API
The base class to manage borders on data containers.
Definition: border.h:47
The class for EcatSino data write operation.
Definition: border.h:42
int oSlice() const
Offset between 2 consecutive slices.
Definition: border.h:170
int _oPointBetweenLine
Offset between two consecutive lines.
Definition: border.h:100
int oLastPoint() const
Offset from the start of the allocated memory to the last point.
Definition: border.h:149
int _oSliceBetweenVolume
Offset between two consecutive volumes.
Definition: border.h:108
int oVolume() const
Offset between 2 consecutive volumes.
Definition: border.h:184
int _oFirstPoint
Offset up to first point.
Definition: border.h:94
int _oLineBetweenSlice
Offset between two consecutive slices.
Definition: border.h:104
Border(int dimx, int dimy, int dimz, int width=0)
The constructor precalculates offsets to speed-up access to data during loops.
Definition: border.h:122
int _oVolume
Length of a volume.
Definition: border.h:106
virtual ~Border()
Definition: border.h:129
int oSliceBetweenVolume() const
Number of slices between 2 consecutive volumes.
Definition: border.h:191
int _oLine
Length of a line.
Definition: border.h:98
int oFirstPoint() const
Offset from the start of the allocated memory to the first point.
Definition: border.h:142
int borderWidth() const
Usefull offsets for A.I.M.S.
Definition: border.h:135