With regard to the coordinate of medical image, we use two types of orientation to represent the direction.
reference
Coordinate_systems
orientimagefilter
orientterms
LPS
in ITK, it can also be represented as RAI
RAS (can also be LIP)
itk::OrientImageFilter<ImageType, ImageType>::Pointer orientationFilter = itk::OrientImageFilter<ImageType, ImageType>::New();
orientationFilter->UseImageDirectionOn();
orientationFilter->SetDesiredCoordinateOrientation(itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RAI);
orientationFilter->SetInput(reader->GetOutput());
orientationFilter->Update();
so, the snippet of code is to convert to LPS (itk is RAI) orientation.