MCPcopy Create free account
hub / github.com/Kitware/VTK / WriteData

Method WriteData

IO/Geometry/vtkIVWriter.cxx:19–49  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

17
18//------------------------------------------------------------------------------
19void vtkIVWriter::WriteData()
20{
21 FILE* fp;
22
23 // make sure the user specified a FileName
24 if (this->FileName == nullptr)
25 {
26 vtkErrorMacro(<< "Please specify FileName to use");
27 return;
28 }
29
30 // try opening the files
31 fp = vtksys::SystemTools::Fopen(this->FileName, "w");
32 if (!fp)
33 {
34 vtkErrorMacro(<< "unable to open OpenInventor file: " << this->FileName);
35 return;
36 }
37
38 //
39 // Write header
40 //
41 vtkDebugMacro("Writing OpenInventor file");
42 vtk::print(fp, "#Inventor V2.0 ascii\n");
43 vtk::print(fp, "# OpenInventor file written by the visualization toolkit\n\n");
44 this->WritePolyData(this->GetInput(), fp);
45 if (fclose(fp))
46 {
47 vtkErrorMacro(<< this->FileName << " did not close successfully. Check disk space.");
48 }
49}
50
51//------------------------------------------------------------------------------
52void vtkIVWriter::WritePolyData(vtkPolyData* pd, FILE* fp)

Callers

nothing calls this directly

Calls 3

WritePolyDataMethod · 0.95
GetInputMethod · 0.95
printFunction · 0.50

Tested by

no test coverage detected