32
32
33
33
# Standard Library Imports
34
34
import logging
35
+ from typing import Any , Dict
35
36
36
37
# Third Party Imports
37
38
import numpy .typing as npt
38
39
39
40
# Local Imports
40
- from multiprocessing .managers import DictProxy
41
41
42
42
# Logger Setup
43
43
p = __name__ .split ("." )[1 ]
@@ -75,10 +75,10 @@ def __init__(self, file_name: str = "", mode: str = "w") -> None:
75
75
#: npt.ArrayLike: Pointer to the metadata.
76
76
self .metadata = None # Expect a metadata object
77
77
78
- #: str: Mode to open the file in. Can be 'r' or 'w'.
78
+ # str: Mode to open the file in. Can be 'r' or 'w'.
79
79
self ._mode = None
80
80
81
- #: bool: Has the data source been closed?
81
+ # bool: Has the data source been closed?
82
82
self ._closed = True
83
83
84
84
#: int: Number of bits per pixel.
@@ -99,17 +99,20 @@ def __init__(self, file_name: str = "", mode: str = "w") -> None:
99
99
self .dc = 1 # step size between channels, should always be 1
100
100
101
101
#: int: Size of the data source in x dimension.
102
+ self .shape_x = 1
103
+
102
104
#: int: Size of the data source in y dimension.
105
+ self .shape_y = 1
106
+
103
107
#: int: Size of the data source in z dimension.
108
+ self .shape_z = 1
109
+
104
110
#: int: Size of the data source in t dimension.
111
+ self .shape_t = 1
112
+
105
113
#: int: Size of the data source in c dimension.
106
- self .shape_x , self .shape_y , self .shape_z , self .shape_t , self .shape_c = (
107
- 1 ,
108
- 1 ,
109
- 1 ,
110
- 1 ,
111
- 1 ,
112
- )
114
+ self .shape_c = 1
115
+
113
116
#: int: Number of positions in the data source.
114
117
self .positions = 1
115
118
@@ -121,14 +124,14 @@ def __init__(self, file_name: str = "", mode: str = "w") -> None:
121
124
122
125
@property
123
126
def nbytes (self ) -> int :
124
- """Getter for the size of this data source in bytes."
127
+ """Getter for the size of this data source in bytes.
125
128
126
129
Does not account for pyramidal data sources. That process is handled by the
127
130
bdv_data_source class, which is a child of this class.
128
131
129
132
Returns
130
133
-------
131
- int
134
+ total_bytes : int
132
135
Size of this data source in bytes.
133
136
"""
134
137
total_bits = (
@@ -216,13 +219,13 @@ def setup(self):
216
219
pass
217
220
218
221
def set_metadata_from_configuration_experiment (
219
- self , configuration : DictProxy , microscope_name : str = None
222
+ self , configuration : Dict [ str , Any ] , microscope_name : str = None
220
223
) -> None :
221
224
"""Sets the metadata from according to the microscope configuration.
222
225
223
226
Parameters
224
227
----------
225
- configuration : DictProxy
228
+ configuration : Dict[str, Any]
226
229
Configuration experiment.
227
230
microscope_name : str
228
231
The microscope name
0 commit comments