Commit dfcb8b76 authored by Sean Fitzgibbon's avatar Sean Fitzgibbon
Browse files

bugfix in neurolucida reader

parent 8c599e4c
......@@ -47,7 +47,7 @@ UNWANTED_SECTION_NAMES = [
'Cross', 'Dot', 'DoubleCircle', 'FilledCircle', 'FilledDownTriangle',
'FilledSquare', 'FilledStar', 'FilledUpTriangle', 'FilledUpTriangle', 'Flower',
'Flower2', 'OpenCircle', 'OpenDiamond', 'OpenDownTriangle', 'OpenSquare', 'OpenStar',
'OpenUpTriangle', 'Plus', 'ShadedStar', 'Splat', 'TriStar',
'OpenUpTriangle', 'Plus', 'ShadedStar', 'Splat', 'TriStar', 'Sections', 'SSM', 'SSM2',
]
UNWANTED_SECTIONS = {name: True for name in UNWANTED_SECTION_NAMES}
......@@ -181,13 +181,12 @@ def _flatten_subsection(subsection, _type, offset, parent):
def _to_data(sections):
cells = []
contour = []
xyz = []
for section in sections:
if section[0] == 'Asterisk': # Cell
cells.append( np.asarray(section[2],dtype=np.float64) )
cells.append( np.asarray(section[2][:4],dtype=np.float64) )
else:
contour.append((section[0].replace('"',''), np.asarray(section[1:],dtype=np.float64)))
contour.append((section[0].replace('"',''), np.asarray([s[:4] for s in section[1:]],dtype=np.float64)))
cells = np.asarray(cells)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment