PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusHTMLGenerator.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2  Program: Plus
3  Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4  See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef __vtkPlusHTMLGenerator_H
8 #define __vtkPlusHTMLGenerator_H
9 
10 #include "vtkPlusCommonExport.h"
11 
12 #include "vtkObject.h"
13 
14 class vtkTable;
15 
21 class vtkPlusCommonExport vtkPlusHTMLGenerator : public vtkObject
22 {
23 public:
24 
26  enum HEADINGS
27  {
28  H1,
29  H2,
30  H3,
31  H4,
32  H5,
33  H6
34  };
35 
36  static vtkPlusHTMLGenerator* New();
37  vtkTypeMacro(vtkPlusHTMLGenerator, vtkObject);
38  virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
39 
41  virtual std::string SaveHtmlPageAutoFilename();
42 
48  virtual std::string AddImageAutoFilename(const char* filenamePostfix, const char* description, const int widthPx = 0, const int heightPx = 0);
49 
51  virtual void AddParagraph(const char* paragraph);
52 
54  virtual void AddText(const char* text, HEADINGS h, const char* style = NULL);
55 
57  virtual void AddTable(vtkTable* table, int borderPx);
58 
60  virtual void AddLink(const char* linkText, const char* url);
61 
63  virtual void AddHorizontalLine();
64 
66  vtkSetStringMacro(Title);
68  vtkGetStringMacro(Title);
69 
71  vtkSetStringMacro(OutputDirectory);
73  vtkGetStringMacro(OutputDirectory);
74 
80  vtkSetStringMacro(BaseFilename);
82  vtkGetStringMacro(BaseFilename);
83 
84 protected:
85 
87  virtual void SaveHtmlPage(const char* fileName);
88 
90  virtual void AddImage(const char* imageSource, const char* alt, const int widthPx = 0, const int heightPx = 0);
91 
93  virtual std::string GetHtmlBody();
94 
96  virtual std::string GetHtmlPage();
97 
99  virtual ~vtkPlusHTMLGenerator();
100 
101  char* Title;
104 
105  std::ostringstream HtmlBody;
106 
107 private:
108  vtkPlusHTMLGenerator(const vtkPlusHTMLGenerator&); // Not implemented.
109  void operator=(const vtkPlusHTMLGenerator&); // Not implemented.
110 };
111 
112 #endif
#define VTK_OVERRIDE
Definition: PlusCommon.h:49
PhidgetLCD_Font int int const char * text
Definition: phidget22.h:4287
std::ostringstream HtmlBody
class for generating basic html tags