Commit fcbc5d0a authored by Mark Winter's avatar Mark Winter

Return only a two element dimension if 3rd dimension is 1.

parent 487cb3b8
......@@ -6,14 +6,19 @@ function dims = GetDimensions(dimOrder)
end
dims = [];
selectedDims = [1 2 3];
if ( strcmpi(dimOrder,'rc') )
selectedDims = [2 1 3];
end
if ( ~isfield(CONSTANTS,'imageData') )
return;
end
numDims = 3;
if ( CONSTANTS.imageData.Dimensions(3) == 1 )
numDims = 2;
end
selectedDims = 1:numDims;
if ( strcmpi(dimOrder,'rc') )
selectedDims = Utils.SwapXY_RC(selectedDims);
end
dims = CONSTANTS.imageData.Dimensions(selectedDims);
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment