iVS3D v2.0.0
Loading...
Searching...
No Matches
ImageIterator Class Reference

The ImageIterator class is used to iterate given ModelInputPictures instance mip. Handles boundaries and and allows for easy boundary checks. Every image is iterated. More...

#include <imageiterator.h>

Inheritance diagram for ImageIterator:
ModelInputIterator

Public Member Functions

unsigned int getNext (ModelInputPictures *mip, unsigned int currentIdx, unsigned int stepsize=1) override
 steps for stepsize images forward from given currentIdx without leaving the boundaries of ModelInputPictures mip.
 
unsigned int getPrevious (ModelInputPictures *mip, unsigned int currentIdx, unsigned int stepsize=1) override
 steps for stepsize images backward from given currentIdx without leaving the boundaries of ModelInputPictures mip.
 
unsigned int getFirst (ModelInputPictures *mip) override
 get index of first image in ModelInputPictures instance mip. First is 0.
 
unsigned int getLast (ModelInputPictures *mip) override
 get index of last image in ModelINputPictures instance mip. Last is mip.getPicCount()-1.
 
bool isFirst (ModelInputPictures *mip, unsigned int currentIdx) override
 check if currentIdx is first index in ModelInputPictures mip.
 
bool isLast (ModelInputPictures *mip, unsigned int currentIdx) override
 check if currentIdx is last index in ModelInputPictures mip.
 

Detailed Description

The ImageIterator class is used to iterate given ModelInputPictures instance mip. Handles boundaries and and allows for easy boundary checks. Every image is iterated.

Author
Dominik Wüst
Date
2021/02/11

Member Function Documentation

◆ getFirst()

unsigned int ImageIterator::getFirst ( ModelInputPictures mip)
overridevirtual

get index of first image in ModelInputPictures instance mip. First is 0.

Parameters
mipthe ModelInputPictures to iterate
Returns
0

Implements ModelInputIterator.

◆ getLast()

unsigned int ImageIterator::getLast ( ModelInputPictures mip)
overridevirtual

get index of last image in ModelINputPictures instance mip. Last is mip.getPicCount()-1.

Parameters
mipthe modelInputPictures to iterate
Returns
mip.getPicCount()-1
See also
ModelInputPictures::getPicCount

Implements ModelInputIterator.

◆ getNext()

unsigned int ImageIterator::getNext ( ModelInputPictures mip,
unsigned int  currentIdx,
unsigned int  stepsize = 1 
)
overridevirtual

steps for stepsize images forward from given currentIdx without leaving the boundaries of ModelInputPictures mip.

Parameters
mipthe ModelInputPictures instance to iterate
currentIdxthe index to start from
stepsizethe number of images to step from currentIdx
Returns
the new index which is min(currentIdx+stepsize, mip.getPicCount()-1)
See also
ModelInputPictures::getPicCount

Implements ModelInputIterator.

◆ getPrevious()

unsigned int ImageIterator::getPrevious ( ModelInputPictures mip,
unsigned int  currentIdx,
unsigned int  stepsize = 1 
)
overridevirtual

steps for stepsize images backward from given currentIdx without leaving the boundaries of ModelInputPictures mip.

Parameters
mipthe ModelInputPictures instance to iterate
currentIdxthe index to start from
stepsizethe number of images to step from currentIdx
Returns
the new index which is max(currentIdx-stepsize, 0)

Implements ModelInputIterator.

◆ isFirst()

bool ImageIterator::isFirst ( ModelInputPictures mip,
unsigned int  currentIdx 
)
overridevirtual

check if currentIdx is first index in ModelInputPictures mip.

Parameters
mipthe ModelInputPictures to iterate
currentIdxindex to check
Returns
true if currentIdx is first index, false otherwise

Implements ModelInputIterator.

◆ isLast()

bool ImageIterator::isLast ( ModelInputPictures mip,
unsigned int  currentIdx 
)
overridevirtual

check if currentIdx is last index in ModelInputPictures mip.

Parameters
mipthe ModelInputPictures to iterate
currentIdxindex to check
Returns
true if currentIdx is first index, false otherwise

Implements ModelInputIterator.


The documentation for this class was generated from the following files: