Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

VirtualVoxel< T > Class Template Reference

#include <PointCloud/VirtualVoxel.H>

Inheritance diagram for VirtualVoxel< T >:

Inheritance graph
[legend]
Collaboration diagram for VirtualVoxel< T >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class VirtualVoxel< T >

Create, store and get virtual voxels, Base Class.

Definition at line 147 of file VirtualVoxel.H.

Public Types

typedef std::vector< std::vector<
std::map< int, T > > > 
BASE_IMAGE

Public Member Functions

 VirtualVoxel (const unsigned int virt_size_x, const unsigned int virt_size_y, const unsigned int virt_size_z)
 Create a new virtual voxel.
virtual ~VirtualVoxel ()
virtual bool getVal (const unsigned int x, const unsigned int y, const unsigned int z, T &vox)
 inefficent access to get x,y,z if possible use iterator
virtual bool get (BASE_IMAGE &ivox) const
 Return the virtual voxels. Bool will be false if vox is empty.
virtual void setVal (const unsigned int x, const unsigned int y, const unsigned int z, const T &vox)
 store a voxel at x,y,z
virtual void set (const BASE_IMAGE &ivox)
 Sets the virtual voxel.
virtual bool initialized () const
 Check whether image is non-empty (i.e., non-zero height and width).
virtual BASE_IMAGE::const_iterator begin () const
 Returns the head iterator.
virtual BASE_IMAGE::const_iterator end () const
 Returns the end iterator.
virtual BASE_IMAGE::iterator beginw ()
 Returns the head iterator.
virtual BASE_IMAGE::iterator endw ()
 Returns the end iterator.
virtual void range (VoxRange &range) const
 get the range of the voxels in real space
virtual int size () const
 number of points we now have
virtual bool getSlice (const Point< int, 3 > &coord, Image< T > &img) const
 Return an Image Slice, set the normal axis to -1.
virtual bool getColumn (const Point< int, 3 > &coord, std::vector< T > &vec) const
 Return a vector column, set the normal axis to -1.
virtual bool getVal (const Point< int, 3 > &coord, T &val)
 Return a single value.
virtual void setSlice (const Point< int, 3 > &coord, const Image< T > &img)
 Set an Image Slice, set the normal axis to -1.
virtual void setColumn (const Point< int, 3 > &coord, const std::vector< T > &vec)
 Set a vector column, set the normal axis to -1.
virtual void setVal (const Point< int, 3 > &coord, const T &val)
 Set a single value.
virtual VirtualVoxel< T > & operator= (const VirtualVoxel< T > &ivox)
 copy operator
virtual VirtualVoxel< T > operator+ (const VirtualVoxel< T > &ivox) const
 not supported
virtual VirtualVoxel< T > operator- (const VirtualVoxel< T > &ivox) const
 not supported
virtual VirtualVoxel< T > operator * (const VirtualVoxel< T > &ivox) const
 not supported
virtual VirtualVoxel< T > operator/ (const VirtualVoxel< T > &ivox) const
 not supported
virtual VirtualVoxel< T > & operator+= (const VirtualVoxel< T > &ivox)
 not supported
virtual VirtualVoxel< T > & operator-= (const VirtualVoxel< T > &ivox)
 not supported
virtual VirtualVoxel< T > & operator *= (const VirtualVoxel< T > &ivox)
 not supported
virtual VirtualVoxel< T > & operator/= (const VirtualVoxel< T > &ivox)
 not supported
virtual VirtualVoxel< T > & operator= (const T &val)
 not supported
virtual VirtualVoxel< T > operator+ (const T &val) const
 not supported
virtual VirtualVoxel< T > operator- (const T &val) const
 not supported
virtual VirtualVoxel< T > operator * (const T &val) const
 not supported
virtual VirtualVoxel< T > operator/ (const T &val) const
 not supported
virtual VirtualVoxel< T > & operator+= (const T &val)
 not supported
virtual VirtualVoxel< T > & operator-= (const T &val)
 not supported
virtual VirtualVoxel< T > & operator *= (const T &val)
 not supported
virtual VirtualVoxel< T > & operator/= (const T &val)
 not supported
virtual bool store (const unsigned int virt_x, const unsigned int virt_y, const unsigned int virt_z, const T &vox)
 store a voxel at x,y,z
virtual bool store (const unsigned int virt_x, const unsigned int virt_y, const unsigned int virt_z, const T &vox, const bool overwrite)
 store a voxel at x,y,z
virtual void timer (const bool on_or_off)
 Turn on or off the built in timer.
virtual unsigned int getHeight () const
 get our height - Y
virtual unsigned int getWidth () const
 get our width - X
virtual unsigned int getDepth () const
 get out depth - Z

Public Attributes

const std::string itsName
 Stores our name for quick access.
const unsigned int itsSizeX
const unsigned int itsSizeY
const unsigned int itsSizeZ

Protected Member Functions

virtual void rangeComp (const VoxRange &range1, const VoxRange &range2)
 combine two ranges taking the max/min of each
virtual VirtualVoxel< T > getNew (const VirtualVoxel< T > &vvox)
 Returns a newish semi-copy object for = overload.
virtual void printTime (const std::string message)
 Built in timer.
virtual void resetTime ()
 Built in timer.
virtual void printTimeConst (const std::string message, Timer &tim, TimerObj &tobj) const
 Built in timer.
virtual void resetTimeConst (Timer &tim, TimerObj &tobj) const
 Built in timer.

Protected Attributes

TimerObj itsTVal
 Store timer information.
Timer itsTimer
 Timer.
unsigned int itsPoints
 The number of REAL points we are storing.
VoxRange itsRange
 The range of voxels.
BASE_IMAGE itsVox


Constructor & Destructor Documentation

template<class T>
VirtualVoxel< T >::VirtualVoxel const unsigned int  virt_size_x,
const unsigned int  virt_size_y,
const unsigned int  virt_size_z
 

Create a new virtual voxel.

Definition at line 66 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsPoints, VirtualVoxel< T >::itsSizeX, VirtualVoxel< T >::itsSizeY, VirtualVoxel< T >::itsVox, y, and z.


Member Function Documentation

template<class T>
VirtualVoxel< T >::BASE_IMAGE::const_iterator VirtualVoxel< T >::begin  )  const [virtual]
 

Returns the head iterator.

Definition at line 153 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox.

template<class T>
VirtualVoxel< T >::BASE_IMAGE::iterator VirtualVoxel< T >::beginw  )  [virtual]
 

Returns the head iterator.

Definition at line 169 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox.

template<class T>
VirtualVoxel< T >::BASE_IMAGE::const_iterator VirtualVoxel< T >::end  )  const [virtual]
 

Returns the end iterator.

Definition at line 161 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox.

template<class T>
VirtualVoxel< T >::BASE_IMAGE::iterator VirtualVoxel< T >::endw  )  [virtual]
 

Returns the end iterator.

Definition at line 177 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox.

template<class T>
bool VirtualVoxel< T >::get BASE_IMAGE ivox  )  const [virtual]
 

Return the virtual voxels. Bool will be false if vox is empty.

Definition at line 106 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox.

Referenced by realvox::convertToVirtual(), and VirtualVoxelOSG< T >::reduceSize().

template<class T>
bool VirtualVoxel< T >::getColumn const Point< int, 3 > &  coord,
std::vector< T > &  vec
const [virtual]
 

Return a vector column, set the normal axis to -1.

Definition at line 207 of file VirtualVoxel.C.

References LFATAL.

template<class T>
unsigned int VirtualVoxel< T >::getDepth  )  const [virtual]
 

get out depth - Z

Implements VoxelImage< T, VirtualVoxel< T >, std::vector< std::vector< std::map< int, T > > > >.

Definition at line 419 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsSizeZ.

template<class T>
unsigned int VirtualVoxel< T >::getHeight  )  const [virtual]
 

get our height - Y

Implements VoxelImage< T, VirtualVoxel< T >, std::vector< std::vector< std::map< int, T > > > >.

Definition at line 405 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsSizeY.

template<class T>
VirtualVoxel< T > VirtualVoxel< T >::getNew const VirtualVoxel< T > &  vvox  )  [protected, virtual]
 

Returns a newish semi-copy object for = overload.

Definition at line 347 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsSizeX, VirtualVoxel< T >::itsSizeY, and VirtualVoxel< T >::itsSizeZ.

Referenced by VirtualVoxel< T >::operator=().

template<class T>
bool VirtualVoxel< T >::getSlice const Point< int, 3 > &  coord,
Image< T > &  img
const [virtual]
 

Return an Image Slice, set the normal axis to -1.

Definition at line 201 of file VirtualVoxel.C.

References LFATAL.

template<class T>
bool VirtualVoxel< T >::getVal const Point< int, 3 > &  coord,
T &  val
[virtual]
 

Return a single value.

Definition at line 213 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox, and Point< T, DIMS >::P.

template<class T>
bool VirtualVoxel< T >::getVal const unsigned int  x,
const unsigned int  y,
const unsigned int  z,
T &  vox
[virtual]
 

inefficent access to get x,y,z if possible use iterator

if the virtual voxel does not exist (nothing is there) then it will return false and vox will be null.

Implements VoxelImage< T, VirtualVoxel< T >, std::vector< std::vector< std::map< int, T > > > >.

Definition at line 88 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox.

template<class T>
unsigned int VirtualVoxel< T >::getWidth  )  const [virtual]
 

get our width - X

Implements VoxelImage< T, VirtualVoxel< T >, std::vector< std::vector< std::map< int, T > > > >.

Definition at line 412 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsSizeX.

template<class T>
bool VirtualVoxel< T >::initialized  )  const [virtual]
 

Check whether image is non-empty (i.e., non-zero height and width).

Implements NImage< T, CLASS_IMAGE, BASE_IMAGE, DIMS >.

Definition at line 138 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox.

template<class T>
VirtualVoxel< T > VirtualVoxel< T >::operator * const T &  val  )  const [virtual]
 

not supported

Definition at line 317 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > VirtualVoxel< T >::operator * const VirtualVoxel< T > &  ivox  )  const [virtual]
 

not supported

Definition at line 272 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > & VirtualVoxel< T >::operator *= const T &  val  )  [virtual]
 

not supported

Definition at line 337 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > & VirtualVoxel< T >::operator *= const VirtualVoxel< T > &  ivox  )  [virtual]
 

not supported

Definition at line 292 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > VirtualVoxel< T >::operator+ const T &  val  )  const [virtual]
 

not supported

Definition at line 307 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > VirtualVoxel< T >::operator+ const VirtualVoxel< T > &  ivox  )  const [virtual]
 

not supported

Definition at line 262 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > & VirtualVoxel< T >::operator+= const T &  val  )  [virtual]
 

not supported

Definition at line 327 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > & VirtualVoxel< T >::operator+= const VirtualVoxel< T > &  ivox  )  [virtual]
 

not supported

Definition at line 282 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > VirtualVoxel< T >::operator- const T &  val  )  const [virtual]
 

not supported

Definition at line 312 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > VirtualVoxel< T >::operator- const VirtualVoxel< T > &  ivox  )  const [virtual]
 

not supported

Definition at line 267 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > & VirtualVoxel< T >::operator-= const T &  val  )  [virtual]
 

not supported

Definition at line 332 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > & VirtualVoxel< T >::operator-= const VirtualVoxel< T > &  ivox  )  [virtual]
 

not supported

Definition at line 287 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > VirtualVoxel< T >::operator/ const T &  val  )  const [virtual]
 

not supported

Definition at line 322 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > VirtualVoxel< T >::operator/ const VirtualVoxel< T > &  ivox  )  const [virtual]
 

not supported

Definition at line 277 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > & VirtualVoxel< T >::operator/= const T &  val  )  [virtual]
 

not supported

Definition at line 342 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > & VirtualVoxel< T >::operator/= const VirtualVoxel< T > &  ivox  )  [virtual]
 

not supported

Definition at line 297 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > & VirtualVoxel< T >::operator= const T &  val  )  [virtual]
 

not supported

Definition at line 302 of file VirtualVoxel.C.

References LFATAL.

template<class T>
VirtualVoxel< T > & VirtualVoxel< T >::operator= const VirtualVoxel< T > &  ivox  )  [virtual]
 

copy operator

Definition at line 249 of file VirtualVoxel.C.

References VirtualVoxel< T >::getNew(), VirtualVoxel< T >::itsPoints, VirtualVoxel< T >::itsRange, and VirtualVoxel< T >::itsVox.

template<class T>
void VirtualVoxel< T >::printTime const std::string  message  )  [protected, virtual]
 

Built in timer.

Definition at line 435 of file VirtualVoxel.C.

References Timer::get(), VirtualVoxel< T >::itsName, VirtualVoxel< T >::itsTimer, VirtualVoxel< T >::itsTVal, TimerObj::T0, TimerObj::T1, TimerObj::T2, TimerObj::T3, and TimerObj::useTimer.

Referenced by VirtualVoxelSalMap< T >::inputNewImage().

template<class T>
void VirtualVoxel< T >::printTimeConst const std::string  message,
Timer tim,
TimerObj tobj
const [protected, virtual]
 

Built in timer.

Definition at line 466 of file VirtualVoxel.C.

References Timer::get(), VirtualVoxel< T >::itsName, VirtualVoxel< T >::itsTVal, TimerObj::T0, TimerObj::T1, TimerObj::T2, TimerObj::T3, and TimerObj::useTimer.

Referenced by VirtualVoxelOSG< T >::getArrays().

template<class T>
void VirtualVoxel< T >::range VoxRange range  )  const [virtual]
 

get the range of the voxels in real space

Definition at line 185 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsRange.

Referenced by VirtualVoxelOSG< T >::reduceSize().

template<class T>
void VirtualVoxel< T >::rangeComp const VoxRange range1,
const VoxRange range2
[inline, protected, virtual]
 

combine two ranges taking the max/min of each

Definition at line 426 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsRange, and OSGUtil::rangeCompare().

Referenced by VirtualVoxelOSG< T >::dec().

template<class T>
void VirtualVoxel< T >::resetTime  )  [protected, virtual]
 

Built in timer.

Definition at line 453 of file VirtualVoxel.C.

References Timer::get(), VirtualVoxel< T >::itsTimer, VirtualVoxel< T >::itsTVal, Timer::reset(), TimerObj::T0, TimerObj::T1, and TimerObj::T2.

Referenced by VirtualVoxelSalMap< T >::inputNewImage().

template<class T>
void VirtualVoxel< T >::resetTimeConst Timer tim,
TimerObj tobj
const [protected, virtual]
 

Built in timer.

Definition at line 485 of file VirtualVoxel.C.

References Timer::get(), VirtualVoxel< T >::itsTVal, Timer::reset(), TimerObj::T0, TimerObj::T1, TimerObj::T2, and TimerObj::useTimer.

Referenced by VirtualVoxelOSG< T >::getArrays().

template<class T>
void VirtualVoxel< T >::set const BASE_IMAGE ivox  )  [virtual]
 

Sets the virtual voxel.

Definition at line 131 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox.

Referenced by realvox::convertToVirtual().

template<class T>
void VirtualVoxel< T >::setColumn const Point< int, 3 > &  coord,
const std::vector< T > &  vec
[virtual]
 

Set a vector column, set the normal axis to -1.

Definition at line 237 of file VirtualVoxel.C.

References LFATAL.

template<class T>
void VirtualVoxel< T >::setSlice const Point< int, 3 > &  coord,
const Image< T > &  img
[virtual]
 

Set an Image Slice, set the normal axis to -1.

Definition at line 231 of file VirtualVoxel.C.

References LFATAL.

template<class T>
void VirtualVoxel< T >::setVal const Point< int, 3 > &  coord,
const T &  val
[virtual]
 

Set a single value.

Definition at line 243 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox, and Point< T, DIMS >::P.

template<class T>
void VirtualVoxel< T >::setVal const unsigned int  x,
const unsigned int  y,
const unsigned int  z,
const T &  vox
[virtual]
 

store a voxel at x,y,z

Implements VoxelImage< T, VirtualVoxel< T >, std::vector< std::vector< std::map< int, T > > > >.

Definition at line 121 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox.

template<class T>
int VirtualVoxel< T >::size  )  const [virtual]
 

number of points we now have

Implements NImage< T, CLASS_IMAGE, BASE_IMAGE, DIMS >.

Definition at line 193 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsPoints.

template<class T>
bool VirtualVoxel< T >::store const unsigned int  virt_x,
const unsigned int  virt_y,
const unsigned int  virt_z,
const T &  vox,
const bool  overwrite
[virtual]
 

store a voxel at x,y,z

if overwrite is set to true, it will overwrite the voxel at that location If it returns false, then it failed to write the voxel.

Definition at line 373 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox.

template<class T>
bool VirtualVoxel< T >::store const unsigned int  virt_x,
const unsigned int  virt_y,
const unsigned int  virt_z,
const T &  vox
[virtual]
 

store a voxel at x,y,z

this will return false if a voxel at that location exists. It will not over write using this method. It will instead just return false.

Definition at line 355 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsVox.

template<class T>
void VirtualVoxel< T >::timer const bool  on_or_off  )  [virtual]
 

Turn on or off the built in timer.

Definition at line 398 of file VirtualVoxel.C.

References VirtualVoxel< T >::itsTVal, and TimerObj::useTimer.

Referenced by RetinaToWorld::start1().


Member Data Documentation

template<class T>
const std::string VirtualVoxel< T >::itsName
 

Stores our name for quick access.

Reimplemented in VirtualVoxelOSG< T >, VirtualVoxelSalMap< T >, and VirtualVoxelSalMap< RETINA_VOXEL_TYPE >.

Definition at line 313 of file VirtualVoxel.H.

Referenced by VirtualVoxel< T >::printTime(), and VirtualVoxel< T >::printTimeConst().

template<class T>
unsigned int VirtualVoxel< T >::itsPoints [protected]
 

The number of REAL points we are storing.

Definition at line 343 of file VirtualVoxel.H.

Referenced by VirtualVoxelOSG< T >::computeDec(), VirtualVoxelOSG< T >::computeDecXY(), VirtualVoxelOSG< T >::getArrays(), VirtualVoxel< T >::operator=(), VirtualVoxelOSG< T >::reduceSize(), VirtualVoxel< T >::size(), VirtualVoxel< T >::VirtualVoxel(), VirtualVoxelOSG< T >::VirtualVoxelOSG(), and VirtualVoxelSalMap< T >::VirtualVoxelSalMap().

template<class T>
VoxRange VirtualVoxel< T >::itsRange [protected]
 

The range of voxels.

Definition at line 346 of file VirtualVoxel.H.

Referenced by VirtualVoxelOSG< T >::computeDec(), VirtualVoxelOSG< T >::computeDecXY(), VirtualVoxelOSG< T >::dec(), VirtualVoxel< T >::operator=(), VirtualVoxel< T >::range(), VirtualVoxel< T >::rangeComp(), and VirtualVoxelOSG< T >::reduceSize().

template<class T>
const unsigned int VirtualVoxel< T >::itsSizeX
 

Since these are const, we can make them public without risk

Reimplemented in VirtualVoxelOSG< T >, VirtualVoxelSalMap< T >, and VirtualVoxelSalMap< RETINA_VOXEL_TYPE >.

Definition at line 308 of file VirtualVoxel.H.

Referenced by VirtualVoxel< T >::getNew(), VirtualVoxel< T >::getWidth(), and VirtualVoxel< T >::VirtualVoxel().

template<class T>
Timer VirtualVoxel< T >::itsTimer [protected]
 

Timer.

Definition at line 340 of file VirtualVoxel.H.

Referenced by VirtualVoxel< T >::printTime(), and VirtualVoxel< T >::resetTime().

template<class T>
TimerObj VirtualVoxel< T >::itsTVal [protected]
 

Store timer information.

Definition at line 337 of file VirtualVoxel.H.

Referenced by VirtualVoxel< T >::printTime(), VirtualVoxel< T >::printTimeConst(), VirtualVoxel< T >::resetTime(), VirtualVoxel< T >::resetTimeConst(), and VirtualVoxel< T >::timer().


The documentation for this class was generated from the following files:
Generated on Mon Nov 23 15:51:24 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4