/** * @param workspace The workspace containing the axis information * @param index Index of the axis in the workspace to inspect */ void PlotAxis::titleFromIndex(const Mantid::API::IMDWorkspace &workspace, const size_t index) { auto dim = workspace.getDimension(index); titleFromDimension(*dim); if (m_title.isEmpty()) { m_title = (index == 0) ? "X axis" : "Y axis"; } }
/** * Returns a time for a time slice * @param workspace: the workspace * @return either the first time entry in case of a 4D workspace or else 0.0 */ double SaveMDWorkspaceToVTKImpl::selectTimeSliceValue( const Mantid::API::IMDWorkspace &workspace) const { double time = 0.0; if (is4DWorkspace(workspace)) { auto timeLikeDimension = workspace.getDimension(3); time = static_cast<double>(timeLikeDimension->getMinimum()); } return time; }