bioprocessing
5.1.2
|
Iterator on the vertices of a volume graph. More...
#include <bioprocessing/graph/volumegraph.h>
Public Types | |
typedef Owner::Edge | Edge |
typedef Owner::Vertex | Vertex |
typedef Owner::Volume | Volume |
typedef Owner::Point | Point |
Public Member Functions | |
vertex_const_iterator () | |
vertex_const_iterator (const This &o) | |
vertex_const_iterator (const NonConstThis &o) | |
~vertex_const_iterator () | |
This & | operator= (const This &o) |
This & | operator= (const NonConstThis &o) |
This & | operator++ () |
This | operator++ (int) |
bool | operator== (const This &o) const |
bool | operator!= (const This &o) const |
bool | operator== (const NonConstThis &o) const |
bool | operator!= (const NonConstThis &o) const |
const Vertex & | operator* () const |
const Vertex * | operator-> () const |
Protected Types | |
typedef vertex_const_iterator | This |
typedef vertex_iterator | NonConstThis |
typedef VolumeGraph< T, P > | Owner |
Protected Member Functions | |
vertex_const_iterator (const Volume &vol, bool end) | |
void | toEnd () |
void | setVertex () |
Protected Attributes | |
Volume | _vol |
Point4d | _cur |
Point4d | _dim |
Vertex | _vtx |
Friends | |
class | VolumeGraph< T, P > |
Iterator on the vertices of a volume graph.
This is really ugly and I am sure there is a prettier way to do that, but I needed something that worked. Basically, an iterator is a class that points to a value, and which increment makes it change of pointed value. The issue here is there are no real vertices to point to since the graph is stored as a volume. Consequentely, I need to create from scratch the pointed vertex. I also need to keep in mind the corresponding voxel (actually, I keep a reference to the volume, and the coordinates of the voxel).
So the work done is iterator over the dimensions of the volume (we move along x, except if we're at the end of a line in which case we need to find where to go next). Then we create a fake vertex and point toward it.
I'm not sure I respect entirely the standard for one way random iterators as described in the standard library (I should check that). But it is usable for now (iteration from begin to end, with a temporary use in the loop. The vertices should not have an existence outside the loop).
Definition at line 420 of file volumegraph.h.
typedef Owner::Edge bio::VolumeGraph< T, P >::vertex_const_iterator::Edge |
Definition at line 427 of file volumegraph.h.
|
protected |
Definition at line 424 of file volumegraph.h.
|
protected |
Definition at line 425 of file volumegraph.h.
typedef Owner::Point bio::VolumeGraph< T, P >::vertex_const_iterator::Point |
Definition at line 430 of file volumegraph.h.
|
protected |
Definition at line 423 of file volumegraph.h.
typedef Owner::Vertex bio::VolumeGraph< T, P >::vertex_const_iterator::Vertex |
Definition at line 428 of file volumegraph.h.
typedef Owner::Volume bio::VolumeGraph< T, P >::vertex_const_iterator::Volume |
Definition at line 429 of file volumegraph.h.
|
inlineprotected |
Definition at line 432 of file volumegraph.h.
References bio::VolumeGraph< T, P >::_vol, and bio::VolumeGraph< T, P >::notPresentValue().
|
inline |
Definition at line 446 of file volumegraph.h.
|
inline |
Definition at line 452 of file volumegraph.h.
|
inline |
Definition at line 458 of file volumegraph.h.
|
inline |
Definition at line 464 of file volumegraph.h.
|
inline |
Definition at line 520 of file volumegraph.h.
References bio::VolumeGraph< T, P >::vertex_const_iterator::_cur.
|
inline |
Definition at line 518 of file volumegraph.h.
References bio::VolumeGraph< T, P >::vertex_const_iterator::_cur.
|
inline |
Definition at line 521 of file volumegraph.h.
|
inline |
Definition at line 481 of file volumegraph.h.
References bio::VolumeGraph< T, P >::_vol, and bio::VolumeGraph< T, P >::notPresentValue().
|
inline |
Definition at line 511 of file volumegraph.h.
|
inline |
Definition at line 522 of file volumegraph.h.
|
inline |
Definition at line 473 of file volumegraph.h.
References bio::VolumeGraph< T, P >::vertex_const_iterator::_cur, bio::VolumeGraph< T, P >::vertex_const_iterator::_dim, bio::VolumeGraph< T, P >::_vol, bio::VolumeGraph< T, P >::vertex_const_iterator::_vol, and bio::VolumeGraph< T, P >::vertex_const_iterator::_vtx.
|
inline |
Definition at line 465 of file volumegraph.h.
References bio::VolumeGraph< T, P >::vertex_const_iterator::_cur, bio::VolumeGraph< T, P >::vertex_const_iterator::_dim, bio::VolumeGraph< T, P >::_vol, bio::VolumeGraph< T, P >::vertex_const_iterator::_vol, and bio::VolumeGraph< T, P >::vertex_const_iterator::_vtx.
|
inline |
Definition at line 519 of file volumegraph.h.
References bio::VolumeGraph< T, P >::vertex_const_iterator::_cur.
|
inline |
Definition at line 517 of file volumegraph.h.
References bio::VolumeGraph< T, P >::vertex_const_iterator::_cur.
|
inlineprotected |
Definition at line 529 of file volumegraph.h.
|
inlineprotected |
Definition at line 525 of file volumegraph.h.
|
friend |
Definition at line 539 of file volumegraph.h.
|
protected |
Definition at line 537 of file volumegraph.h.
Referenced by bio::VolumeGraph< T, P >::vertex_const_iterator::operator!=(), bio::VolumeGraph< T, P >::vertex_const_iterator::operator=(), and bio::VolumeGraph< T, P >::vertex_const_iterator::operator==().
|
protected |
Definition at line 538 of file volumegraph.h.
Referenced by bio::VolumeGraph< T, P >::vertex_const_iterator::operator=().
|
protected |
Definition at line 536 of file volumegraph.h.
Referenced by bio::VolumeGraph< T, P >::vertex_const_iterator::operator=().
|
protected |
Definition at line 539 of file volumegraph.h.
Referenced by bio::VolumeGraph< T, P >::vertex_const_iterator::operator=().