viqa.utils.load_mhd¶
- viqa.utils.load_mhd(file_dir: str | PathLike, file_name: str | PathLike) ndarray [source]¶
Load data from a
.mhd
file.- Parameters:
file_dir (str or os.PathLike) – Directory of the file
file_name (str or os.PathLike) – Name of the file with extension
- Returns:
img_arr – Numpy array containing the data
- Return type:
np.ndarray
- Raises:
ValueError – If the bit depth is not supported
Examples
>>> from viqa.utils import load_mhd >>> img = load_raw("path/to/image.mhd")