code: def as_boxes(self, colors=None):
          
          matrix = self._data['matrix']
          centers = matrix_to_points(
              matrix=matrix,
              pitch=self._data['pitch'],
              origin=self._data['origin'])
  
          if colors is not None:
              colors = np.asanyarray(colors)
              if (colors.ndim == 4 and
                  colors.shape[:3] == matrix.shape and
                      colors.shape[3] in [3, 4]):
                  colors = colors[matrix > 0]
              elif not (colors.shape == (3,) or colors.shape == (4,)):
                  log.warning('colors incorrect shape!')
                  colors = None
  
          mesh = multibox(centers=centers,
                          pitch=self.pitch,
                          colors=colors)
          return mesh
docs: A rough Trimesh representation of the voxels with a box
          for each filled voxel.
  
          Parameters
          ----------
          colors : (3,) or (4,) float or uint8
                   (X, Y, Z, 3) or (X, Y, Z, 4) float or uint8
           Where matrix.shape == (X, Y, Z)
  
          Returns
          ---------
          mesh : trimesh.Trimesh
            Mesh with one box per filled cell.