File: vtkF3DExampleReader.h

package info (click to toggle)
f3d 3.2.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,668 kB
  • sloc: cpp: 99,109; python: 811; sh: 342; xml: 238; java: 101; javascript: 95; makefile: 25
file content (47 lines) | stat: -rw-r--r-- 1,256 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef vtkF3DExampleReader_h
#define vtkF3DExampleReader_h

#include <vtkPolyDataAlgorithm.h>

/**
 * @class   vtkF3DExampleReader
 * @brief   Simple Example reader
 *
 * This reader is a very simple reader which illustrate how to create
 * a new VTK reader to integrate it into F3D.
 * It reads a text file (extension must be ".expl") which contains a point cloud.
 * Point coordinates are separated by spaces, tabs, or new lines.
 */
class vtkF3DExampleReader : public vtkPolyDataAlgorithm
{
public:
  static vtkF3DExampleReader* New();
  vtkTypeMacro(vtkF3DExampleReader, vtkPolyDataAlgorithm);
  void PrintSelf(ostream& os, vtkIndent indent) override;

  ///@{
  /**
   * Get/Set the file name.
   */
  vtkSetMacro(FileName, std::string);
  vtkGetMacro(FileName, std::string);
  ///@}

protected:
  vtkF3DExampleReader();
  ~vtkF3DExampleReader() override;

  /**
   * Since the reader generate a vtkPolyData, we just have to derive from vtkPolyDataAlgorithm
   * and override this function.
   */
  int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;

private:
  vtkF3DExampleReader(const vtkF3DExampleReader&) = delete;
  void operator=(const vtkF3DExampleReader&) = delete;

  std::string FileName;
};

#endif