Skip to content

Commit

Permalink
Refs #11690 Add warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonPiccardoSelg committed May 6, 2015
1 parent 0b0df2c commit 0085812
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 1 deletion.
Expand Up @@ -15,6 +15,7 @@
#include "MantidVatesAPI/vtkMDHexFactory.h"
#include "MantidVatesAPI/vtkMDQuadFactory.h"
#include "MantidVatesAPI/vtkMDLineFactory.h"
#include "MantidVatesAPI/vtkMD0DFactory.h"
#include "MantidVatesAPI/FilteringUpdateProgressAction.h"
#include "MantidVatesAPI/IgnoreZerosThresholdRange.h"

Expand Down Expand Up @@ -184,12 +185,14 @@ int vtkMDEWSource::RequestData(vtkInformation *, vtkInformationVector **, vtkInf
FilterUpdateProgressAction<vtkMDEWSource> drawingProgressUpdate(this, "Drawing...");

ThresholdRange_scptr thresholdRange(new IgnoreZerosThresholdRange());
vtkMD0DFactory* zeroDFactory = new vtkMD0DFactory(thresholdRange, "signal");
vtkMDHexFactory* hexahedronFactory = new vtkMDHexFactory(thresholdRange, "signal");
vtkMDQuadFactory* quadFactory = new vtkMDQuadFactory(thresholdRange, "signal");
vtkMDLineFactory* lineFactory = new vtkMDLineFactory(thresholdRange, "signal");

hexahedronFactory->SetSuccessor(quadFactory);
quadFactory->SetSuccessor(lineFactory);
lineFactory->SetSuccessor(zeroDFactory);

hexahedronFactory->setTime(m_time);
vtkDataSet* product = m_presenter->execute(hexahedronFactory, loadingProgressUpdate, drawingProgressUpdate);
Expand Down
Expand Up @@ -17,6 +17,7 @@
#include "MantidVatesAPI/vtkMDHistoHexFactory.h"
#include "MantidVatesAPI/vtkMDHistoQuadFactory.h"
#include "MantidVatesAPI/vtkMDHistoLineFactory.h"
#include "MantidVatesAPI/vtkMD0DFactory.h"
#include "MantidVatesAPI/FilteringUpdateProgressAction.h"
#include "MantidVatesAPI/IgnoreZerosThresholdRange.h"

Expand Down Expand Up @@ -175,6 +176,7 @@ int vtkMDHWSource::RequestData(vtkInformation *, vtkInformationVector **, vtkInf
/*
Will attempt to handle drawing in 4D case and then in 3D case if that fails, and so on down to 1D
*/
vtkMD0DFactory* zeroDFactory = new vtkMD0DFactory(thresholdRange, "signal");
vtkMDHistoLineFactory* lineFactory = new vtkMDHistoLineFactory(thresholdRange, "signal");
vtkMDHistoQuadFactory* quadFactory = new vtkMDHistoQuadFactory(thresholdRange, "signal");
vtkMDHistoHexFactory* hexFactory = new vtkMDHistoHexFactory(thresholdRange, "signal");
Expand All @@ -183,6 +185,7 @@ int vtkMDHWSource::RequestData(vtkInformation *, vtkInformationVector **, vtkInf
factory->SetSuccessor(hexFactory);
hexFactory->SetSuccessor(quadFactory);
quadFactory->SetSuccessor(lineFactory);
lineFactory->SetSuccessor(zeroDFactory);

vtkDataSet* product = m_presenter->execute(factory, loadingProgressUpdate, drawingProgressUpdate);

Expand Down
7 changes: 7 additions & 0 deletions Code/Mantid/Vates/VatesAPI/src/vtkMD0DFactory.cpp
Expand Up @@ -2,9 +2,15 @@
#include "MantidAPI/IMDWorkspace.h"
#include "MantidVatesAPI/vtkNullUnstructuredGrid.h"
#include "MantidVatesAPI/ProgressAction.h"
#include "MantidKernel/Logger.h"

using namespace Mantid::API;

namespace
{
Mantid::Kernel::Logger g_log("vtkMD0DFactory");
}

namespace Mantid
{
namespace VATES
Expand All @@ -16,6 +22,7 @@ namespace Mantid
*/
vtkMD0DFactory::vtkMD0DFactory(ThresholdRange_scptr thresholdRange, const std::string& scalarName) : m_thresholdRange(thresholdRange), m_scalarName(scalarName)
{
g_log.warning() << "Creating factory " << this->getFactoryTypeName() << ". You are viewing data with less than three dimensions in the VSI. \n";
}

/// Destructor
Expand Down
7 changes: 7 additions & 0 deletions Code/Mantid/Vates/VatesAPI/src/vtkMDHistoLineFactory.cpp
Expand Up @@ -12,11 +12,17 @@
#include "MantidAPI/NullCoordTransform.h"
#include "MantidDataObjects/MDHistoWorkspace.h"
#include "MantidKernel/ReadLock.h"
#include "MantidKernel/Logger.h"

using Mantid::API::IMDWorkspace;
using Mantid::DataObjects::MDHistoWorkspace;
using Mantid::API::NullCoordTransform;

namespace
{
Mantid::Kernel::Logger g_log("vtkMDHistoLineFactory");
}

namespace Mantid
{

Expand All @@ -26,6 +32,7 @@ namespace Mantid
vtkMDHistoLineFactory::vtkMDHistoLineFactory(ThresholdRange_scptr thresholdRange, const std::string& scalarName) : m_scalarName(scalarName),
m_thresholdRange(thresholdRange)
{
g_log.warning() << "Creating factory " << this->getFactoryTypeName() << ". You are viewing data with less than three dimensions in the VSI. \n";
}

/**
Expand Down
8 changes: 7 additions & 1 deletion Code/Mantid/Vates/VatesAPI/src/vtkMDHistoQuadFactory.cpp
Expand Up @@ -13,19 +13,25 @@
#include "vtkSmartPointer.h"
#include <vector>
#include "MantidKernel/ReadLock.h"
#include "MantidKernel/Logger.h"

using Mantid::API::IMDWorkspace;
using Mantid::Kernel::CPUTimer;
using Mantid::DataObjects::MDHistoWorkspace;

namespace
{
Mantid::Kernel::Logger g_log("vtkMDHistoQuadFactory");
}

namespace Mantid
{

namespace VATES
{

vtkMDHistoQuadFactory::vtkMDHistoQuadFactory(ThresholdRange_scptr thresholdRange, const std::string& scalarName) : m_scalarName(scalarName), m_thresholdRange(thresholdRange)
{
g_log.warning() << "Creating factory " << this->getFactoryTypeName() << ". You are viewing data with less than three dimensions in the VSI. \n";
}

/**
Expand Down
7 changes: 7 additions & 0 deletions Code/Mantid/Vates/VatesAPI/src/vtkMDLineFactory.cpp
Expand Up @@ -13,9 +13,15 @@
#include <vtkLine.h>
#include <vtkCellData.h>
#include "MantidKernel/ReadLock.h"
#include "MantidKernel/Logger.h"

using namespace Mantid::API;

namespace
{
Mantid::Kernel::Logger g_log("vtkMDLineFactory");
}

namespace Mantid
{
namespace VATES
Expand All @@ -27,6 +33,7 @@ namespace Mantid
*/
vtkMDLineFactory::vtkMDLineFactory(ThresholdRange_scptr thresholdRange, const std::string& scalarName) : m_thresholdRange(thresholdRange), m_scalarName(scalarName)
{
g_log.warning() << "Creating factory " << this->getFactoryTypeName() << ". You are viewing data with less than three dimensions in the VSI. \n";
}

/// Destructor
Expand Down
7 changes: 7 additions & 0 deletions Code/Mantid/Vates/VatesAPI/src/vtkMDQuadFactory.cpp
Expand Up @@ -13,16 +13,23 @@
#include <vtkQuad.h>
#include <vtkCellData.h>
#include "MantidKernel/ReadLock.h"
#include "MantidKernel/Logger.h"

using namespace Mantid::API;

namespace
{
Mantid::Kernel::Logger g_log("vtkMDQuadFactory");
}

namespace Mantid
{
namespace VATES
{
/// Constructor
vtkMDQuadFactory::vtkMDQuadFactory(ThresholdRange_scptr thresholdRange, const std::string& scalarName) : m_thresholdRange(thresholdRange), m_scalarName(scalarName)
{
g_log.warning() << "Creating factory " << this->getFactoryTypeName() << ". You are viewing data with less than three dimensions in the VSI. \n";
}

/// Destructor
Expand Down

0 comments on commit 0085812

Please sign in to comment.