References

Contents

Index

API

VTKLegacy.RectilinearGridType
RectilinearGrid

Object that contains all the information and datasets from a Legacy VTK file with a RECTILINEAR_GRID geometry/topology.

Fields

  • title::String: Title of the VTK file.
  • nx::Int32: Number of points in the x direction.
  • ny::Int32: Number of points in the y direction.
  • nz::Int32: Number of points in the z direction.
  • dimensions::Vector{Int64}: Number of points in each dimension: [nx,ny,nz].
  • xCoordinates::Vector{Float64}: Domain subdivisions in the "x" axis.
  • yCoordinates::Vector{Float64}: Domain subdivisions in the "y" axis.
  • zCoordinates::Vector{Float64}: Domain subdivisions in the "z" axis.
  • cellData::Array{AbstractFloat,2}: Array containing each dataset in the CELL_DATA section.
  • cellDataNames::Vector{String}: Name of each dataset in the CELL_DATA section.
  • cellDataAttributes::Vector{String}: Attribute of each dataset in the CELL_DATA section.
  • cellDict::Dict{String,IntOrRng}: Dictionary with the cellDataNames as the keys and the indexes of cellData as the values.
  • pointData::Array{AbstractFloat,2}: Array containing each dataset in the POINT_DATA section.
  • pointDataNames::Vector{String}: Name of each dataset in the POINT_DATA section.
  • pointDataAttributes::Vector{String}: Attribute of each dataset in the POINT_DATA section.
  • pointDict::Dict{String,IntOrRng}: Dictionary with the pointDataNames as the keys and the indexes of pointData as the values.
source
VTKLegacy.StructuredGridType
StructuredGrid

Object that contains all the information and datasets from a Legacy VTK file with a STRUCTURED_GRID geometry/topology.

Fields

  • title::String: Title of the VTK file.
  • nx::Int32: Number of points in the x direction.
  • ny::Int32: Number of points in the y direction.
  • nz::Int32: Number of points in the z direction.
  • dimensions::Vector{Int64}: Number of points in each dimension: [nx,ny,nz].
  • npoints::Int32: Number of points that define the cells.
  • points::Array{AbstractFloat,2}: Array containing the coordinates of the points in the grid.
  • cellData::Array{AbstractFloat,2}: Array containing each dataset in the CELL_DATA section.
  • cellDataNames::Vector{String}: Name of each dataset in the CELL_DATA section.
  • cellDataAttributes::Vector{String}: Attribute of each dataset in the CELL_DATA section.
  • cellDict::Dict{String,IntOrRng}: Dictionary with the cellDataNames as the keys and the indexes of cellData as the values.
  • pointData::Array{AbstractFloat,2}: Array containing each dataset in the POINT_DATA section.
  • pointDataNames::Vector{String}: Name of each dataset in the POINT_DATA section.
  • pointDataAttributes::Vector{String}: Attribute of each dataset in the POINT_DATA section.
  • pointDict::Dict{String,IntOrRng}: Dictionary with the pointDataNames as the keys and the indexes of pointData as the values.
source
VTKLegacy.StructuredPointsType
StructuredPoints

Object that contains all the information and datasets from a Legacy VTK file with a STRUCTURED_POINTS geometry/topology.

Fields

  • data::Array{Float64,4}: 4-dimensional array of Float64 that holds the datasets of the vtk file.
  • title::String: Title of the VTK file.
  • nx::Int32: Number of points in the x direction.
  • ny::Int32: Number of points in the y direction.
  • nz::Int32: Number of points in the z direction.
  • dx::Float64: Distance between points in the x direction.
  • dy::Float64: Distance between points in the y direction.
  • dz::Float64: Distance between points in the z direction.
  • x0::Float64: Position of origin in the x direction.
  • y0::Float64: Position of origin in the y direction.
  • z0::Float64: Position of origin in the z direction.
  • x::Vector{Float64}: Points positions in the x direction.
  • y::Vector{Float64}: Points positions in the y direction.
  • z::Vector{Float64}: Points positions in the z direction.
  • dimensions::Vector{Int64}: Number of points in each dimension: [nx,ny,nz].
  • spacing::Vector{Float64}: Spacing size in each dimension: [dx,dy,dz].
  • origin::Vector{Float64}: Origin of the mesh: [x0,y0,z0].
  • dataNames::Vector{String}: Names of the datasets in the VTK file.
  • dataAttributes::Vector{String}: Attribute of each dataset in the VTK file.
  • dictionary::Dict{String,Union{Int64,UnitRange{Int64}}}: Dictionary with the dataNames as the keys and the indexes of data as the values.
source
VTKLegacy.UnstructuredGridType
UnstructuredGrid

Object that contains all the information and datasets from a Legacy VTK file with a UNSTRUCTURED_GRID geometry/topology.

Fields

  • title::String: Title of the VTK file.
  • npoints::Int32: Number of points that define the cells.
  • ncells::Int32: Number of cells in the file.
  • points::Array{AbstractFloat,2}: Array containing the coordinates of the points in the grid.
  • cells::Vector{Int32}: Number and indexes of points defining each cell.
  • cellTypes::Vector{Int32}: Type of each cell. Integer value between 1 and 16
  • cellData::Array{AbstractFloat,2}: Array containing each dataset in the CELL_DATA section.
  • cellDataNames::Vector{String}: Name of each dataset in the CELL_DATA section.
  • cellDataAttributes::Vector{String}: Attribute of each dataset in the CELL_DATA section.
  • cellDict::Dict{String,IntOrRng}: Dictionary with the cellDataNames as the keys and the indexes of cellData as the values.
  • pointData::Array{AbstractFloat,2}: Array containing each dataset in the POINT_DATA section.
  • pointDataNames::Vector{String}: Name of each dataset in the POINT_DATA section.
  • pointDataAttributes::Vector{String}: Attribute of each dataset in the POINT_DATA section.
  • pointDict::Dict{String,IntOrRng}: Dictionary with the pointDataNames as the keys and the indexes of pointData as the values.
source
Base.getindexMethod
getindex(m::VTKDataSet, name::String)

Retrieve the array stored in the m.pointData or m.cellData field with name name. The name should be an element of m.pointDataNames or m.cellDataNames, if not throws an error. If the name is an element of both throws an error. The syntax m["name"] is converted by the compiler to getindex(m,"name").

source
Base.showMethod
show(m::VTKDataSet)

Print general information of the VTK file contained in the object m

source
VTKLegacy.LoadVTKMethod
LoadVTK(filename::String)

Read the VTK file filename in to an object of type StructuredPoints or UnstructuredGrid. Currently only StructuredPoints and UnstructuredGrid are supported.

source
VTKLegacy.WriteVTKMethod
WriteVTK(filename::String, m::VTKDataSet)

Write a VTK file with with name filename with the contents of m. The file will have geometry/topology according with typeof(m).

source
VTKLegacy.integrateFunction
integrate(m::StructuredPoints,var::Union{Int64,String,Vector{Union{Int64,String}}}=1)

Compute the discrete integral of var in the whole mesh m as:

\[I = \sum_{(i,j,k)=(1,1,1)}^{N_x,N_y,N_z}\text{var}_{(i,j,k)}\Delta x\Delta y\Delta z.\]

If var is unspecified, integrate only the dataset with index 1 in m.data

source
VTKLegacy.magnitudeMethod
magnitude(arr::Array{AbstractFloat,3})

Returns the magnitude of a vector dataset of size (axis,nx,ny) where axis is 3 ("x", "y" and "z" dimensions) and nx and ny are the number of cells in each axis.

source
VTKLegacy.magnitudeMethod
magnitude(arr::Array{AbstractFloat,4})

Returns the magnitude of a vector dataset of size (axis,nx,ny,nz) where axis is 3 ("x", "y" and "z" dimensions) and nx, ny and nz are the number of cells in each axis.

source
VTKLegacy.magnitudeMethod
magnitude(m::StructuredPoints,dataname::String)

Returns the magnitude of a dataset in m with name dataname and attribute Vector.

source
VTKLegacy.rangesFunction
ranges(m::StructuredPoints,io::Union{IOStream,Nothing}=nothing)

Obtain the maximum and minimum values of each dataset in m and print them to io followed by a newline.

If io is unspecified, prints the values to the default output stream stdout.

source