vtkIVWriter.h 1.78 KB
Newer Older
Ken Martin's avatar
Ken Martin committed
1 2 3 4 5
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkIVWriter.h

6
  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 8
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
Will Schroeder's avatar
Will Schroeder committed
9

10 11
     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
     PURPOSE.  See the above copyright notice for more information.
Ken Martin's avatar
Ken Martin committed
13 14

=========================================================================*/
15 16 17 18 19 20 21 22 23 24
/**
 * @class   vtkIVWriter
 * @brief   export polydata into OpenInventor 2.0 format.
 *
 * vtkIVWriter is a concrete subclass of vtkWriter that writes OpenInventor 2.0
 * files.
 *
 * @sa
 * vtkPolyDataWriter
*/
Ken Martin's avatar
Ken Martin committed
25

26 27
#ifndef vtkIVWriter_h
#define vtkIVWriter_h
Ken Martin's avatar
Ken Martin committed
28

29
#include "vtkIOGeometryModule.h" // For export macro
30
#include "vtkWriter.h"
Ken Martin's avatar
Ken Martin committed
31

32 33 34
class vtkPolyData;

class VTKIOGEOMETRY_EXPORT vtkIVWriter : public vtkWriter
Ken Martin's avatar
Ken Martin committed
35 36
{
public:
37
  static vtkIVWriter *New();
38
  vtkTypeMacro(vtkIVWriter,vtkWriter);
39
  void PrintSelf(ostream& os, vtkIndent indent) override;
Ken Martin's avatar
Ken Martin committed
40

41 42 43 44
  //@{
  /**
   * Get the input to this writer.
   */
45 46
  vtkPolyData* GetInput();
  vtkPolyData* GetInput(int port);
47
  //@}
48

49 50 51 52
  //@{
  /**
   * Specify file name of vtk polygon data file to write.
   */
53 54
  vtkSetStringMacro(FileName);
  vtkGetStringMacro(FileName);
55
  //@}
56

Ken Martin's avatar
Ken Martin committed
57
protected:
58
  vtkIVWriter()
59
  {
60
    this->FileName = nullptr;
61
  }
62

63
  ~vtkIVWriter() override
64
  {
65
    delete[] this->FileName;
66
  }
67

68
  void WriteData() override;
Ken Martin's avatar
Ken Martin committed
69
  void WritePolyData(vtkPolyData *polyData, FILE *fp);
70 71 72

  char *FileName;

73
  int FillInputPortInformation(int port, vtkInformation *info) override;
74

75
private:
76 77
  vtkIVWriter(const vtkIVWriter&) = delete;
  void operator=(const vtkIVWriter&) = delete;
Ken Martin's avatar
Ken Martin committed
78 79 80 81
};

#endif