From 3e4845b3099ba1dcec1432bc91ae4c02a31b5bf1 Mon Sep 17 00:00:00 2001 From: Ruben Verweij Date: Thu, 19 Sep 2019 09:23:48 +0200 Subject: [PATCH] Fallback function for old get_frame_2D function --- nd2reader/reader.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nd2reader/reader.py b/nd2reader/reader.py index fe263d7..714dc0e 100644 --- a/nd2reader/reader.py +++ b/nd2reader/reader.py @@ -52,6 +52,11 @@ class ND2Reader(FramesSequenceND): except KeyError: return 0 + def get_frame_2D(self, c=0, t=0, z=0, x=0, y=0, v=0): + """Fallback function for backwards compatibility + """ + return get_frame_vczyx(v=v, c=c, t=t, z=z, x=x, y=y) + def get_frame_vczyx(self, v=None, c=None, t=None, z=None, x=None, y=None): x = self.metadata["width"] if x <= 0 else x y = self.metadata["height"] if y <= 0 else y