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

The ImageReader class provides input metadata aswell as on demand image reading/loading. More...

#include <imagereader.h>

Inheritance diagram for ImageReader:
Reader

Public Member Functions

 ImageReader (QString path, std::shared_ptr< ReaderParams > readerParams)
 ImageReader constructor that will set up member variables to provide on demand reading images and read the input metadata.
 
cv::Mat getPic (unsigned int index, PictureProcessingFlags flags=APPLY_ALL) override
 Returns the frame to a given index.
 
unsigned int getPicCount () override
 getPicCount returns count of images in input
 
double getFPS () override
 getFPS method from interface Reader, that doesn't make sense for this class
 
double getVideoDuration () override
 getVideoDurationmethod from interface Reader, that doesn't make sense for this class
 
QString getInputPath () override
 getInputPath getter for initially given directory
 
bool isDir () override
 isDir returns true, because the ImageReader works on a directory
 
std::vector< std::string > getFileVector () override
 getFileVector getter for entire image path list
 
ImageReadercopy (std::shared_ptr< ReaderParams > params) override
 copy creates a new instance of ImageReader that is a copy of itself
 
void addMetaData (MetaData *md) override
 addMetaData Used to add MetaData to the reader
 
MetaDatagetMetaData () override
 getMetaData Returns the currently saved MetaData
 
bool isValid () override
 isValid Retruns wether the reader is valid or not
 
- Public Member Functions inherited from Reader
virtual void enableMultithreading ()
 enableMultithreading This method has to be called once in the plugins to use the reader while multithreading
 

Detailed Description

The ImageReader class provides input metadata aswell as on demand image reading/loading.

Author
Daniel Brommer
Date
2021/04/14

Constructor & Destructor Documentation

◆ ImageReader()

ImageReader::ImageReader ( QString  path,
std::shared_ptr< ReaderParams readerParams 
)
explicit

ImageReader constructor that will set up member variables to provide on demand reading images and read the input metadata.

Parameters
pathdirectory/path of input images

Member Function Documentation

◆ addMetaData()

void ImageReader::addMetaData ( MetaData md)
overridevirtual

addMetaData Used to add MetaData to the reader

Parameters
mdThe MetaData to be saved

Implements Reader.

◆ copy()

ImageReader * ImageReader::copy ( std::shared_ptr< ReaderParams params)
overridevirtual

copy creates a new instance of ImageReader that is a copy of itself

Returns
ImageReader that is an exact copy

Implements Reader.

◆ getFileVector()

std::vector< std::string > ImageReader::getFileVector ( )
overridevirtual

getFileVector getter for entire image path list

Returns
list of all image paths, a single entry is one full image path

Implements Reader.

◆ getFPS()

double ImageReader::getFPS ( )
overridevirtual

getFPS method from interface Reader, that doesn't make sense for this class

Returns
code "-1" to signal, that an image folder doesn't have fps

Implements Reader.

◆ getInputPath()

QString ImageReader::getInputPath ( )
overridevirtual

getInputPath getter for initially given directory

Returns
path from which the reader reads images

Implements Reader.

◆ getMetaData()

MetaData * ImageReader::getMetaData ( )
overridevirtual

getMetaData Returns the currently saved MetaData

Returns
The currently saved MetaData

Implements Reader.

◆ getPic()

cv::Mat ImageReader::getPic ( unsigned int  index,
PictureProcessingFlags  flags = APPLY_ALL 
)
overridevirtual

Returns the frame to a given index.

Parameters
indexIndex of the frame to be returned
useMultipleAccessoptinal paramter, if multipleAccess should be used (set to false by default)
Returns
cv::Mat of the selected frame

Implements Reader.

◆ getPicCount()

unsigned int ImageReader::getPicCount ( )
overridevirtual

getPicCount returns count of images in input

Returns
returns image count

Implements Reader.

◆ getVideoDuration()

double ImageReader::getVideoDuration ( )
overridevirtual

getVideoDurationmethod from interface Reader, that doesn't make sense for this class

Returns
code "-1" to signal, that an image folder doesn't have video duration

Implements Reader.

◆ isDir()

bool ImageReader::isDir ( )
overridevirtual

isDir returns true, because the ImageReader works on a directory

Returns
true

Implements Reader.

◆ isValid()

bool ImageReader::isValid ( )
overridevirtual

isValid Retruns wether the reader is valid or not

Returns
true if the reader is valid, false otherwise

Implements Reader.


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