File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,12 @@ def map_voxels(self, coordinates):
77
77
return np .tensordot (np .linalg .inv (self ._affine ),
78
78
coordinates , axes = 1 )[:3 , ...]
79
79
80
+ def _to_hdf5 (self , group ):
81
+ group ['Type' ] = 'image'
82
+ group .create_dataset ('affine' , data = self .affine )
83
+ group .create_dataset ('shape' , data = self .shape )
84
+ group .create_dataset ('ndim' , data = self .ndim )
85
+
80
86
def __eq__ (self , other ):
81
87
try :
82
88
return np .allclose (self .affine , other .affine ) and self .shape == other .shape
@@ -178,7 +184,7 @@ def _to_hdf5(self, x5_root):
178
184
'''Serialize this object into the x5 file format'''
179
185
raise NotImplementedError
180
186
181
- def to_filename (self , filename , format = 'X5' ):
187
+ def to_filename (self , filename , fmt = 'X5' ):
182
188
'''Store the transform in BIDS-Transforms HDF5 file format (.x5).
183
189
'''
184
190
with h5py .File (filename , 'w' ) as out_file :
You can’t perform that action at this time.
0 commit comments