cellUview 1.0.0
A real-time image processing and analysis suite for digital microscopy.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Gallery Class Reference

Public Member Functions

 Gallery ()
 
void captureFrame (frame, bool flatfield=false, int flatFieldCounter=0)
 
void updateImgName (std::string)
 
void updateIndex ()
 
std::map< std::string, std::string > getMetadata (std::string="")
 
std::string getPathname ()
 
std::string getCaptureFname ()
 
std::list< std::pair< std::string, cv::Mat > > getCaptures (bool)
 
bool galleryAtEnd ()
 
std::string getGalleryDisplayFname (int)
 

Constructor & Destructor Documentation

◆ Gallery()

Gallery::Gallery ( )

Initialises gallery file paths, directories, and indexing of the capture counter which is preserved between runs of cellUview

Member Function Documentation

◆ captureFrame()

void Gallery::captureFrame ( frame  capFrame,
bool  updateFlatField = false,
int  flatFieldCounter = 0 
)

Captures a frame and saves into the appropriate gallery directory

Parameters
capFrameFrame structure containing metadata and cv::Mat of image
updateFlatFieldoptional and if true captures into the flatfield directory, defaults to false and captures into main gallery directory
flatFieldCounterAdds index of the number of flat field counter as this will be called sequentially

◆ getCaptures()

std::list< std::pair< std::string, cv::Mat > > Gallery::getCaptures ( bool  directionIsNext)

Loads saved captures and notes to form list of pairs to provide to gui for display Keeps track of gallery location, checking at extremes to not load non existent captures.

Parameters
directionIsNextif true gets the next four saved captures, otherwise the previous.
Returns
stringCapPairs a list of pairs of strings (labels) and cv::Mat (image)

◆ getMetadata()

std::map< std::string, std::string > Gallery::getMetadata ( std::string  fname = "")

This reads back the saved metadata in a capture using cpp_exiftool

Parameters
fnameFrame structure containing metadata and cv::Mat of image
Returns
restoredParams a map of the paramater and value as defined in frame.h

◆ updateIndex()

void Gallery::updateIndex ( )

Iterates through items in gallery directory to find the highest index of captureXYZ.jpg where XYZ is an integer counter of arbitrary length. this avoids captures being overwritten on following runs of cellUview

Parameters
fnameFrame structure containing metadata and cv::Mat of image
Returns
restoredParams a map of the paramater and value as defined in frame.h

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