#!/usr/bin/env python
#
# Copyright 2025 Xnovo Technology ApS
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an  "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from typing import Dict, List, Tuple, Union

from gm3dh5._detail.types import FloatArrayLike, Int32ArrayLike, UInt8ArrayLike
from gm3dh5.geometry import Quaternion
from gm3dh5.protocols import Label, PhaseInfo

class GM3DResultFileReader:
    def __init__(self, filepath: str): ...
    def __enter__(self) -> GM3DResultFileReader: ...
    def __exit__(self, *args): ...
    def open(self): ...
    def close(self): ...
    def export(self, filename: str, exporter=None, *args, **kwargs): ...
    @property
    def version(self) -> int: ...
    @property
    def spacing(self) -> Tuple[float, float, float]: ...
    @property
    def shape(self) -> Tuple[int, int, int]: ...
    @property
    def extent(self) -> Tuple[float, float, float]: ...
    @property
    def center(self) -> Tuple[float, float, float]: ...
    @property
    def grainids(self) -> Int32ArrayLike: ...
    @property
    def mask(self) -> UInt8ArrayLike: ...
    @property
    def mask_labels(self) -> Union[List[Label], None]: ...
    @property
    def phaseid(self) -> UInt8ArrayLike: ...
    @property
    def completeness(self) -> FloatArrayLike: ...
    @property
    def rotation_convention(self): ...
    @property
    def rotations(self) -> Dict[int, Quaternion]: ...
    @property
    def phases(self) -> List[PhaseInfo]: ...
