Example #1
0
 def test_UtilsMetaDataCollapseIntegerAndBlank(self):
     point = btk.btkMetaData('POINT')
     btk.btkMetaDataCreateChild(point, 'LABELS', btk.btkIntArray(125, 54))
     values = btk.btkMetaDataCollapseChildrenValuesInt(point, 'LABELS', 150)
     self.assertEqual(len(values), 150)
     for i in range(125, 150):
         self.assertEqual(values[i], 0)
 def test_UtilsMetaDataCollapseIntegerAndBlank(self):
     point = btk.btkMetaData('POINT')
     btk.btkMetaDataCreateChild(point, 'LABELS', btk.btkIntArray(125, 54))
     values = btk.btkMetaDataCollapseChildrenValuesInt(point, 'LABELS', 150)
     self.assertEqual(len(values), 150)
     for i in range(125,150):
         self.assertEqual(values[i], 0)
Example #3
0
 def test_UtilsMetaDataCollapseInteger(self):
     point = btk.btkMetaData('POINT')
     btk.btkMetaDataCreateChild(point, 'LABELS', btk.btkIntArray(1120, 54))
     self.assertEqual(point.GetChildNumber(), 5)
     labels = point.GetChild('LABELS')
     self.assertEqual(labels.GetInfo().GetValueNumber(), 255)
     labels2 = point.GetChild('LABELS2')
     self.assertEqual(labels2.GetInfo().GetValueNumber(), 255)
     labels3 = point.GetChild('LABELS3')
     self.assertEqual(labels3.GetInfo().GetValueNumber(), 255)
     labels4 = point.GetChild('LABELS4')
     self.assertEqual(labels4.GetInfo().GetValueNumber(), 255)
     labels5 = point.GetChild('LABELS5')
     self.assertEqual(labels5.GetInfo().GetValueNumber(), 100)
     values = btk.btkMetaDataCollapseChildrenValuesInt(point, 'LABELS')
     self.assertEqual(len(values), 1120)
 def test_UtilsMetaDataCollapseInteger(self):
     point = btk.btkMetaData('POINT')
     btk.btkMetaDataCreateChild(point, 'LABELS', btk.btkIntArray(1120, 54))
     self.assertEqual(point.GetChildNumber(), 5)        
     labels = point.GetChild('LABELS')        
     self.assertEqual(labels.GetInfo().GetValueNumber(), 255)
     labels2 = point.GetChild('LABELS2')
     self.assertEqual(labels2.GetInfo().GetValueNumber(), 255)
     labels3 = point.GetChild('LABELS3')
     self.assertEqual(labels3.GetInfo().GetValueNumber(), 255)
     labels4 = point.GetChild('LABELS4')
     self.assertEqual(labels4.GetInfo().GetValueNumber(), 255)
     labels5 = point.GetChild('LABELS5')
     self.assertEqual(labels5.GetInfo().GetValueNumber(), 100)
     values = btk.btkMetaDataCollapseChildrenValuesInt(point, 'LABELS')
     self.assertEqual(len(values), 1120)