66# copyright and license terms.
77#
88### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9- ''' Read / write access to CIfTI2 image format
9+ ''' Read / write access to CIFTI-2 image format
1010
1111Format of the NIFTI2 container format described here:
1212
1313 http://www.nitrc.org/forum/message.php?msg_id=3738
1414
15- Definition of the CIFTI2 header format and file extensions can be found at:
15+ Definition of the CIFTI-2 header format and file extensions can be found at:
1616
1717 http://www.nitrc.org/projects/cifti
1818'''
@@ -39,7 +39,7 @@ def _float_01(val):
3939
4040
4141class Cifti2HeaderError (Exception ):
42- """ Error in CIFTI2 header
42+ """ Error in CIFTI-2 header
4343 """
4444
4545
@@ -175,7 +175,7 @@ def _to_xml_element(self):
175175
176176
177177class Cifti2LabelTable (xml .XmlSerializable , MutableMapping ):
178- """ CIFTI2 label table: a sequence of ``Cifti2Label``s
178+ """ CIFTI-2 label table: a sequence of ``Cifti2Label``s
179179
180180 * Description - Used by NamedMap when IndicesMapToDataType is
181181 "CIFTI_INDEX_TYPE_LABELS" in order to associate names and display colors
@@ -233,7 +233,7 @@ def _to_xml_element(self):
233233
234234
235235class Cifti2Label (xml .XmlSerializable ):
236- """ CIFTI2 label: association of integer key with a name and RGBA values
236+ """ CIFTI-2 label: association of integer key with a name and RGBA values
237237
238238 For all color components, value is floating point with range 0.0 to 1.0.
239239
@@ -311,7 +311,7 @@ def _to_xml_element(self):
311311
312312
313313class Cifti2NamedMap (xml .XmlSerializable ):
314- """CIFTI2 named map: association of name and optional data with a map index
314+ """CIFTI-2 named map: association of name and optional data with a map index
315315
316316 Associates a name, optional metadata, and possibly a LabelTable with an
317317 index in a map.
@@ -429,7 +429,7 @@ def _to_xml_element(self):
429429
430430
431431class Cifti2VoxelIndicesIJK (xml .XmlSerializable , MutableSequence ):
432- """CIFTI2 VoxelIndicesIJK: Set of voxel indices contained in a structure
432+ """CIFTI-2 VoxelIndicesIJK: Set of voxel indices contained in a structure
433433
434434 * Description - Identifies the voxels that model a brain structure, or
435435 participate in a parcel. Note that when this is a child of BrainModel,
@@ -511,7 +511,7 @@ def _to_xml_element(self):
511511
512512
513513class Cifti2Vertices (xml .XmlSerializable , MutableSequence ):
514- """CIFTI2 vertices - association of brain structure and a list of vertices
514+ """CIFTI-2 vertices - association of brain structure and a list of vertices
515515
516516 * Description - Contains a BrainStructure type and a list of vertex indices
517517 within a Parcel.
@@ -577,7 +577,7 @@ def _to_xml_element(self):
577577
578578
579579class Cifti2Parcel (xml .XmlSerializable ):
580- """CIFTI2 parcel: association of a name with vertices and/or voxels
580+ """CIFTI-2 parcel: association of a name with vertices and/or voxels
581581
582582 * Description - Associates a name, plus vertices and/or voxels, with an
583583 index.
@@ -692,7 +692,7 @@ def _to_xml_element(self):
692692
693693
694694class Cifti2Volume (xml .XmlSerializable ):
695- """CIFTI2 volume: information about a volume for mappings that use voxels
695+ """CIFTI-2 volume: information about a volume for mappings that use voxels
696696
697697 * Description - Provides information about the volume for any mappings that
698698 use voxels.
@@ -735,7 +735,7 @@ def _to_xml_element(self):
735735
736736
737737class Cifti2VertexIndices (xml .XmlSerializable , MutableSequence ):
738- """CIFTI2 vertex indices: vertex indices for an associated brain model
738+ """CIFTI-2 vertex indices: vertex indices for an associated brain model
739739
740740 The vertex indices (which are independent for each surface, and
741741 zero-based) that are used in this brain model[.] The parent
@@ -1078,7 +1078,7 @@ def _to_xml_element(self):
10781078
10791079
10801080class Cifti2Matrix (xml .XmlSerializable , MutableSequence ):
1081- """ CIFTI2 Matrix object
1081+ """ CIFTI-2 Matrix object
10821082
10831083 This is a list-like container where the elements are instances of
10841084 :class:`Cifti2MatrixIndicesMap`.
@@ -1210,7 +1210,7 @@ def _to_xml_element(self):
12101210
12111211
12121212class Cifti2Header (FileBasedHeader , xml .XmlSerializable ):
1213- ''' Class for CIFTI2 header extension '''
1213+ ''' Class for CIFTI-2 header extension '''
12141214
12151215 def __init__ (self , matrix = None , version = "2.0" ):
12161216 FileBasedHeader .__init__ (self )
@@ -1301,7 +1301,7 @@ def from_axes(cls, axes):
13011301
13021302
13031303class Cifti2Image (DataobjImage ):
1304- """ Class for single file CIFTI2 format image
1304+ """ Class for single file CIFTI-2 format image
13051305 """
13061306 header_class = Cifti2Header
13071307 valid_exts = Nifti2Image .valid_exts
@@ -1329,7 +1329,7 @@ def __init__(self,
13291329 returns an array from ``np.asanyarray``. It should have a
13301330 ``shape`` attribute or property.
13311331 header : Cifti2Header instance or Sequence[cifti2_axes.Axis]
1332- Header with data for / from XML part of CIFTI2 format.
1332+ Header with data for / from XML part of CIFTI-2 format.
13331333 Alternatively a sequence of cifti2_axes.Axis objects can be provided
13341334 describing each dimension of the array.
13351335 nifti_header : None or mapping or NIfTI2 header instance, optional
@@ -1356,7 +1356,7 @@ def nifti_header(self):
13561356
13571357 @classmethod
13581358 def from_file_map (klass , file_map ):
1359- """ Load a CIFTI2 image from a file_map
1359+ """ Load a CIFTI-2 image from a file_map
13601360
13611361 Parameters
13621362 ----------
@@ -1376,7 +1376,7 @@ def from_file_map(klass, file_map):
13761376 cifti_header = item .get_content ()
13771377 break
13781378 else :
1379- raise ValueError ('NIfTI2 header does not contain a CIFTI2 '
1379+ raise ValueError ('NIfTI2 header does not contain a CIFTI-2 '
13801380 'extension' )
13811381
13821382 # Construct cifti image.
@@ -1435,7 +1435,7 @@ def to_file_map(self, file_map=None):
14351435 img .to_file_map (file_map or self .file_map )
14361436
14371437 def update_headers (self ):
1438- ''' Harmonize CIFTI2 and NIfTI headers with image data
1438+ ''' Harmonize CIFTI-2 and NIfTI headers with image data
14391439
14401440 >>> import numpy as np
14411441 >>> data = np.zeros((2,3,4))
0 commit comments