dipy/viz/actor.py
def _update_user_matrix(self):
            """
            Text justification of vtkTextActor3D doesn't seem to be working, so we do it manually.
            """
            user_matrix = np.eye(4)

            text_bounds = [0, 0, 0, 0]
            self.GetBoundingBox(text_bounds)

            tprop = self.GetTextProperty()
            if tprop.GetJustification() == vtk.VTK_TEXT_LEFT:
                user_matrix[:3, -1] += (-text_bounds[0], 0, 0)
            elif tprop.GetJustification() == vtk.VTK_TEXT_CENTERED:
                user_matrix[:3, -1] += (-(text_bounds[0]+(text_bounds[1]-text_bounds[0])/2.), 0, 0)
            elif tprop.GetJustification() == vtk.VTK_TEXT_RIGHT:
                user_matrix[:3, -1] += (-text_bounds[1], 0, 0)

            if tprop.GetVerticalJustification() == vtk.VTK_TEXT_BOTTOM:
                user_matrix[:3, -1] += (0, -text_bounds[2], 0)
            elif tprop.GetVerticalJustification() == vtk.VTK_TEXT_CENTERED:
                user_matrix[:3, -1] += (0, -(text_bounds[2]+(text_bounds[3]-text_bounds[2])/2), 0)
            elif tprop.GetVerticalJustification() == vtk.VTK_TEXT_TOP:
                user_matrix[:3, -1] += (0, -text_bounds[3], 0)

            user_matrix[:3, -1] *= self.GetScale()
            self.SetUserMatrix(numpy_to_vtk_matrix(user_matrix))

            Text justification of vtkTextActor3D doesn't seem to be working, so we do it manually.
            
Text justification of vtkTextActor3D doesn't seem to be working, so we do it manually.
Text justification of vtkTextActor3D doesn ' t seem to be working so we do it manually .
def _update_user_matrix(self):
            user_matrix = np.eye(4)
            text_bounds = [0, 0, 0, 0]
            self.GetBoundingBox(text_bounds)
            tprop = self.GetTextProperty()
            if tprop.GetJustification() == vtk.VTK_TEXT_LEFT:
                user_matrix[:3, -1] += (-text_bounds[0], 0, 0)
            elif tprop.GetJustification() == vtk.VTK_TEXT_CENTERED:
                user_matrix[:3, -1] += (-(text_bounds[0]+(text_bounds[1]-text_bounds[0])/2.), 0, 0)
            elif tprop.GetJustification() == vtk.VTK_TEXT_RIGHT:
                user_matrix[:3, -1] += (-text_bounds[1], 0, 0)
            if tprop.GetVerticalJustification() == vtk.VTK_TEXT_BOTTOM:
                user_matrix[:3, -1] += (0, -text_bounds[2], 0)
            elif tprop.GetVerticalJustification() == vtk.VTK_TEXT_CENTERED:
                user_matrix[:3, -1] += (0, -(text_bounds[2]+(text_bounds[3]-text_bounds[2])/2), 0)
            elif tprop.GetVerticalJustification() == vtk.VTK_TEXT_TOP:
                user_matrix[:3, -1] += (0, -text_bounds[3], 0)
            user_matrix[:3, -1] *= self.GetScale()
            self.SetUserMatrix(numpy_to_vtk_matrix(user_matrix))
def _update_user_matrix ( self ) : user_matrix = np . eye ( 4 ) text_bounds = [ 0 , 0 , 0 , 0 ] self . GetBoundingBox ( text_bounds ) tprop = self . GetTextProperty ( ) if tprop . GetJustification ( ) == vtk . VTK_TEXT_LEFT : user_matrix [ : 3 , - 1 ] += ( - text_bounds [ 0 ] , 0 , 0 ) elif tprop . GetJustification ( ) == vtk . VTK_TEXT_CENTERED : user_matrix [ : 3 , - 1 ] += ( - ( text_bounds [ 0 ] + ( text_bounds [ 1 ] - text_bounds [ 0 ] ) / 2. ) , 0 , 0 ) elif tprop . GetJustification ( ) == vtk . VTK_TEXT_RIGHT : user_matrix [ : 3 , - 1 ] += ( - text_bounds [ 1 ] , 0 , 0 ) if tprop . GetVerticalJustification ( ) == vtk . VTK_TEXT_BOTTOM : user_matrix [ : 3 , - 1 ] += ( 0 , - text_bounds [ 2 ] , 0 ) elif tprop . GetVerticalJustification ( ) == vtk . VTK_TEXT_CENTERED : user_matrix [ : 3 , - 1 ] += ( 0 , - ( text_bounds [ 2 ] + ( text_bounds [ 3 ] - text_bounds [ 2 ] ) / 2 ) , 0 ) elif tprop . GetVerticalJustification ( ) == vtk . VTK_TEXT_TOP : user_matrix [ : 3 , - 1 ] += ( 0 , - text_bounds [ 3 ] , 0 ) user_matrix [ : 3 , - 1 ] *= self . GetScale ( ) self . SetUserMatrix ( numpy_to_vtk_matrix ( user_matrix ) )
Text justification of vtkTextActor3D doesn't seem to be working, so we do it manually.
Text justification of vtkTextActor3D doesn ' t seem to be working so we do it manually .
"""
            Text justification of vtkTextActor3D doesn't seem to be working, so we do it manually.
            """
self