Skip to content

Commit

Permalink
Merge branch 'devel' into -master-.
Browse files Browse the repository at this point in the history
  • Loading branch information
aarpon committed Dec 10, 2021
2 parents 3b663be + 1e2904b commit a97e5ed
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
numpy
sphinx
sphinx_rtd_theme
8 changes: 6 additions & 2 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)
1 change: 1 addition & 0 deletions pIceImarisConnector/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .pIceImarisConnector import pIceImarisConnector
__version__ = pIceImarisConnector.__version__
15 changes: 6 additions & 9 deletions pIceImarisConnector/pIceImarisConnector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -46,7 +43,7 @@ class pIceImarisConnector(object):
"""

# pIceImarisConnector version
__version__ = "0.4.0"
__version__ = "0.4.1"

# Imaris-related paths
_mImarisPath = ""
Expand Down Expand Up @@ -991,13 +988,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.
"""

Expand All @@ -1007,7 +1004,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(),
Expand Down
6 changes: 3 additions & 3 deletions pIceImarisConnector/test/TestPIcePyramidalCellXT.py
Original file line number Diff line number Diff line change
Expand Up @@ -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...')
Expand All @@ -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)]))

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a97e5ed

Please sign in to comment.