Reformat view from fiducial points (AC-PC)

Dear Slicer community,

I would like to ask if there is a way to control and reformat the views (for example, the red/axial) to be parallel to the AC-PC plane, if AC and PC points are fiducials that are placed in the scene. Is there a python solution or command for this?
So, not re-sampling the image to ac-pc parallel slices, but rather just to change the view, while the user does segmentation.

Thanks a lot
Best regards
Andras

You can use Reformat module to reorient slice views.

You can compute AC-PC plane transform using ACPC Transform module.

Note that if you paint with circle (2D) brush on oblique slices or if the slice view is positioned at segment boundaries then you may see striping artifacts. These artifacts should disappear as you complete your segmentation.

To avoid seeing these temporary artifacts, you may create a transformed - and potentially resampled - copy of your volume using Crop volume module (resampling mode enabled, clipping ROI transformed by ACPC transform) and use that as master volume for segmentation. When you completed the segmentation, you may export segments to a using your original volume as reference. Let me know if anything is unclear or you cannot achieve what you would like to do.

Thanks a lot Andras
I would like to reformulate my question.
We are developing an extension to Slicer, and I would like to ask if someone could suggest a solution to lock the view to be parallel to the AC-PC plane (after the user defines the two points) with “one button”, without the user having to go through the ac-pc transformation module and the view reformat thing manually.

If you don’t want to do any programming, then use Volume Reslice Driver module (available in SlicerIGT extension) to align your slice views using the computed AC-PC transform (you probably have to invert the transform in Transforms module, as you apply it to the slice views and not to the volume).

If you have your own module already, then you can set the slice view orientations directly as described here: Rotating Slice around Axis of Model (using SetSliceToRASByNTP or SetSliceToRAS method).