code: function getRectangleFromImagePlane(imagePlane) {
    // Get the points
    const topLeft = imagePointToPatientPoint(
      {
        x: 0,
        y: 0,
      },
      imagePlane
    );
    const topRight = imagePointToPatientPoint(
      {
        x: imagePlane.columns,
        y: 0,
      },
      imagePlane
    );
    const bottomLeft = imagePointToPatientPoint(
      {
        x: 0,
        y: imagePlane.rows,
      },
      imagePlane
    );
    const bottomRight = imagePointToPatientPoint(
      {
        x: imagePlane.columns,
        y: imagePlane.rows,
      },
      imagePlane
    );
  
    // Get each side as a vector
    const rect = {
      top: new external.cornerstoneMath.Line3(topLeft, topRight),
      left: new external.cornerstoneMath.Line3(topLeft, bottomLeft),
      right: new external.cornerstoneMath.Line3(topRight, bottomRight),
      bottom: new external.cornerstoneMath.Line3(bottomLeft, bottomRight),
    };
  
    return rect;
  }
docs: Returns a rectangle from the imagePlane.
  @export @public @method
  @name getRectangleFromImagePlane
  
  @param  {Object} imagePlane The imagePlane.
  @returns {Object} The rect.