diff --git a/README.md b/README.md index c0d322d..20adacc 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ pims_nd2 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. -This is implemented on Windows and Linux systems. An SDK for OSX is already included, this is probably easy to implement. +This is implemented on Windows, Linux and OSX systems. Dependencies ------------ @@ -28,8 +28,8 @@ The best way to use the reader is using a context manager. If you do not use a c Metadata access can be done on two levels: reader level and frame level. frames.metadata['mpp'] # calibration in microns per pixel - frames[0].metadata['t_ms'] # timestamp of image in milliseconds + frames[0].metadata['t_ms'] # time of frame in milliseconds Supporting Grant ---------------- -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). +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). diff --git a/pims_nd2/ND2SDK.py b/pims_nd2/ND2SDK.py index cad2313..4254024 100644 --- a/pims_nd2/ND2SDK.py +++ b/pims_nd2/ND2SDK.py @@ -8,8 +8,9 @@ nd2 = cdll.LoadLibrary(os.path.join(os.path.dirname(__file__), 'ND2SDK', 'linux', 'libnd2ReadSDK.so')) elif platform == "darwin": - raise OSError("Unsupported OS. The ND2SDK for OSX is included, " - "please try to implement!") + nd2 = cdll.LoadLibrary(os.path.join(os.path.dirname(__file__), 'ND2SDK', + 'osx', 'nd2sdk.framework', 'Versions', + '1', 'nd2sdk')) elif platform == "win32": bitsize = sizeof(c_void_p) * 8 if bitsize == 32: diff --git a/pims_nd2/ND2SDK/osx/nd2sdk.framework/Versions/1/Headers/._nd2ReadSDK.h b/pims_nd2/ND2SDK/osx/nd2sdk.framework/Versions/1/Headers/._nd2ReadSDK.h new file mode 100644 index 0000000..14f037e Binary files /dev/null and b/pims_nd2/ND2SDK/osx/nd2sdk.framework/Versions/1/Headers/._nd2ReadSDK.h differ diff --git a/pims_nd2/ND2SDK/osx/nd2sdk.framework/Versions/1/nd2sdk b/pims_nd2/ND2SDK/osx/nd2sdk.framework/Versions/1/nd2sdk index 8f79be1..da7cdf8 100644 Binary files a/pims_nd2/ND2SDK/osx/nd2sdk.framework/Versions/1/nd2sdk and b/pims_nd2/ND2SDK/osx/nd2sdk.framework/Versions/1/nd2sdk differ diff --git a/pims_nd2/nd2reader.py b/pims_nd2/nd2reader.py index 63be103..51a5146 100644 --- a/pims_nd2/nd2reader.py +++ b/pims_nd2/nd2reader.py @@ -224,6 +224,7 @@ def metadata(self): 'plane_count': bufmd.uiPlaneCount, 'angle': bufmd.dAngle, 'calibration_um': bufmd.dCalibration, + 'time_start_jdn': bufmd.dTimeStart, 'time_start': h.jdn_to_datetime_local(bufmd.dTimeStart), 'time_start_utc': h.jdn_to_datetime_utc(bufmd.dTimeStart), 'objective': bufmd.wszObjectiveName, diff --git a/setup.py b/setup.py index 0889d0c..2613023 100644 --- a/setup.py +++ b/setup.py @@ -15,21 +15,27 @@ setup_parameters = dict( name="pims_nd2", - version="0.3", + version="0.4", description="ND2SDK wrapper for PIMS", author="Casper van der Wel", install_requires=['pims>=0.3'], author_email="caspervdw@gmail.com", url="https://github.com/soft-matter/pims_nd2", - download_url="https://github.com/soft-matter/pims_nd2/tarball/0.3", + download_url="https://github.com/soft-matter/pims_nd2/tarball/0.4", packages=['pims_nd2'], include_package_data=True, - platforms=[ -# 'Operating System :: MacOS :: MacOS X', - 'Operating System :: Microsoft :: Windows :: Windows 7', - 'Operating System :: Microsoft :: Windows :: Windows Vista', - 'Operating System :: POSIX :: Linux', - ], + classifiers=["Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Programming Language :: C", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Operating System :: Unix", + "Operating System :: MacOS"], + platforms=['MacOS X', 'Windows', 'Linux CentOs 6.5/7', 'Linux Debian 7/8'], long_description=descr) setup(**setup_parameters)