Flip and rotational transform issues

Hello,

I am using CLARA 3.1 and currently debugging my pre_transforms pipeline by printing the outputs with SaveAsNifti at the end of the pre_transforms. I have noticed a few abnormalities with some transforms and am wondering if they are not acting as intended or if I should be using other transforms.

  1. I am using the RandomAxisFlip transform which says in documentation: “Flip the image along one randomly picked axis.”
    I am using 3D images, and it seems that my images are never being vertically flipped. I can tell that they are sometimes being flipped on at least one axis- but I can tell for sure that they are not being flipped in all three. The images never appear “upside down”. I would like the flipping to occur randomly in all three directions. Is this the intended behaviour?

  2. I am using the FastPosNegRatioCropROI transform.
    This transform states: Simultaneously crop image and label to size, after specified augmentation operations, including deform, rotation, scale, pos/neg ratio.
    I am utilizing the rotation transform, however it also appears that this rotation is only ever occurring along one axis (not all three). I would like a random rotation of 0->±N deg to be applied in the X, Y, and Z direction independently. Ie, could be rotated 10deg in X, -20 in Y, 0 in Z. Is this how the transform is supposed to perform?

Hi
Thanks for your interest in Clara Train SDK.
For your first question the transform should randomly flip on 1 of the 3 axis. please try to have the prob = 1. then use the saveAsNifti to check multiple volumes

For you second question, You are correct the rotation is 2d rotation. If you would need a 3d rotation you can use BYOC to bring your own transformation. You can check out logic in MONAI https://docs.monai.io/en/latest/transforms.html#randrotated This is supported in clara V4. However, V4 is based of MONAI which uses PyTorch

Hope this helps