iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Protected Attributes | List of all members
imstk::ScreenCaptureUtility Class Referenceabstract

Utility class to manage screen capture. More...

#include <imstkScreenCaptureUtility.h>

Inheritance diagram for imstk::ScreenCaptureUtility:
Inheritance graph
[legend]

Public Member Functions

 ScreenCaptureUtility (std::string prefix="Screenshot-")
 Constructor.
 
std::string saveScreenShot ()
 Saves a screenshot with a name of <prefix><screenshotNumber>.<implementationImageType> the <ImplementationImageType> is most likely .png. More...
 
virtual std::string saveScreenShot (const std::string &name)=0
 Saves a screenshot with the given name, the implementation will add the image type used to store the file. More...
 
unsigned int getScreenShotNumber () const
 Returns the number of the next screenshot.
 
void setScreenShotPrefix (const std::string &newPrefix)
 set/reset the prefix and the count numbers
 
void resetScreenShotNumber ()
 reset the screenshot number
 

Protected Attributes

unsigned int m_screenShotNumber = 0
 screen shot number is added to the file prefix, and incremented everytime a screen shot is taken
 
std::string m_screenShotPrefix
 the prefix for the screenshots to be saved
 

Detailed Description

Utility class to manage screen capture.

Definition at line 18 of file imstkScreenCaptureUtility.h.

Member Function Documentation

◆ saveScreenShot() [1/2]

std::string imstk::ScreenCaptureUtility::saveScreenShot ( )

Saves a screenshot with a name of <prefix><screenshotNumber>.<implementationImageType> the <ImplementationImageType> is most likely .png.

Returns
the file name that was actually used to store the file, "" if the file storage failed

Definition at line 18 of file imstkScreenCaptureUtility.cpp.

◆ saveScreenShot() [2/2]

virtual std::string imstk::ScreenCaptureUtility::saveScreenShot ( const std::string &  name)
pure virtual

Saves a screenshot with the given name, the implementation will add the image type used to store the file.

Parameters
namebase name for the file to store
Returns
the file name that was actually used to store the file, "" if the file storage failed

Implemented in imstk::VTKScreenCaptureUtility.


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