SGeMS File I/O
SGeMS Grid Reader
- class PVGeo.gslib.sgems.SGeMSGridReader(origin=(0.0, 0.0, 0.0), spacing=(1.0, 1.0, 1.0), **kwargs)[source]
Bases:
GSLibReaderGenerates
vtkImageDatafrom the uniform grid defined in the input file in the SGeMS grid format. This format is simply the GSLIB format where the header line defines the dimensions of the uniform grid.- RequestData(request, inInfo, outInfo)[source]
Used by pipeline to get output data object for given time step. Constructs the
vtkImageData
- __parse_extent(header)
- _read_extent()[source]
Reads the input file for the SGeMS format to get output extents. Computationally inexpensive method to discover whole output extent.
- Returns:
This returns a tuple of the whole extent for the uniform grid to be made of the input file (0,n1-1, 0,n2-1, 0,n3-1). This output should be directly passed to set the whole output extent.
- Return type:
tuple
- description = 'PVGeo: SGeMS Uniform Grid'
- extensions = 'sgems dat geoeas gslib GSLIB txt SGEMS SGeMSgslibgrid mtxset'
Write vtkImageData To SGeMS Grid Format
- class PVGeo.gslib.sgems.WriteImageDataToSGeMS(inputType='vtkImageData')[source]
Bases:
WriterBaseWrites a
vtkImageDataobject to the SGeMS uniform grid format. This writer can only handle point data. Note that this will only handle CellData as that is convention with SGeMS.