Skip to content

Commit

Permalink
Refs #7429. Lifting restrictions on 4D data.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Reuter committed Oct 10, 2013
1 parent e8bff28 commit 5228963
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
7 changes: 0 additions & 7 deletions Code/Mantid/Vates/VatesAPI/src/vtkSplatterPlotFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,6 @@ namespace VATES
{
throw std::runtime_error("Invalid vtkSplatterPlotFactory. Workspace must have at least 3 dimensions.");
}
/*
size_t nd = m_workspace->getNonIntegratedDimensions().size();
if (nd > 3)
{
throw std::runtime_error("SplatterPlot cannot handle 4D data, please integrate to 3D!");
}
*/
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,6 @@ void SplatterPlotView::render()
QString renderType = "Points";
pqObjectBuilder* builder = pqApplicationCore::instance()->getObjectBuilder();

/*
if (this->checkForBadDimensions(src))
{
return;
}
*/
// Do not allow overplotting of MDWorkspaces
if (!this->isPeaksWorkspace(src) && NULL != this->splatSource)
{
Expand Down Expand Up @@ -209,41 +203,6 @@ void SplatterPlotView::resetDisplay()
this->view->resetDisplay();
}

/**
* This function checks any incoming MDEventWorkspace to ensure that it has
* only 3 non-integrated dimensions. Have to do this since the
* vtkSplatterPlotFactory isn't setup properly.
*
* @param src : The pipeline source to perform the dimension check
* @return True if there are more than 3 non-integrated dimensions
*/
bool SplatterPlotView::checkForBadDimensions(pqPipelineSource *src)
{
if (!this->isPeaksWorkspace(src))
{
QString wsName(vtkSMPropertyHelper(src->getProxy(),
"Mantid Workspace Name", true).GetAsString());
if(!wsName.isEmpty())
{
ADSWorkspaceProvider<Mantid::API::IMDEventWorkspace> wsProvider;
API::Workspace_sptr ws = wsProvider.fetchWorkspace(wsName.toStdString());
API::IMDEventWorkspace_const_sptr infoWs = boost::dynamic_pointer_cast<const API::IMDEventWorkspace>(ws);
std::size_t numDims = infoWs->getNonIntegratedDimensions().size();
if (numDims > 3)
{
QMessageBox::warning(this, QApplication::tr("Dimension Warning"),
QApplication::tr("SplatterPlot mode does not allow "\
"4D data. Please integrate to 3D "\
"via SliceMD!. Returning to Standard View."));
pqActiveObjects::instance().setActiveSource(src);
emit this->resetToStandardView();
return true;
}
}
}
return false;
}

/**
* This function checks to see if the Override PC button has been
* toggled. If the state is unchecked (false), we want to make sure
Expand Down

0 comments on commit 5228963

Please sign in to comment.