single_cell_parser
❭ reader
❭ read_scalar_field
read_scalar_field¶
-
single_cell_parser.reader.read_scalar_field(fname=
''
, dtype=np.float64
)¶ Read ASCII AMIRA scalar field mesh files with high speed.
This function reads in AMIRA scalar fields. Particular attention is given to speeding up reading of the actual data.
- Parameters:¶
fname (str) – Filename of the Amira Mesh file to be read.
dtype (numpy.dtype) – Data type of the scalar field, default is np.float64.
- Raises:¶
IOError – If the input file does not have a .am or .AM suffix.
- Returns:¶
A scalar field object containing the mesh data, origin, extent, spacing, and bounds.
- Return type:¶