From 12e6199d52a1e4b66dcd1cb34595904ce4891b65 Mon Sep 17 00:00:00 2001 From: Aaron Ponti Date: Wed, 8 Dec 2021 09:51:09 +0100 Subject: [PATCH 1/4] Fix bug in getExtends(). --- pIceImarisConnector/pIceImarisConnector.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pIceImarisConnector/pIceImarisConnector.py b/pIceImarisConnector/pIceImarisConnector.py index 1b5c64c..dfc6e2b 100644 --- a/pIceImarisConnector/pIceImarisConnector.py +++ b/pIceImarisConnector/pIceImarisConnector.py @@ -991,13 +991,13 @@ def getExtends(self): :return: DataSet extends. :rtype: tuple - The extends tuple is: ``(minX, minY, minZ, maxX, maxY, maxZ)``, where: + The extends tuple is: ``(minX, maxX, minY, maxY, minZ, maxZ)``, where: * minX : min extend along X dimension, - * minY : min extend along Y dimension, - * minZ : min extend along Z dimension, * maxX : max extend along X dimension, + * minY : min extend along Y dimension, * maxY : max extend along Y dimension, + * minZ : min extend along Z dimension, * maxZ : max extend along Z dimension. """ @@ -1007,7 +1007,7 @@ def getExtends(self): # Wrap the extends into a tuple return (self._mImarisApplication.GetDataSet().GetExtendMinX(), - self._mImarisApplication.GetDataSet().GetExtendMaxY(), + self._mImarisApplication.GetDataSet().GetExtendMaxX(), self._mImarisApplication.GetDataSet().GetExtendMinY(), self._mImarisApplication.GetDataSet().GetExtendMaxY(), self._mImarisApplication.GetDataSet().GetExtendMinZ(), From b3442ea928ff62b6ad80fcfc5061c98658ce0930 Mon Sep 17 00:00:00 2001 From: Aaron Ponti Date: Wed, 8 Dec 2021 09:59:15 +0100 Subject: [PATCH 2/4] Increase version to 0.4.1 and expose it at the package level. --- pIceImarisConnector/__init__.py | 1 + pIceImarisConnector/pIceImarisConnector.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pIceImarisConnector/__init__.py b/pIceImarisConnector/__init__.py index 7c1e974..ac1a808 100644 --- a/pIceImarisConnector/__init__.py +++ b/pIceImarisConnector/__init__.py @@ -1 +1,2 @@ from .pIceImarisConnector import pIceImarisConnector +__version__ = pIceImarisConnector.__version__ \ No newline at end of file diff --git a/pIceImarisConnector/pIceImarisConnector.py b/pIceImarisConnector/pIceImarisConnector.py index dfc6e2b..6e6e7b7 100644 --- a/pIceImarisConnector/pIceImarisConnector.py +++ b/pIceImarisConnector/pIceImarisConnector.py @@ -46,7 +46,7 @@ class pIceImarisConnector(object): """ # pIceImarisConnector version - __version__ = "0.4.0" + __version__ = "0.4.1" # Imaris-related paths _mImarisPath = "" From a084cb2b5c4a19baf7de022fe0cdf4f695f23419 Mon Sep 17 00:00:00 2001 From: Aaron Ponti Date: Wed, 8 Dec 2021 12:02:46 +0100 Subject: [PATCH 3/4] Fix TestPIcePyramidalCellXT after bug fix in getExtends(). --- pIceImarisConnector/test/TestPIcePyramidalCellXT.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pIceImarisConnector/test/TestPIcePyramidalCellXT.py b/pIceImarisConnector/test/TestPIcePyramidalCellXT.py index 550f40c..bbbb515 100644 --- a/pIceImarisConnector/test/TestPIcePyramidalCellXT.py +++ b/pIceImarisConnector/test/TestPIcePyramidalCellXT.py @@ -20,7 +20,7 @@ def TestPIcePyramidalCellXT(aImarisId): # =======================================================s================== print('Load file...') conn.loadPyramidalCellTestDataset() - + # Check that there is something loaded # ========================================================================= print('Test that the file was loaded...') @@ -29,7 +29,7 @@ def TestPIcePyramidalCellXT(aImarisId): # Check the extends # ========================================================================= print('Check the dataset extends...') - EXTENDS = (-0.1140, 57.8398, -0.1140, 57.8398, -0.1510, 20.6310) + EXTENDS = (-0.1140, 57.8410, -0.1140, 57.8398, -0.1510, 20.6310) extends = conn.getExtends() assert(all([abs(x - y) < 1e-4 for x, y in zip(EXTENDS, extends)])) @@ -313,7 +313,7 @@ def TestPIcePyramidalCellXT(aImarisId): print('Send volume (force dataset creation)...') stack = np.zeros((100, 200, 50), dtype = np.uint16) conn.setDataVolume(stack, 0, 0) - + # Test retrieving volume and slice for a non 8-bit dataset print('Test retrieving volume and slice for a non 8-bit dataset...') volume16 = conn.getDataVolume(0, 0) From 1e2904bb88b7f14b6890ee466e0034cfa1db04fd Mon Sep 17 00:00:00 2001 From: Aaron Ponti Date: Fri, 10 Dec 2021 17:37:22 +0100 Subject: [PATCH 4/4] Update documentation. --- docs/requirements.txt | 1 + docs/usage.rst | 8 ++++++-- pIceImarisConnector/pIceImarisConnector.py | 5 +---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 2512274..33ca1c9 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,3 @@ numpy +sphinx sphinx_rtd_theme diff --git a/docs/usage.rst b/docs/usage.rst index afc5a26..a85ed79 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -40,6 +40,10 @@ In an Imaris XT file: From a python console: +.. note:: + + When starting Imaris, make sure to activate the ImarisXT:IPSS license! + .. code-block:: python # If Imaris is already running @@ -52,7 +56,7 @@ From a python console: Out[3]: pIceImarisConnector: connected to Imaris. In[4]: print(conn.mImarisApplication.GetVersion()) - Imaris x64 9.5.1 [Nov 27 2019] + Imaris x64 9.7.2 [Mar 24 2021] .. code-block:: python @@ -67,6 +71,6 @@ From a python console: # Remember to activate the ImarisXT license! In[4]: print(conn.mImarisApplication.GetVersion()) - Imaris x64 9.5.1 [Nov 27 2019] + Imaris x64 9.7.2 [Mar 24 2021] In[5]: conn.closeImaris(True) diff --git a/pIceImarisConnector/pIceImarisConnector.py b/pIceImarisConnector/pIceImarisConnector.py index 6e6e7b7..41ffc09 100644 --- a/pIceImarisConnector/pIceImarisConnector.py +++ b/pIceImarisConnector/pIceImarisConnector.py @@ -13,10 +13,7 @@ class pIceImarisConnector(object): - """pIceImarisConnector is a simple Python class that eases communication between Bitplane Imaris and Python - using the Imaris XT interface. - - *Copyright Aaron Ponti, 2013 - 2020.* + """pIceImarisConnector is a simple Python class that eases communication between Bitplane Imaris and Python using the Imaris XT interface. :param imarisApplication: (optional) if omitted, a pIceImarisConnector object is created that is not connected to any Imaris instance.