Example #1
0
 def test_crop_scalar_image_type(self):
     data = torch.ones((10, 10, 10))
     image = ScalarImage(tensor=data)
     cropped = image.crop((1, 1, 1), (5, 5, 5))
     self.assertIs(cropped.type, INTENSITY)
Example #2
0
 def test_crop_does_not_create_wrong_path(self):
     data = torch.ones((10, 10, 10))
     image = ScalarImage(tensor=data)
     cropped = image.crop((1, 1, 1), (5, 5, 5))
     self.assertIs(cropped.path, None)