Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Whitfield, Ross
wand
Commits
9fa166d9
Commit
9fa166d9
authored
Feb 19, 2019
by
Whitfield, Ross
Browse files
Update IPTS-21442/vts_to_vti.py
parent
e5f04839
Changes
1
Hide whitespace changes
Inline
Side-by-side
IPTS-21442/vts_to_vti.py
0 → 100644
View file @
9fa166d9
import
glob
from
paraview.simple
import
*
filenames
=
glob
.
glob
(
'*.vts'
)
for
filename
in
filenames
:
vts
=
XMLStructuredGridReader
(
FileName
=
[
filename
])
Show
(
vts
)
# So it actually loads the data
_
,
x
,
_
,
y
,
_
,
z
=
vts
.
GetDataInformation
().
DataInformation
.
GetExtent
()
print
(
x
,
y
,
z
)
resampleToImage
=
ResampleToImage
(
Input
=
vts
)
resampleToImage
.
SamplingDimensions
=
[
x
,
y
,
z
]
SaveData
(
filename
.
replace
(
'vts'
,
'vti'
),
proxy
=
resampleToImage
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment