37 #ifndef AIMS_BUCKET_BUCKET_H 38 #define AIMS_BUCKET_BUCKET_H 69 :
public std::map< int , std::list< AimsBucketItem<T> > >
72 typedef typename std::map<int, std::list<AimsBucketItem<T> > >
::iterator 77 typedef typename std::map<int, std::list<AimsBucketItem<T> > >
::key_type 84 _header( other._header ) {}
103 inline void pop_front();
104 inline void pop_back();
107 inline const std::list< AimsBucketItem<T> >&
109 {
return find( n )->second; }
110 inline std::list< AimsBucketItem<T> >& operator [] (
const key_type& n )
117 inline float sizeX()
const;
119 inline float sizeY()
const;
121 inline float sizeZ()
const;
123 inline float sizeT()
const;
126 inline void setSizeX(
float sizex);
128 inline void setSizeY(
float sizey);
130 inline void setSizeZ(
float sizez);
132 inline void setSizeT(
float sizet);
134 inline void setSizeXYZT(
float sizex,
float sizey,
float sizez,
float sizet);
145 std::ostream& operator << <> (std::ostream& out,
153 #ifndef DOXYGEN_HIDE_INTERNAL_CLASSES 173 #endif // DOXYGEN_HIDE_INTERNAL_CLASSES 176 template <
class T>
inline 178 { (*this)[0].push_front(item);
182 template <
class T>
inline 184 { (*this)[0].push_back(item);
188 template <
class T>
inline 190 { (*this)[0].pop_front();
194 template <
class T>
inline 196 { (*this)[0].pop_back();
202 std::vector<float> vs;
203 _header.getProperty(
"voxel_size", vs );
212 std::vector<float> vs;
213 _header.getProperty(
"voxel_size", vs );
222 std::vector<float> vs;
223 _header.getProperty(
"voxel_size", vs );
232 std::vector<float> vs;
233 _header.getProperty(
"voxel_size", vs );
240 template <
class T>
inline 244 std::vector<float> vs;
245 _header.getProperty(
"voxel_size", vs );
246 while( vs.size() < 4 )
249 _header.setProperty(
"voxel_size", vs );
253 template <
class T>
inline 257 std::vector<float> vs;
258 _header.getProperty(
"voxel_size", vs );
259 while( vs.size() < 4 )
262 _header.setProperty(
"voxel_size", vs );
266 template <
class T>
inline 270 std::vector<float> vs;
271 _header.getProperty(
"voxel_size", vs );
272 while( vs.size() < 4 )
275 _header.setProperty(
"voxel_size", vs );
279 template <
class T>
inline 283 std::vector<float> vs;
284 _header.getProperty(
"voxel_size", vs );
285 while( vs.size() < 4 )
288 _header.setProperty(
"voxel_size", vs );
292 template <
class T>
inline 296 std::vector<float> vs(4);
301 _header.setProperty(
"voxel_size", vs );
305 template <
class T>
inline 309 for (it=this->begin();it!=this->end();it++)
310 ((*it).second).erase( ((*it).second).begin() , ((*it).second).end() );
311 std::map< int , std::list< AimsBucketItem<T> > >::erase( this->begin(), this->end() );
315 template <
class T>
inline 316 std::ostream& operator << (std::ostream& out, const AimsBucket<T>& thing)
321 typename std::list< AimsBucketItem<T> >::const_iterator it2;
323 for (it1=thing.begin();it1!=thing.end();it1++)
326 out <<
"t=" << (*it1).first <<
",";
327 for (it2=((*it1).second).begin();it2!=((*it1).second).end();it2++)
332 return out <<
"NULL}" << std::flush;
void push_front(const AimsBucketItem< T > &item)
Function redefined to omit time.
void setSizeY(float sizey)
sets the Y resolution of the data in mm
float sizeX() const
returns the X resolution in mm
float sizeY() const
returns the Y resolution in mm
std::map< int, std::list< AimsBucketItem< T > > >::const_iterator const_iterator
void setHeader(const aims::PythonHeader &hdr)
const aims::PythonHeader & header() const
AIMSDATA_API std::ostream & operator<<(std::ostream &out, const AimsBucket< T > &thing)
void setSizeXYZT(float sizex, float sizey, float sizez, float sizet)
sets X,Y,Z and T resolutions of the data in mm
void erase()
Empty the whole map.
aims::PythonHeader & header()
void push_back(const AimsBucketItem< T > &item)
The class for EcatSino data write operation.
std::map< int, std::list< AimsBucketItem< T > > >::key_type key_type
static std::string dataType()
float sizeT() const
returns the T resolution in mm
void setSizeX(float sizex)
sets the X resolution of the data in mm
An alternate, ordered, representation for buckets (voxels lists).
std::map< int, std::list< AimsBucketItem< T > > >::iterator iterator
The bucket base class to manage packages of points associated to their value during time...
void setSizeT(float sizet)
sets the T resolution of the data in mm
aims::PythonHeader _header
AimsBucket(const AimsBucket< T > &other)
The template base class for all types of bucket items.
std::map< int, Bucket >::iterator iterator
static std::string objectType()
void setSizeZ(float sizez)
sets the Z resolution of the data in mm
float sizeZ() const
returns the Z resolution in mm
static std::string name()