iMSTK
Interactive Medical Simulation Toolkit
imstkScreenCaptureUtility.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include <string>
10 
11 namespace imstk
12 {
19 {
20 public:
24  ScreenCaptureUtility(std::string prefix = "Screenshot-");
25 
30  std::string saveScreenShot();
31 
37  virtual std::string saveScreenShot(const std::string& name) = 0;
38 
42  unsigned int getScreenShotNumber() const;
43 
47  void setScreenShotPrefix(const std::string& newPrefix);
48 
52  void resetScreenShotNumber();
53 
54 protected:
55  virtual ~ScreenCaptureUtility() = default;
56 
57  unsigned int m_screenShotNumber = 0;
58  std::string m_screenShotPrefix;
59 };
60 } // namespace imstk
ScreenCaptureUtility(std::string prefix="Screenshot-")
Constructor.
void resetScreenShotNumber()
reset the screenshot number
Compound Geometry.
unsigned int m_screenShotNumber
screen shot number is added to the file prefix, and incremented everytime a screen shot is taken ...
std::string saveScreenShot()
Saves a screenshot with a name of <prefix><screenshotNumber>.<implementationImageType> the <Implement...
unsigned int getScreenShotNumber() const
Returns the number of the next screenshot.
Utility class to manage screen capture.
std::string m_screenShotPrefix
the prefix for the screenshots to be saved
void setScreenShotPrefix(const std::string &newPrefix)
set/reset the prefix and the count numbers