@@ -371,26 +371,25 @@ def test_dpconn():
371
371
del img2
372
372
373
373
374
- # SKIP until intent code is specified
375
- # https://www.nitrc.org/forum/attachment.php?attachid=341&group_id=454&forum_id=1955
376
- # def test_plabel():
377
- # label_map = create_label_map((0, ))
378
- # parcel_map = create_parcel_map((1, ))
379
- # matrix = ci.Cifti2Matrix()
380
- # matrix.append(label_map)
381
- # matrix.append(parcel_map)
382
- # hdr = ci.Cifti2Header(matrix)
383
- # data = np.random.randn(2, 3)
384
- # img = ci.Cifti2Image(data, hdr)
385
- #
386
- # with InTemporaryDirectory():
387
- # ci.save(img, 'test.plabel.nii')
388
- # img2 = ci.load('test.plabel.nii')
389
- # assert_true(isinstance(img2, ci.Cifti2Image))
390
- # assert_true((img2.get_data() == data).all())
391
- # check_label_map(img2.header.matrix.get_index_map(0))
392
- # check_parcel_map(img2.header.matrix.get_index_map(1))
393
- # del img2
374
+ def test_plabel ():
375
+ label_map = create_label_map ((0 , ))
376
+ parcel_map = create_parcel_map ((1 , ))
377
+ matrix = ci .Cifti2Matrix ()
378
+ matrix .append (label_map )
379
+ matrix .append (parcel_map )
380
+ hdr = ci .Cifti2Header (matrix )
381
+ data = np .random .randn (2 , 3 )
382
+ img = ci .Cifti2Image (data , hdr
383
+ img .nifti_header .set_intent ('NIFTI_INTENT_CONNECTIVITY_UNKNOWN' )
384
+
385
+ with InTemporaryDirectory ():
386
+ ci .save (img , 'test.plabel.nii' )
387
+ img2 = ci .load ('test.plabel.nii' )
388
+ assert_true (isinstance (img2 , ci .Cifti2Image ))
389
+ assert_true ((img2 .get_data () == data ).all ())
390
+ check_label_map (img2 .header .matrix .get_index_map (0 ))
391
+ check_parcel_map (img2 .header .matrix .get_index_map (1 ))
392
+ del img2
394
393
395
394
396
395
def test_pconn ():
0 commit comments