forked from tlambert03/nd2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
write_tiff
export to OME-TIFF, include full metadata as S…
…tructuredAnnotation (tlambert03#216) * wip export to tiff * remove breakpoint * working well * cleanup * public exports * future import * test more things * remove pragma * docs * fix multi-point * style(pre-commit.ci): auto fixes [...] * fix color * fix rgb and other things * fix readme test * unify changes * add to test * force tst --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
256ef22
commit 7c3a64a
Showing
15 changed files
with
597 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
"""nd2: A Python library for reading and writing ND2 files.""" | ||
|
||
from importlib.metadata import PackageNotFoundError, version | ||
from typing import TYPE_CHECKING, Any | ||
|
||
if TYPE_CHECKING: | ||
# uses optional tifffile dependency | ||
from .tiff import nd2_to_tiff # noqa: TCH004 | ||
|
||
try: | ||
__version__ = version(__name__) | ||
|
@@ -10,16 +15,17 @@ | |
__author__ = "Talley Lambert" | ||
__email__ = "[email protected]" | ||
__all__ = [ | ||
"__version__", | ||
"AXIS", | ||
"BinaryLayer", | ||
"BinaryLayers", | ||
"imread", | ||
"is_supported_file", | ||
"is_legacy", | ||
"is_supported_file", | ||
"nd2_to_tiff", | ||
"ND2File", | ||
"rescue_nd2", | ||
"structures", | ||
"__version__", | ||
] | ||
|
||
|
||
|
@@ -28,3 +34,11 @@ | |
from ._parse._chunk_decode import rescue_nd2 | ||
from ._util import AXIS, is_legacy, is_supported_file | ||
from .nd2file import ND2File, imread | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
if name == "nd2_to_tiff": | ||
from .tiff import nd2_to_tiff | ||
|
||
return nd2_to_tiff | ||
raise AttributeError(f"module {__name__!r} has no attribute {name!r}") |
Oops, something went wrong.