Skip to content

Commit 14a7af0

Browse files
committed
Merge pull request #13 from caspervdw/osx-implement
ENH OSX implementation
2 parents 7c57f85 + e8835e2 commit 14a7af0

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pims_nd2
33

44
This package lets [pims](https://github.com/soft-matter/pims) interface with the [ND2SDK](http://www.nd2sdk.com) for fast reading of Nikon *.nd2 files.
55

6-
This is implemented on Windows and Linux systems. An SDK for OSX is already included, this is probably easy to implement.
6+
This is implemented on Windows, Linux and OSX systems.
77

88
Dependencies
99
------------
@@ -28,8 +28,8 @@ The best way to use the reader is using a context manager. If you do not use a c
2828
Metadata access can be done on two levels: reader level and frame level.
2929

3030
frames.metadata['mpp'] # calibration in microns per pixel
31-
frames[0].metadata['t_ms'] # timestamp of image in milliseconds
31+
frames[0].metadata['t_ms'] # time of frame in milliseconds
3232

3333
Supporting Grant
3434
----------------
35-
This reader was developed by Casper van der Wel, as part of his PhD thesis work in Daniela Krafts group at the Huygens-Kamerlingh-Onnes laboratory, Institute of Physics, Leiden University, The Netherlands. This work was supported by the Netherlands Organisation for Scientific Research (NWO/OCW).
35+
This reader was developed by Casper van der Wel, as part of his PhD thesis work in Daniela Kraft's group at the Huygens-Kamerlingh-Onnes laboratory, Institute of Physics, Leiden University, The Netherlands. This work was supported by the Netherlands Organisation for Scientific Research (NWO/OCW).

pims_nd2/ND2SDK.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
nd2 = cdll.LoadLibrary(os.path.join(os.path.dirname(__file__), 'ND2SDK',
99
'linux', 'libnd2ReadSDK.so'))
1010
elif platform == "darwin":
11-
raise OSError("Unsupported OS. The ND2SDK for OSX is included, "
12-
"please try to implement!")
11+
nd2 = cdll.LoadLibrary(os.path.join(os.path.dirname(__file__), 'ND2SDK',
12+
'osx', 'nd2sdk.framework', 'Versions',
13+
'1', 'nd2sdk'))
1314
elif platform == "win32":
1415
bitsize = sizeof(c_void_p) * 8
1516
if bitsize == 32:
Binary file not shown.
0 Bytes
Binary file not shown.

pims_nd2/nd2reader.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ def metadata(self):
224224
'plane_count': bufmd.uiPlaneCount,
225225
'angle': bufmd.dAngle,
226226
'calibration_um': bufmd.dCalibration,
227+
'time_start_jdn': bufmd.dTimeStart,
227228
'time_start': h.jdn_to_datetime_local(bufmd.dTimeStart),
228229
'time_start_utc': h.jdn_to_datetime_utc(bufmd.dTimeStart),
229230
'objective': bufmd.wszObjectiveName,

setup.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,27 @@
1515

1616
setup_parameters = dict(
1717
name="pims_nd2",
18-
version="0.3",
18+
version="0.4",
1919
description="ND2SDK wrapper for PIMS",
2020
author="Casper van der Wel",
2121
install_requires=['pims>=0.3'],
2222
author_email="caspervdw@gmail.com",
2323
url="https://github.com/soft-matter/pims_nd2",
24-
download_url="https://github.com/soft-matter/pims_nd2/tarball/0.3",
24+
download_url="https://github.com/soft-matter/pims_nd2/tarball/0.4",
2525
packages=['pims_nd2'],
2626
include_package_data=True,
27-
platforms=[
28-
# 'Operating System :: MacOS :: MacOS X',
29-
'Operating System :: Microsoft :: Windows :: Windows 7',
30-
'Operating System :: Microsoft :: Windows :: Windows Vista',
31-
'Operating System :: POSIX :: Linux',
32-
],
27+
classifiers=["Development Status :: 4 - Beta",
28+
"Intended Audience :: Science/Research",
29+
"Programming Language :: C",
30+
"Programming Language :: Python",
31+
"Programming Language :: Python :: 2",
32+
"Programming Language :: Python :: 3",
33+
"Topic :: Scientific/Engineering",
34+
"Operating System :: Microsoft :: Windows",
35+
"Operating System :: POSIX",
36+
"Operating System :: Unix",
37+
"Operating System :: MacOS"],
38+
platforms=['MacOS X', 'Windows', 'Linux CentOs 6.5/7', 'Linux Debian 7/8'],
3339
long_description=descr)
3440

3541
setup(**setup_parameters)

0 commit comments

Comments
 (0)