MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / RotateBox90

Class RotateBox90

monai/apps/detection/transforms/array.py:546–565  ·  view source on GitHub ↗

Rotate a boxes by 90 degrees in the plane specified by `axes`. See box_ops.rot90_boxes for additional details Args: k: number of times to rotate by 90 degrees. spatial_axes: 2 int numbers, defines the plane to rotate with 2 spatial axes. Default: (0, 1), thi

Source from the content-addressed store, hash-verified

544
545
546class RotateBox90(Rotate90):
547 """
548 Rotate a boxes by 90 degrees in the plane specified by `axes`.
549 See box_ops.rot90_boxes for additional details
550
551 Args:
552 k: number of times to rotate by 90 degrees.
553 spatial_axes: 2 int numbers, defines the plane to rotate with 2 spatial axes.
554 Default: (0, 1), this is the first two axis in spatial dimensions.
555 If axis is negative it counts from the last to the first axis.
556 """
557
558 backend = [TransformBackends.TORCH, TransformBackends.NUMPY]
559
560 def __call__(self, boxes: NdarrayTensor, spatial_size: Sequence[int] | int) -> NdarrayTensor: # type: ignore[override]
561 """
562 Args:
563 img: channel first array, must have shape: (num_channels, H[, W, ..., ]),
564 """
565 return rot90_boxes(boxes, spatial_size, self.k, self.spatial_axes)

Callers 4

__init__Method · 0.90
inverseMethod · 0.90
__call__Method · 0.90
inverseMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…