docstr: Test conversion of 3D dense with no overlapping labels to sparse
  
  dense input: label=1, c=1,t=1,z=3,y=3,x=2
  
         +------+ 
        / 1  0 /|
       / 1  0 / +
      +------+ /
      | 1  0 |/
      +------+
         +------+ 
        / 2  2 /|
       / 2  2 / +
      +------+ /
      | 2  2 |/
      +------+
         +------+ 
        / 0  0 /|
       / 0  0 / +
      +------+ /
      | 0  0 |/
      +------+
docstr_tok: ["Test","conversion","of","3D","dense","with","no","overlapping","labels","to","sparse","dense","input",":","label=1",",","c=1",",","t=1",",","z=3",",","y=3",",","x=2","+","--","--","--","+","\/","1","0","\/|","\/","1","0","\/","+","+","--","--","--","+","\/","|","1","0","|\/","+","--","--","--","+","+","--","--","--","+","\/","2","2","\/|","\/","2","2","\/","+","+","--","--","--","+","\/","|","2","2","|\/","+","--","--","--","+","+","--","--","--","+","\/","0","0","\/|","\/","0","0","\/","+","+","--","--","--","+","\/","|","0","0","|\/","+","--","--","--","+"]
code: def test_01_05_3d_dense_nonoverlap_to_sparse(self):
      """
      Test conversion of 3D dense with no overlapping labels to sparse
  
      dense input: label=1, c=1,t=1,z=3,y=3,x=2
  
             +------+
            / 1  0 /|
           / 1  0 / +
          +------+ /
          | 1  0 |/
          +------+
             +------+
            / 2  2 /|
           / 2  2 / +
          +------+ /
          | 2  2 |/
          +------+
             +------+
            / 0  0 /|
           / 0  0 / +
          +------+ /
          | 0  0 |/
          +------+
      """
      dense = np.array(
          [1, 0, 2, 2, 0, 0, 1, 0, 2, 2, 0, 0, 1, 0, 2, 2, 0, 0]
      ).reshape((1, 1, 1, 3, 3, 2))
      indices = lib_seg.indices_from_dense(dense)
      indices_expected = [np.array([1, 2], dtype=np.uint8)]
  
      _check_indices(indices, indices_expected)
  
      sparse = lib_seg.convert_dense_to_sparse(dense)
  
      expected_zs = np.array(
          [0, 0, 0, 1, 1, 1, 2, 2, 2], dtype=np.uint16
      )
      expected_ys = np.array(
          [0, 1, 1, 0, 1, 1, 0, 1, 1], dtype=np.uint16
      )
      expected_xs = np.array(
          [0, 0, 1, 0, 0, 1, 0, 0, 1], dtype=np.uint16
      )
      expected_labels = np.array(
          [1, 2, 2, 1, 2, 2, 1, 2, 2], dtype=np.uint8
      )
  
      np.testing.assert_array_equal(
          sparse[SPARSE_FIELD.z.value], expected_zs
      )
      np.testing.assert_array_equal(
          sparse[SPARSE_FIELD.y.value], expected_ys
      )
      np.testing.assert_array_equal(
          sparse[SPARSE_FIELD.x.value], expected_xs
      )
      np.testing.assert_array_equal(
          sparse[SPARSE_FIELD.label.value], expected_labels
      )
      np.testing.assert_equal(
          sparse[SPARSE_FIELD.z.value].dtype, expected_zs.dtype
      )
      np.testing.assert_equal(
          sparse[SPARSE_FIELD.y.value].dtype, expected_ys.dtype
      )
      np.testing.assert_equal(
          sparse[SPARSE_FIELD.x.value].dtype, expected_xs.dtype
      )
      np.testing.assert_equal(
          sparse[SPARSE_FIELD.label.value].dtype, expected_labels.dtype
      )
  
imports: import numpy
  import centrosome.outline
  import cellprofiler_library.functions.segmentation
  from cellprofiler_library.functions.segmentation import SPARSE_FIELD
label_desc: Use image node_id 6 for calling the TestSegmentation obj's underlying member method code with example usage: obj.test_01_05_3d_dense_nonoverlap_to_sparse() without return types