mirror of
https://github.com/OpenFOAM/ThirdParty-6.git
synced 2025-12-08 06:57:43 +00:00
ParaView-5.0.1: Added the source-tree to ThirdParty-dev and patched as described in the README file
Resolves bug-report http://bugs.openfoam.org/view.php?id=2098
This commit is contained in:
22
ParaView-5.0.1/VTK/IO/Image/Testing/Python/TestMetaImage2D.py
Executable file
22
ParaView-5.0.1/VTK/IO/Image/Testing/Python/TestMetaImage2D.py
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
import vtk
|
||||
from vtk.test import Testing
|
||||
from vtk.util.misc import vtkGetDataRoot
|
||||
VTK_DATA_ROOT = vtkGetDataRoot()
|
||||
|
||||
# This scripts shows a compressed spectrum of an image.
|
||||
# Image pipeline
|
||||
reader = vtk.vtkMetaImageReader()
|
||||
reader.SetFileName(VTK_DATA_ROOT + "/Data/foot/foot.mha")
|
||||
|
||||
viewer = vtk.vtkImageViewer2()
|
||||
viewer.SetInputConnection(reader.GetOutputPort())
|
||||
viewer.SetColorWindow(255)
|
||||
viewer.SetColorLevel(127.5)
|
||||
|
||||
viewInt = vtk.vtkRenderWindowInteractor()
|
||||
viewer.SetupInteractor(viewInt)
|
||||
viewer.Render()
|
||||
|
||||
# This is needed if you want to interact with the image.
|
||||
# viewInt.Start()
|
||||
Reference in New Issue
Block a user