|
9 | 9 | from __future__ import division, print_function, absolute_import
|
10 | 10 |
|
11 | 11 | from distutils.version import LooseVersion
|
12 |
| -from xml.parsers.expat import ParserCreate, ExpatError |
13 | 12 |
|
14 | 13 | import numpy as np
|
15 | 14 |
|
16 |
| -from .cifti import (CiftiImage, CiftiHeader, CiftiMetaData, CiftiLabel, |
| 15 | +from .cifti import (CiftiHeader, CiftiMetaData, CiftiLabel, |
17 | 16 | CiftiLabelTable, CiftiVertexIndices,
|
18 | 17 | CiftiVoxelIndicesIJK, CiftiBrainModel, CiftiMatrix,
|
19 | 18 | CiftiMatrixIndicesMap, CiftiNamedMap, CiftiParcel,
|
20 | 19 | CiftiSurface, CiftiTransformationMatrixVoxelIndicesIJKtoXYZ,
|
21 | 20 | CiftiVertices, CiftiVolume, CIFTI_BrainStructures,
|
22 |
| - CIFTI_MODEL_TYPES, |
23 |
| - CiftiDenseDataSeries) |
| 21 | + CIFTI_MODEL_TYPES) # CiftiDenseDataSeries |
24 | 22 | from .. import xmlutils as xml
|
25 | 23 | from ..externals import inflection
|
26 | 24 | from ..externals.six import BytesIO
|
@@ -108,8 +106,8 @@ def __init__(self, dataobj, affine, header=None,
|
108 | 106 |
|
109 | 107 | # Get cifti header from extension
|
110 | 108 | self.cifti_img = reduce(lambda accum, newval: newval
|
111 |
| - if isinstance(newval, CiftiExtension) |
112 |
| - else accum, |
| 109 | + if isinstance(newval, CiftiExtension) |
| 110 | + else accum, |
113 | 111 | self.get_header().extensions, None)
|
114 | 112 | if self.cifti_img is None:
|
115 | 113 | raise ValueError('Nifti2 header does not contain a CIFTI '
|
@@ -175,8 +173,9 @@ def StartElementHandler(self, name, attrs):
|
175 | 173 |
|
176 | 174 | elif name == 'MatrixIndicesMap':
|
177 | 175 | self.fsm_state.append('MatrixIndicesMap')
|
178 |
| - mim = CiftiMatrixIndicesMap(applies_to_matrix_dimension=int(attrs["AppliesToMatrixDimension"]), |
179 |
| - indices_map_to_data_type=attrs["IndicesMapToDataType"]) |
| 176 | + mim = CiftiMatrixIndicesMap( |
| 177 | + applies_to_matrix_dimension=int(attrs["AppliesToMatrixDimension"]), |
| 178 | + indices_map_to_data_type=attrs["IndicesMapToDataType"]) |
180 | 179 | for key, dtype in [("NumberOfSeriesPoints", int),
|
181 | 180 | ("SeriesExponent", int),
|
182 | 181 | ("SeriesStart", float),
|
|
0 commit comments