class_docstr: Class for stateful representation of collections of streamlines
  Object designed to be identical no matter the file format
  (trk, tck, vtk, fib, dpy). Facilitate transformation between space and
  data manipulation for each streamline / point.
class_docstr_tok: ["Class","for","stateful","representation","of","collections","of","streamlines","Object","designed","to","be","identical","no","matter","the","file","format","(","trk",",","tck",",","vtk",",","fib",",","dpy",")",".","Facilitate","transformation","between","space","and","data","manipulation","for","each","streamline","\/","point","."]
docstr: Verify that the bounding box is valid in voxel space.
  Negative coordinates or coordinates above the volume dimensions
  are considered invalid in voxel space.
  
  Returns
  -------
  output : bool
      Are the streamlines within the volume of the associated reference
docstr_tok: ["Verify","that","the","bounding","box","is","valid","in","voxel","space",".","Negative","coordinates","or","coordinates","above","the","volume","dimensions","are","considered","invalid","in","voxel","space",".","Returns","--","--","--","-","output",":","bool","Are","the","streamlines","within","the","volume","of","the","associated","reference"]
code: def is_bbox_in_vox_valid(self):
      """Verify that the bounding box is valid in voxel space.
      Negative coordinates or coordinates above the volume dimensions
      are considered invalid in voxel space.
  
      Returns
      -------
      output : bool
          Are the streamlines within the volume of the associated reference
      """
      if not self.streamlines:
          return True
  
      old_space = deepcopy(self.space)
      old_origin = deepcopy(self.origin)
  
      # Do to rotation, equivalent of a OBB must be done
      self.to_vox()
      self.to_corner()
      bbox_corners = deepcopy(self.compute_bounding_box())
  
      is_valid = True
      if np.any(bbox_corners < 0):
          logger.error("Voxel space values lower than 0.0.")
          logger.debug(bbox_corners)
          is_valid = False
  
      if (
          np.any(bbox_corners[:, 0] > self._dimensions[0])
          or np.any(bbox_corners[:, 1] > self._dimensions[1])
          or np.any(bbox_corners[:, 2] > self._dimensions[2])
      ):
          logger.error("Voxel space values higher than dimensions.")
          logger.debug(bbox_corners)
          is_valid = False
  
      self.to_space(old_space)
      self.to_origin(old_origin)
  
      return is_valid
  
imports: from bisect import bisect
  from collections import OrderedDict
  from copy import deepcopy
  import enum
  from itertools import product
  import logging
  from nibabel.affines import apply_affine
  from nibabel.streamlines.tractogram import Tractogram, PerArraySequenceDict, PerArrayDict
  import numpy
  from dipy.io.dpy import Streamlines
  from dipy.io.utils import get_reference_info, is_reference_info_valid, is_header_compatible
label_desc: Use image node_id 37 for calling the StatefulTractogram obj's underlying member method code with example usage: obj.is_bbox_in_vox_valid() and returns: is_valid, True