66import hdf5plugin
77import re
88import dask .array as da
9+ import warnings
910
1011def TCFile (tcfname :str , imgtype , channel = 0 ):
12+ warnings .warn (
13+ "TCFile function is deprecated and will be removed by the end of 2026. "
14+ "Please use TCFZarrStore from TCFile.zarr_store instead for a more flexible "
15+ "and standards-compliant zarr interface. "
16+ "Example: from TCFile.zarr_store import TCFZarrStore; store = TCFZarrStore('file.TCF')" ,
17+ DeprecationWarning ,
18+ stacklevel = 2
19+ )
1120 if imgtype == '3D' :
1221 return TCFileRI3D (tcfname )
1322 if imgtype == '2DMIP' :
@@ -16,7 +25,7 @@ def TCFile(tcfname:str, imgtype, channel=0):
1625 return TCFileBF (tcfname )
1726 if imgtype == '3DFL' :
1827 return TCFileFL3D (tcfname , channel )
19- raise ValueError ('Unsupported imgtype: Supported imgtypes are "3D","2DMIP", and "BF "' )
28+ raise ValueError ('Unsupported imgtype: Supported imgtypes are "3D", "2DMIP", "BF", and "3DFL "' )
2029
2130class TCFileAbstract (Sequence ):
2231 '''
@@ -247,9 +256,8 @@ def __getitem__(self, key: int) -> np.ndarray:
247256class TCFileFL3D (TCFileAbstract ):
248257 imgtype = '3DFL'
249258 data_ndim = 3
250- channel = 0
251259
252- def __init__ (self , tcfname : str , channel = 0 ):
260+ def __init__ (self , tcfname : str , channel : int = 0 ):
253261 self .channel = channel
254262 super ().__init__ (tcfname )
255263 with h5py .File (self .tcfname ) as f :
0 commit comments