class_docstr: Test the Tamura Texture features programmed in medpy.features.texture.
  Functions are:  coarseness(image, voxelspacing = None, mask = slice(None))
                  contrast(image, mask = slice(None))
                  directionality(image, voxelspacing = None, mask = slice(None), min_distance = 4)
code: def test_Directionality(self):
      res = directionality(self.image1)
      self.assertEqual(
          res,
          1.0,
          "directionality: 2D image, no voxelspacing, no mask, default min_distance, default threshold: got {} ,expected {}".format(
              res, 1.0
          ),
      )
  
      res = directionality(self.image1, voxelspacing=self.voxelspacing1)
      self.assertEqual(
          res,
          1.0,
          "directionality: 2D image, voxelspacing = (1.0, 3.0), no mask, default min_distance, default threshold: got {} ,expected {}".format(
              res, 1.0
          ),
      )
  
      res = directionality(self.image1, voxelspacing=(1, 2, 3))
      self.assertEqual(
          res,
          None,
          "directionality: 2D image, voxelspacing = (1,2,3), no mask, default min_distance, default threshold: got {} ,expected {}".format(
              res, None
          ),
      )
  
      res = directionality(
          self.image1, voxelspacing=self.voxelspacing1, mask=self.mask1
      )
      self.assertEqual(
          res,
          1.0,
          "directionality: 2D image, voxelspacing(1.0, 3.0), mask = [slice(0,50,1), slice(0,50,1)], default min_distance, default threshold: got {} ,expected {}".format(
              res, 1.0
          ),
      )
  
      res = directionality(self.image1, min_distance=10.0)
      self.assertEqual(
          res,
          1.0,
          "directionality: 2D image, no voxelspacing, no mask , min_distance= 10, default threshold: got {} ,expected {}".format(
              res, 1.0
          ),
      )
  
      res = directionality(self.image1, threshold=0.5)
      self.assertEqual(
          res,
          1.0,
          "directionality: 2D image, no voxelspacing, no mask, default min_distance, threshold = 0.5: got {} ,expected {}".format(
              res, 1.0
          ),
      )
  
file_path: medpy/tests/features_/texture.py
imports: import unittest
  from medpy.features.texture import *
label_desc: Use image node_id 4 for calling the TestTextureFeatures obj's underlying member method code with example usage: obj.test_Directionality() without return types