Ejemplo n.º 1
0
 def test_07_01_wrap_interval(self):
     svc = ij2.get_dataset_service(self.context)
     result = svc.create1(np.array([10, 15]), "MyDataset",
                          [ij2.Axes().Y, ij2.Axes().X], 8, False, False)
     imgplus = ij2.wrap_interval(result.getImgPlus())
     self.assertEqual(imgplus.min1D(0), 0)
     self.assertEqual(imgplus.max1D(1), 14)
     self.assertSequenceEqual(imgplus.minND(), [0, 0])
     self.assertSequenceEqual(imgplus.maxND(), [9, 14])
     self.assertSequenceEqual(imgplus.dimensions(), [10, 15])
Ejemplo n.º 2
0
 def test_07_01_wrap_interval(self):
     svc = ij2.get_dataset_service(self.context)
     result = svc.create1(np.array([10, 15]), 
                          "MyDataset", [ij2.Axes().Y, ij2.Axes().X],
                          8, False, False)
     imgplus = ij2.wrap_interval(result.getImgPlus())
     self.assertEqual(imgplus.min1D(0), 0)
     self.assertEqual(imgplus.max1D(1), 14)
     self.assertSequenceEqual(imgplus.minND(), [0, 0])
     self.assertSequenceEqual(imgplus.maxND(), [9, 14])
     self.assertSequenceEqual(imgplus.dimensions(), [10, 15])
Ejemplo n.º 3
0
 def test_09_06_get_display_by_name(self):
     svc = ij2.get_display_service(self.context)
     r = np.random.RandomState()
     r.seed(92)
     image = r.randint(0, 256, (11,13))
     ds = ij2.create_dataset(self.context, image, "Foo")
     svc.createDisplay("Foo", ds)
     image = r.randint(0, 256, (14,12))
     ds2 = ij2.create_dataset(self.context, image, "Bar")
     display = svc.createDisplay("Bar", ds)
     svc.setActiveDisplay(display)
     display = svc.getDisplay("Foo")
     view = display.getActiveView()
     ds3 = ij2.wrap_interval(view.getData())
     self.assertSequenceEqual(ds3.dimensions(), [13, 11])