Browse Source

Merge pull request #128 from jimrybarski/117-xml

resolves #117. The XML-formatted strings in a few raw_metadata are no…
feature/load_slices
Jim Rybarski 9 years ago
parent
commit
001780b699
2 changed files with 7 additions and 5 deletions
  1. +5
    -4
      nd2reader/parser/v3.py
  2. +2
    -1
      setup.py

+ 5
- 4
nd2reader/parser/v3.py View File

@ -9,6 +9,7 @@ from nd2reader.common.v3 import read_chunk, read_array, read_metadata
import re import re
import six import six
import struct import struct
import xmltodict
def ignore_missing(func): def ignore_missing(func):
@ -83,22 +84,22 @@ class V3RawMetadata(object):
@property @property
@ignore_missing @ignore_missing
def lut_data(self): def lut_data(self):
return read_chunk(self._fh, self._label_map.lut_data)
return xmltodict.parse(read_chunk(self._fh, self._label_map.lut_data))
@property @property
@ignore_missing @ignore_missing
def grabber_settings(self): def grabber_settings(self):
return read_chunk(self._fh, self._label_map.grabber_settings)
return xmltodict.parse(read_chunk(self._fh, self._label_map.grabber_settings))
@property @property
@ignore_missing @ignore_missing
def custom_data(self): def custom_data(self):
return read_chunk(self._fh, self._label_map.custom_data)
return xmltodict.parse(read_chunk(self._fh, self._label_map.custom_data))
@property @property
@ignore_missing @ignore_missing
def app_info(self): def app_info(self):
return read_chunk(self._fh, self._label_map.app_info)
return xmltodict.parse(read_chunk(self._fh, self._label_map.app_info))
@property @property
@ignore_missing @ignore_missing


+ 2
- 1
setup.py View File

@ -7,7 +7,8 @@ setup(
packages=['nd2reader', 'nd2reader.model', 'nd2reader.driver', 'nd2reader.parser', 'nd2reader.common'], packages=['nd2reader', 'nd2reader.model', 'nd2reader.driver', 'nd2reader.parser', 'nd2reader.common'],
install_requires=[ install_requires=[
'numpy>=1.6.2, <2.0', 'numpy>=1.6.2, <2.0',
'six>=1.4, <2.0'
'six>=1.4, <2.0',
'xmltodict>=0.9.2, <1.0'
], ],
version=VERSION, version=VERSION,
description='A tool for reading ND2 files produced by NIS Elements', description='A tool for reading ND2 files produced by NIS Elements',


Loading…
Cancel
Save