RISA
risa::OfflineSaver Class Reference

This stage is suited for online and offline processing via configuration options. More...

#include <OfflineSaver.h>

Public Types

using manager_type = glados::cuda::HostMemoryManager< float, glados::cuda::async_copy_policy >
 

Public Member Functions

 OfflineSaver (const std::string &configFile)
 this function is called, when an image exits the software pipeline More...
 
auto saveImage (glados::Image< manager_type > image, std::string path) -> void
 

Protected Member Functions

 ~OfflineSaver ()
 

Private Member Functions

auto writeTiffSequence (const int planeID) -> void
 Creates a Tiff Sequence to be stored on disk. More...
 
auto readConfig (const std::string &configFile) -> bool
 
auto writeToTiff (::TIFF *tif, glados::Image< manager_type > img) const -> void
 writes a single image to the tiff sequence More...
 

Private Attributes

int memoryPoolIndex_
 
int numberOfPixels_
 the number of pixels in the reconstructed image in one dimension More...
 
int numberOfFrames_
 
int numberOfPlanes_
 the number of planes More...
 
int framesPerFile_
 
detail::RecoMode mode_
 
unsigned int circularBufferSize_
 the size of the output buffers More...
 
std::string outputPath_
 
std::string fileName_
 
double minLatency_ {std::numeric_limits<double>::max()}
 
double maxLatency_ {0.0}
 
std::vector< Timertmrs_
 
std::vector< std::size_t > fileIndex_
 
std::vector< glados::CircularBuffer< glados::Image< manager_type > > > outputBuffers_
 

Detailed Description

This stage is suited for online and offline processing via configuration options.

In offline mode it has numberOfPlanes output buffers of fixed size. If a buffer is full, it is written to disk and cleared afterwars. In online mode, the output acts as a circular buffer. The oldest values are overwritten, if the buffer is full. At program exit, the buffer is written to disk

Definition at line 55 of file OfflineSaver.h.

Member Typedef Documentation

Constructor & Destructor Documentation

risa::OfflineSaver::OfflineSaver ( const std::string &  configFile)

this function is called, when an image exits the software pipeline

Definition at line 68 of file OfflineSaver.cu.

risa::OfflineSaver::~OfflineSaver ( )
protected

Definition at line 94 of file OfflineSaver.cu.

Member Function Documentation

auto risa::OfflineSaver::readConfig ( const std::string &  configFile) -> bool
private

All values needed for setting up the class are read from the config file in this function.

Parameters
[in]configFilepath to config file
Returns
returns true, if configuration file could be read successfully, else false

Definition at line 188 of file OfflineSaver.cu.

auto risa::OfflineSaver::saveImage ( glados::Image< manager_type image,
std::string  path 
) -> void

Definition at line 102 of file OfflineSaver.cu.

auto risa::OfflineSaver::writeTiffSequence ( const int  planeID) -> void
private

Creates a Tiff Sequence to be stored on disk.

Parameters
[in]planeIDspecifies, which buffer is to be stored on hard disk

Definition at line 139 of file OfflineSaver.cu.

auto risa::OfflineSaver::writeToTiff ( ::TIFF *  tif,
glados::Image< manager_type img 
) const -> void
private

writes a single image to the tiff sequence

Parameters
[in]tifpointer to the TIFF-sequence
[in]imgthe image to be written into the tiff-file

Definition at line 160 of file OfflineSaver.cu.

Member Data Documentation

unsigned int risa::OfflineSaver::circularBufferSize_
private

the size of the output buffers

Definition at line 91 of file OfflineSaver.h.

std::vector<std::size_t> risa::OfflineSaver::fileIndex_
private

Definition at line 100 of file OfflineSaver.h.

std::string risa::OfflineSaver::fileName_
private

Definition at line 93 of file OfflineSaver.h.

int risa::OfflineSaver::framesPerFile_
private

Definition at line 87 of file OfflineSaver.h.

double risa::OfflineSaver::maxLatency_ {0.0}
private

Definition at line 96 of file OfflineSaver.h.

int risa::OfflineSaver::memoryPoolIndex_
private

Definition at line 82 of file OfflineSaver.h.

double risa::OfflineSaver::minLatency_ {std::numeric_limits<double>::max()}
private

Definition at line 95 of file OfflineSaver.h.

detail::RecoMode risa::OfflineSaver::mode_
private

Definition at line 89 of file OfflineSaver.h.

int risa::OfflineSaver::numberOfFrames_
private

Definition at line 85 of file OfflineSaver.h.

int risa::OfflineSaver::numberOfPixels_
private

the number of pixels in the reconstructed image in one dimension

Definition at line 84 of file OfflineSaver.h.

int risa::OfflineSaver::numberOfPlanes_
private

the number of planes

Definition at line 86 of file OfflineSaver.h.

std::vector<glados::CircularBuffer<glados::Image<manager_type> > > risa::OfflineSaver::outputBuffers_
private

Definition at line 101 of file OfflineSaver.h.

std::string risa::OfflineSaver::outputPath_
private

Definition at line 93 of file OfflineSaver.h.

std::vector<Timer> risa::OfflineSaver::tmrs_
private

Definition at line 98 of file OfflineSaver.h.


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