Example #1
0
 def test_get_bands_from_array(self):
     new_image_bands = imgmani.get_bands(self.image, np.array([0, 1, 2]))
     self.assertEqual(new_image_bands.shape, (5, 5, 3),
                      "new image has correct shape")
     np.testing.assert_allclose(new_image_bands[2, 2, :],
                                self.specialValue[:3],
                                err_msg="new image has correct values")
Example #2
0
 def test_get_bands_from_array(self):
     new_image_bands = imgmani.get_bands(self.image, np.array([0, 1, 2]))
     self.assertEqual(new_image_bands.shape, (5, 5, 3),
                      "new image has correct shape")
     np.testing.assert_allclose(new_image_bands[2, 2, :],
                                self.specialValue[:3],
                                err_msg="new image has correct values")
Example #3
0
 def test_get_bands_from_int(self):
     new_image_bands = imgmani.get_bands(self.image, 2)
     self.assertEqual(new_image_bands.shape, (5, 5, 1),
                      "new image has correct shape")
     self.assertEqual(new_image_bands[2, 2, :], self.specialValue[2],
                      "new image has correct values")
Example #4
0
 def test_get_bands_from_int(self):
     new_image_bands = imgmani.get_bands(self.image, 2)
     self.assertEqual(new_image_bands.shape, (5, 5, 1),
                      "new image has correct shape")
     self.assertEqual(new_image_bands[2, 2, :], self.specialValue[2],
                      "new image has correct values")