I used this code to read a series for dicom images into python
series_IDs = sitk.ImageSeriesReader.GetGDCMSeriesIDs(data_directory)
series_file_names = sitk.ImageSeriesReader.GetGDCMSeriesFileNames(data_directory, series_IDs[0])
series_reader = sitk.ImageSeriesReader()
series_reader.SetFileNames(series_file_names)
series_reader.LoadPrivateTagsOn()
image3D=series_reader.Execute()
size = image3D.GetSize()
currently, its orientation is the following:
I need to change the orientation to the following orientation:
Is there any command in python to be able to change the orientation of SimpleITK image?