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

Method SetFormat

Web/Python/vtkmodules/web/dataset_builder.py:36–42  ·  view source on GitHub ↗
(self, mimeType)

Source from the content-addressed store, hash-verified

34 self.windowToImage.SetInput(renderWindow)
35
36 def SetFormat(self, mimeType):
37 if mimeType == "image/png":
38 self.writer = vtkPNGWriter()
39 self.writer.SetInputConnection(self.windowToImage.GetOutputPort())
40 elif mimeType == "image/jpg":
41 self.writer = vtkJPEGWriter()
42 self.writer.SetInputConnection(self.windowToImage.GetOutputPort())
43
44 def writeImage(self, path):
45 if self.writer:

Callers 1

__init__Method · 0.45

Calls 2

SetInputConnectionMethod · 0.45
GetOutputPortMethod · 0.45

Tested by

no test coverage detected