Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkSystemInformation.h
Go to the documentation of this file.
1 #ifndef __vtkSystemInformation_h
2 #define __vtkSystemInformation_h
3 
4 // SlicerLogic includes
5 #include "vtkSlicerBaseLogic.h"
6 
7 // VTK includes
8 #include <vtkObject.h>
9 #include <vtkSmartPointer.h>
10 
11 class vtkRenderWindow;
12 
13 // VTKSYS includes
14 #include <vtksys/SystemInformation.hxx>
15 
16 // STD includes
17 #include <string>
18 
19 class VTK_SLICER_BASE_LOGIC_EXPORT vtkSystemInformation : public vtkObject
20 {
21 public:
22  static vtkSystemInformation *New();
23  vtkTypeMacro(vtkSystemInformation,vtkObject);
24  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
25 
26  const char * GetVendorString();
27  const char * GetVendorID();
28  const char * GetTypeID();
29  const char * GetFamilyID();
30  const char * GetModelName();
31  const char * GetModelID();
32  const char * GetSteppingCode();
33  const char * GetExtendedProcessorName();
34  const char * GetProcessorSerialNumber();
35  int GetProcessorCacheSize();
36  int GetLogicalProcessorsPerPhysical();
37  float GetProcessorClockFrequency();
38  int GetProcessorAPICID();
39  int GetProcessorCacheXSize(long int);
40  int DoesCPUSupportFeature(long int);
41 
42  const char * GetOSName();
43  const char * GetHostname();
44  const char * GetOSRelease();
45  const char * GetOSVersion();
46  const char * GetOSPlatform();
47 
48  int Is64Bits();
49 
50  unsigned int GetNumberOfLogicalCPU(); // per physical cpu
51  unsigned int GetNumberOfPhysicalCPU();
52 
53  int DoesCPUSupportCPUID();
54 
55  // Retrieve memory information in megabyte.
56  unsigned long GetTotalVirtualMemory();
57  unsigned long GetAvailableVirtualMemory();
58  unsigned long GetTotalPhysicalMemory();
59  unsigned long GetAvailablePhysicalMemory();
60 
61  // Run the different checks
62  void RunCPUCheck();
63  void RunOSCheck();
64  void RunMemoryCheck();
65  void RunRenderingCheck();
66 
68  {
69  NONE = 0,
71  ONSCREEN_RENDERING = 0x01,
73  HEADLESS_RENDERING_USES_OSMESA = 0x04,
75  HEADLESS_RENDERING_USES_EGL = 0x08,
77  HEADLESS_RENDERING = HEADLESS_RENDERING_USES_OSMESA | HEADLESS_RENDERING_USES_EGL,
79  RENDERING = ONSCREEN_RENDERING | HEADLESS_RENDERING,
83  OPENGL = 0x10,
84  };
85 
88  vtkGetMacro(RenderingCapabilities, vtkTypeUInt32);
89 
92  vtkGetMacro(RenderingCapabilitiesDetails, std::string);
93 
94 protected:
95 
96  vtkSmartPointer<vtkRenderWindow> NewOffscreenRenderWindow();
97 
99  virtual ~vtkSystemInformation();
101  void operator=(const vtkSystemInformation&);
102 
103  //private:
104 
105  vtksys::SystemInformation SystemInformation;
106  std::string StringHolder;
107  vtkTypeUInt32 RenderingCapabilities;
109 };
110 #endif
vtksys::SystemInformation SystemInformation
std::string RenderingCapabilitiesDetails
vtkTypeUInt32 RenderingCapabilities