Skip to content

Commit 4582543

Browse files
authored
Add distance z to layout (#147)
* switch to openjdk8 and force maven to use it for travis tests * Added distanceZ attribute to layout component of tile spec to capture differing depth of FIBSEM tiles. * add IntelliJ (PyCharm) editor files to .gitignore * Bump version: 2.1.1 → 2.2.0 * Bump version: 2.2.0 → 2.3.0
1 parent a12126e commit 4582543

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[bumpversion]
2-
current_version = 2.1.1
2+
current_version = 2.3.0
33
commit = True
44
tag = True
55

66
[bumpversion:file:renderapi/__init__.py]
7-

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ htmlcov/
1313
.cache
1414
.tox
1515
.pytest_cache
16-
.vscode
16+
.vscode
17+
.idea/
18+
*.iml

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ addons:
1717
- libopenblas-base
1818
- libopenblas-dev
1919
- gfortran
20-
- oracle-java9-set-default
20+
- openjdk-8-jdk
2121
- maven
2222
install:
2323
- pip install codecov
2424
- pip install -r requirements.txt
2525
- pip install -r test_requirements.txt
2626
before_install:
2727
- git clone --depth 1 https://github.com/saalfeldlab/render.git render -b master
28+
- export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre"
29+
- mvn -version
2830
- mvn package -pl render-ws-java-client -am -DskipTests -f render/pom.xml
2931
- export RENDER_CLIENT_JAR=`readlink -m $TRAVIS_BUILD_DIR/render/render-ws-java-client/target/render-ws-java-client-*-standalone.jar`
3032
- export RENDER_WS_JAVA_CLIENT_EXAMPLE_DATA=`readlink -m $TRAVIS_BUILD_DIR/render/render-ws-java-client/src/main/resources`

renderapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from .render import connect
1414
from .render import Render
1515

16-
__version__ = "2.1.1"
16+
__version__ = "2.3.0"
1717
__all__ = ['render', 'client', 'tilespec', 'errors',
1818
'stack', 'image', 'pointmatch', 'coordinate',
1919
'connect', 'transform', 'resolvedtiles', 'Render']

renderapi/layout.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ class Layout:
2121
angle of camera when this was taken
2222
pixelsize : float
2323
effective size of pixels (in units of choice)
24+
distanceZ : float
25+
distance (in units of choice) from prior layer
2426
2527
"""
2628
def __init__(self, sectionId=None, scopeId=None, cameraId=None,
2729
imageRow=None, imageCol=None, stageX=None, stageY=None,
2830
rotation=None, pixelsize=None,
29-
force_pixelsize=True, **kwargs):
31+
force_pixelsize=True, distanceZ=None, **kwargs):
3032
"""Initialize Layout
3133
3234
Parameters
@@ -51,6 +53,8 @@ def __init__(self, sectionId=None, scopeId=None, cameraId=None,
5153
effective size of pixels (in units of choice)
5254
force_pixelsize : bool
5355
whether to default pixelsize to 0.1
56+
distanceZ : float
57+
distance (in units of choice) from prior layer
5458
5559
"""
5660
self.sectionId = sectionId
@@ -64,6 +68,7 @@ def __init__(self, sectionId=None, scopeId=None, cameraId=None,
6468
if force_pixelsize:
6569
pixelsize = 0.100 if pixelsize is None else pixelsize
6670
self.pixelsize = pixelsize
71+
self.distanceZ = distanceZ
6772

6873
def to_dict(self):
6974
"""return a dictionary representation of this object
@@ -83,6 +88,7 @@ def to_dict(self):
8388
d['stageY'] = self.stageY
8489
d['rotation'] = self.rotation
8590
d['pixelsize'] = self.pixelsize
91+
d['distanceZ'] = self.distanceZ
8692
d = {k: v for k, v in d.items() if v is not None}
8793
return d
8894

@@ -104,3 +110,4 @@ def from_dict(self, d):
104110
self.stageY = d.get('stageY')
105111
self.rotation = d.get('rotation')
106112
self.pixelsize = d.get('pixelsize')
113+
self.distanceZ = d.get('distanceZ')

0 commit comments

Comments
 (0)