Esempio n. 1
0
 def test_Read_ExportElan_Read(self):
     tg1 = Antx()
     tg1.read(os.path.join(SAMPLES, "Example_with_TGA.antx"))
     annotationdata.io.write( os.path.join(SAMPLES, "Example.eaf"), tg1 )
     tg2 = Elan()
     tg2.read(os.path.join(SAMPLES, "Example.eaf"))
     os.remove( os.path.join(SAMPLES, "Example.eaf") )
Esempio n. 2
0
    def test_Read_ExportSppas_Read(self):
        tg1 = Antx()
        tg1.read(os.path.join(SAMPLES, "Example_with_TGA.antx"))
        annotationdata.io.write( os.path.join(SAMPLES, "Example.xra"), tg1 )
        tg2 = XRA()
        tg2.read(os.path.join(SAMPLES, "Example.xra"))

        # Compare annotations of tg1 and tg2
        for t1, t2 in zip(tg1, tg2):
            self.assertEqual(t1.GetSize(), t2.GetSize())
            for a1, a2 in zip(t1, t2):
                self.assertEqual(a1.GetLabel().GetValue(), a2.GetLabel().GetValue())
                self.assertEqual(a1.GetLocation().GetBegin(), a2.GetLocation().GetBegin())
                self.assertEqual(a1.GetLocation().GetEnd(), a2.GetLocation().GetEnd())

        os.remove( os.path.join(SAMPLES, "Example.xra") )
Esempio n. 3
0
 def test_Read(self):
     tg1 = Antx()
     tg1.read(os.path.join(SAMPLES, "Example_with_TGA.antx"))