I am trying to use a LineSegment ROI to extract a 2D slice from a 3D image. There are three axis' in the provided dataset, 0, 1, and 2.
A 2D image is displayed using x:2, y:1, and t:0 with a slider connected to t, allowing the user to move through the depth of the image.
A line segment ROI is imposed over this 2D image, and I am trying to extract a 2D slice from the image representing a cross section of the displayed 2D image.
The problem I am having is in the following line...
self.testroi.getArrayRegion(self.dataset1, self.imvOCTTopLeft.getImageItem(), axes=(1,2), returnMappedCoords=True)
At the moment this code is successfully producing a cross sectional image, however it is
retrieving the axis values from the image incorrectly. Ideally, I should be able to set
axes=(2,1), however when I try to do this I am getting the following error:
"numpy.AxisError: axis 2 is out of bounds for array of dimension 2"
If both axis 2 and 1 exist in the dataset and are accessible in the axes=(1,2) format, why should they not be
accessible in axes=(2,1) format?