Methods used in creating axial and sagittal in 3d Slicer

Hello! pardon for any mistakes I made here, this is my first time posting a question in this forum.

I am currently trying to create a segmentation of the spine from a self-gathered data using ultrasound and is trying to create my own program and algorithm to do so, but i am stuck on creating the sagital and coronal view. Though i noticed in 3d slicer, it is automatically possible to create the views from the png images of ultrasound as seen here:

i was wondering, if possible, what is the method used by 3d slicer to achieve this? i am using python for my coding algorithm.
Thank you in advance!

Slicer uses vtkImageReslice for this. It’s available in python.

Why don’t you check out this link: