From cdbbc06261038ea1a306daee9c16a03fbc5b51cc Mon Sep 17 00:00:00 2001 From: Michael Reuter <reuterma@ornl.gov> Date: Tue, 24 May 2011 14:09:59 +0000 Subject: [PATCH] Removing VisIt source code directories. This refs #3071. --- .../Vates/VisitDataBases/CMakeLists.txt | 84 -- .../Vates/VisitDataBases/MDFileReader.xml | 11 - .../VisitDataBases/MDFileReaderPluginInfo.h | 100 -- .../avtMDFileReaderFileFormat.h | 110 -- .../src/MDFileReaderCommonPluginInfo.C | 94 -- .../src/MDFileReaderEnginePluginInfo.C | 73 -- .../src/MDFileReaderMDServerPluginInfo.C | 60 - .../src/MDFileReaderPluginInfo.C | 211 ---- .../src/avtMDFileReaderFileFormat.C | 249 ---- Code/Mantid/Vates/VisitPlugins/CMakeLists.txt | 2 - .../CutterOperator/CMakeLists.txt | 136 -- .../CutterOperator/CutterOperator.xml | 17 - .../CutterOperator/CutterOperator.xpm | 217 ---- .../CutterOperatorAttributes.java | 234 ---- .../inc/CutterOperator/ClipperAdapter.h | 62 - .../CutterOperator/CutterOperatorAttributes.h | 141 --- .../CutterOperator/CutterOperatorPluginInfo.h | 125 -- .../PyCutterOperatorAttributes.h | 64 - .../CutterOperator/QvisCutterOperatorWindow.h | 114 -- .../CutterOperator/avtCutterOperatorFilter.h | 97 -- .../CutterOperator/src/ClipperAdapter.C | 48 - .../src/CutterOperatorAttributes.C | 757 ------------ .../src/CutterOperatorCommonPluginInfo.C | 85 -- .../src/CutterOperatorEnginePluginInfo.C | 78 -- .../src/CutterOperatorGUIPluginInfo.C | 128 -- .../src/CutterOperatorPluginInfo.C | 137 --- .../src/CutterOperatorScriptingPluginInfo.C | 176 --- .../src/CutterOperatorViewerPluginInfo.C | 230 ---- .../src/PyCutterOperatorAttributes.C | 577 --------- .../src/QvisCutterOperatorWindow.C | 388 ------ .../src/avtCutterOperatorFilter.C | 216 ---- .../Vates/VisitPlugins/FindMantidKernel.cmake | 33 - .../RebinningCutterOperator/CMakeLists.txt | 142 --- .../RebinningCutter.java | 198 --- .../RebinningCutter.xml | 45 - .../RebinningCutter.xpm | 217 ---- .../RebinningCutterAttributes.java | 503 -------- .../RebinningCutterOperator/DimensionWidget.h | 104 -- .../RebinningCutterOperator/GeometryWidget.h | 105 -- .../IntegratedDimensionWidget.h | 27 - .../PyRebinningCutter.h | 64 - .../PyRebinningCutterAttributes.h | 64 - .../QvisRebinningCutterWindow.h | 161 --- .../RebinningCutterOperator/RebinningCutter.h | 125 -- .../RebinningCutterAttributes.h | 198 --- .../RebinningCutterPluginInfo.h | 125 -- .../VisITProgressAction.h | 29 - .../avtRebinningCutterFilter.h | 149 --- .../src/DimensionWidget.C | 199 --- .../src/GeometryWidget.C | 150 --- .../src/IntegratedDimensionWidget.C | 46 - .../src/PyRebinningCutter.C | 555 --------- .../src/PyRebinningCutterAttributes.C | 1073 ---------------- .../src/QvisRebinningCutterWindow.C | 691 ----------- .../src/RebinningCutter.C | 573 --------- .../src/RebinningCutterAttributes.C | 1093 ----------------- .../src/RebinningCutterCommonPluginInfo.C | 85 -- .../src/RebinningCutterEnginePluginInfo.C | 78 -- .../src/RebinningCutterGUIPluginInfo.C | 128 -- .../src/RebinningCutterPluginInfo.C | 137 --- .../src/RebinningCutterScriptingPluginInfo.C | 176 --- .../src/RebinningCutterViewerPluginInfo.C | 230 ---- .../src/VisITProgressAction.C | 20 - .../src/avtRebinningCutterFilter.C | 445 ------- 64 files changed, 12989 deletions(-) delete mode 100644 Code/Mantid/Vates/VisitDataBases/CMakeLists.txt delete mode 100644 Code/Mantid/Vates/VisitDataBases/MDFileReader.xml delete mode 100644 Code/Mantid/Vates/VisitDataBases/inc/VisitDataBases/MDFileReaderPluginInfo.h delete mode 100644 Code/Mantid/Vates/VisitDataBases/inc/VisitDataBases/avtMDFileReaderFileFormat.h delete mode 100644 Code/Mantid/Vates/VisitDataBases/src/MDFileReaderCommonPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitDataBases/src/MDFileReaderEnginePluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitDataBases/src/MDFileReaderMDServerPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitDataBases/src/MDFileReaderPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitDataBases/src/avtMDFileReaderFileFormat.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/CMakeLists.txt delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/CMakeLists.txt delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperator.xml delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperator.xpm delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperatorAttributes.java delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/ClipperAdapter.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/CutterOperatorAttributes.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/CutterOperatorPluginInfo.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/PyCutterOperatorAttributes.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/QvisCutterOperatorWindow.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/avtCutterOperatorFilter.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/src/ClipperAdapter.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorAttributes.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorCommonPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorEnginePluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorGUIPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorScriptingPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorViewerPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/src/PyCutterOperatorAttributes.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/src/QvisCutterOperatorWindow.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/CutterOperator/src/avtCutterOperatorFilter.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/FindMantidKernel.cmake delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/CMakeLists.txt delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.java delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.xml delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.xpm delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutterAttributes.java delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/DimensionWidget.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/GeometryWidget.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/IntegratedDimensionWidget.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/PyRebinningCutter.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/PyRebinningCutterAttributes.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/QvisRebinningCutterWindow.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutter.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutterAttributes.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutterPluginInfo.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/VisITProgressAction.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/avtRebinningCutterFilter.h delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/DimensionWidget.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/GeometryWidget.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/IntegratedDimensionWidget.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/PyRebinningCutter.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/PyRebinningCutterAttributes.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/QvisRebinningCutterWindow.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutter.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterAttributes.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterCommonPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterEnginePluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterGUIPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterScriptingPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterViewerPluginInfo.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/VisITProgressAction.C delete mode 100644 Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/avtRebinningCutterFilter.C diff --git a/Code/Mantid/Vates/VisitDataBases/CMakeLists.txt b/Code/Mantid/Vates/VisitDataBases/CMakeLists.txt deleted file mode 100644 index 87d22c6e3b1..00000000000 --- a/Code/Mantid/Vates/VisitDataBases/CMakeLists.txt +++ /dev/null @@ -1,84 +0,0 @@ -# DO NOT EDIT THIS FILE! THIS FILE IS AUTOMATICALLY GENERATED BY xml2cmake -CMAKE_MINIMUM_REQUIRED(VERSION 2.6.4 FATAL_ERROR) -INCLUDE(${VISIT_INCLUDE_DIR}/PluginVsInstall.cmake) -INCLUDE(${VISIT_INCLUDE_DIR}/VisItLibraryDependencies.cmake) - -PROJECT(MDFileReader) - -set_mantid_subprojects(Vates/VatesAPI) - -SET(COMMON_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/MDFileReaderPluginInfo.C -${CMAKE_CURRENT_SOURCE_DIR}/src/MDFileReaderCommonPluginInfo.C -) - -SET(LIBI_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/MDFileReaderPluginInfo.C -) - -SET(LIBM_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/MDFileReaderMDServerPluginInfo.C -${COMMON_SOURCES} -${CMAKE_CURRENT_SOURCE_DIR}/src/avtMDFileReaderFileFormat.C -) - -SET(LIBE_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/MDFileReaderEnginePluginInfo.C -${COMMON_SOURCES} -${CMAKE_CURRENT_SOURCE_DIR}/src/avtMDFileReaderFileFormat.C -) - -INCLUDE_DIRECTORIES( -${CMAKE_CURRENT_SOURCE_DIR} -${VISIT_COMMON_INCLUDES} -${VISIT_INCLUDE_DIR}/visit/avt/DBAtts/MetaData -${VISIT_INCLUDE_DIR}/visit/avt/DBAtts/SIL -${VISIT_INCLUDE_DIR}/visit/avt/Database/Database -${VISIT_INCLUDE_DIR}/visit/avt/Database/Formats -${VISIT_INCLUDE_DIR}/visit/avt/Database/Ghost -${VISIT_INCLUDE_DIR}/visit/avt/FileWriter -${VISIT_INCLUDE_DIR}/visit/avt/Filters -${VISIT_INCLUDE_DIR}/visit/avt/MIR/Base -${VISIT_INCLUDE_DIR}/visit/avt/MIR/Tet -${VISIT_INCLUDE_DIR}/visit/avt/MIR/Zoo -${VISIT_INCLUDE_DIR}/visit/avt/Math -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/AbstractFilters -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Data -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Pipeline -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Sinks -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Sources -${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/VisWindow -${VISIT_INCLUDE_DIR}/visit/visit_vtk/full -${VISIT_INCLUDE_DIR}/visit/visit_vtk/lightweight -${VTK_INCLUDE_DIRS} -${CMAKE_CURRENT_SOURCE_DIR}/inc/VisitDataBases -) - -LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${VTK_LIBRARY_DIRS}) - -ADD_LIBRARY(IMDFileReaderDatabase ${LIBI_SOURCES}) -TARGET_LINK_LIBRARIES(IMDFileReaderDatabase visitcommon) -SET(INSTALLTARGETS IMDFileReaderDatabase) - -IF(NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY) - ADD_LIBRARY(MMDFileReaderDatabase ${LIBM_SOURCES} ) - TARGET_LINK_LIBRARIES(MMDFileReaderDatabase visitcommon avtdbatts avtdatabase_ser ${MANTID_SUBPROJECT_LIBS}) - ADD_TARGET_DEFINITIONS(MMDFileReaderDatabase MDSERVER) - SET(INSTALLTARGETS ${INSTALLTARGETS} MMDFileReaderDatabase) -ENDIF(NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY) - -ADD_LIBRARY(EMDFileReaderDatabase_ser ${LIBE_SOURCES}) -TARGET_LINK_LIBRARIES(EMDFileReaderDatabase_ser visitcommon avtdatabase_ser avtpipeline_ser ${MANTID_SUBPROJECT_LIBS}) -ADD_TARGET_DEFINITIONS(EMDFileReaderDatabase_ser ENGINE) -SET(INSTALLTARGETS ${INSTALLTARGETS} EMDFileReaderDatabase_ser) - -IF(VISIT_PARALLEL) - ADD_PARALLEL_LIBRARY(EMDFileReaderDatabase_par ${LIBE_SOURCES}) - TARGET_LINK_LIBRARIES(EMDFileReaderDatabase_par visitcommon avtdatabase_par avtpipeline_par ) - ADD_TARGET_DEFINITIONS(EMDFileReaderDatabase_par ENGINE) - SET(INSTALLTARGETS ${INSTALLTARGETS} EMDFileReaderDatabase_par) -ENDIF(VISIT_PARALLEL) - - -VISIT_INSTALL_DATABASE_PLUGINS(${INSTALLTARGETS}) -VISIT_PLUGIN_TARGET_PREFIX(${INSTALLTARGETS}) diff --git a/Code/Mantid/Vates/VisitDataBases/MDFileReader.xml b/Code/Mantid/Vates/VisitDataBases/MDFileReader.xml deleted file mode 100644 index a07bc253e30..00000000000 --- a/Code/Mantid/Vates/VisitDataBases/MDFileReader.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0"?> - <Plugin name="MDFileReader" type="database" label="MD File Reader" version="2" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" dbtype="MTSD" haswriter="false" hasoptions="false" filePatternsStrict="false" opensWholeDirectory="false"> - <FilePatterns> - sqw - SQW - .sqw - .SQW - </FilePatterns> - <Attribute name="" purpose="" persistent="false" keyframe="true" exportAPI="" exportInclude=""> - </Attribute> - </Plugin> diff --git a/Code/Mantid/Vates/VisitDataBases/inc/VisitDataBases/MDFileReaderPluginInfo.h b/Code/Mantid/Vates/VisitDataBases/inc/VisitDataBases/MDFileReaderPluginInfo.h deleted file mode 100644 index fcea46c835c..00000000000 --- a/Code/Mantid/Vates/VisitDataBases/inc/VisitDataBases/MDFileReaderPluginInfo.h +++ /dev/null @@ -1,100 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// **************************************************************************** -// MDFileReaderPluginInfo.h -// **************************************************************************** - -#ifndef MDFILEREADER_PLUGIN_INFO_H -#define MDFILEREADER_PLUGIN_INFO_H -#include <DatabasePluginInfo.h> -#include <database_plugin_exports.h> - -class avtDatabase; -class avtDatabaseWriter; - -// **************************************************************************** -// Class: MDFileReaderDatabasePluginInfo -// -// Purpose: -// Classes that provide all the information about the MDFileReader plugin. -// Portions are separated into pieces relevant to the appropriate -// components of VisIt. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -class MDFileReaderGeneralPluginInfo : public virtual GeneralDatabasePluginInfo -{ - public: - virtual const char *GetName() const; - virtual const char *GetVersion() const; - virtual const char *GetID() const; - virtual bool EnabledByDefault() const; - virtual bool HasWriter() const; - virtual std::vector<std::string> GetDefaultFilePatterns() const; - virtual bool AreDefaultFilePatternsStrict() const; - virtual bool OpensWholeDirectory() const; -}; - -class MDFileReaderCommonPluginInfo : public virtual CommonDatabasePluginInfo, public virtual MDFileReaderGeneralPluginInfo -{ - public: - virtual DatabaseType GetDatabaseType(); - virtual avtDatabase *SetupDatabase(const char * const *list, - int nList, int nBlock); -}; - -class MDFileReaderMDServerPluginInfo : public virtual MDServerDatabasePluginInfo, public virtual MDFileReaderCommonPluginInfo -{ - public: - // this makes compilers happy... remove if we ever have functions here - virtual void dummy(); -}; - -class MDFileReaderEnginePluginInfo : public virtual EngineDatabasePluginInfo, public virtual MDFileReaderCommonPluginInfo -{ - public: - virtual avtDatabaseWriter *GetWriter(void); -}; - -#endif diff --git a/Code/Mantid/Vates/VisitDataBases/inc/VisitDataBases/avtMDFileReaderFileFormat.h b/Code/Mantid/Vates/VisitDataBases/inc/VisitDataBases/avtMDFileReaderFileFormat.h deleted file mode 100644 index 8d317ba48ad..00000000000 --- a/Code/Mantid/Vates/VisitDataBases/inc/VisitDataBases/avtMDFileReaderFileFormat.h +++ /dev/null @@ -1,110 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// avtMDFileReaderFileFormat.h // -// ************************************************************************* // - -#ifndef AVT_MDFileReader_FILE_FORMAT_H -#define AVT_MDFileReader_FILE_FORMAT_H - -#include <avtMTSDFileFormat.h> -#include <MantidVatesAPI/MultiDimensionalDbPresenter.h> -#include <vector> - - -// **************************************************************************** -// Class: avtMDFileReaderFileFormat -// -// Purpose: -// Reads in MDFileReader files as a plugin to VisIt. -// -// Programmer: owen -- generated by xml2avt -// Creation: Wed Dec 22 12:59:58 PDT 2010 -// -// **************************************************************************** - -class avtMDFileReaderFileFormat : public avtMTSDFileFormat -{ - public: - avtMDFileReaderFileFormat(const char *); - virtual ~avtMDFileReaderFileFormat() {;}; - - // - // This is used to return unconvention data -- ranging from material - // information to information about block connectivity. - // - // virtual void *GetAuxiliaryData(const char *var, int timestep, - // const char *type, void *args, - // DestructorFunction &); - // - - // - // If you know the times and cycle numbers, overload this function. - // Otherwise, VisIt will make up some reasonable ones for you. - // - // virtual void GetCycles(std::vector<int> &); - // virtual void GetTimes(std::vector<double> &); - // - - virtual int GetNTimesteps(void); - virtual void GetCycles(std::vector<int> &cycles); - virtual void GetTimes(std::vector<double> ×); - - virtual bool ReturnsValidCycle() const; - virtual bool ReturnsValidTime() const; - - virtual const char *GetType(void) { return "MDFileReader"; }; - virtual void FreeUpResources(void); - - virtual vtkDataSet *GetMesh(int, const char *); - virtual vtkDataArray *GetVar(int, const char *); - virtual vtkDataArray *GetVectorVar(int, const char *); - - protected: - // DATA MEMBERS - - virtual void PopulateDatabaseMetaData(avtDatabaseMetaData *, int); - - private: - - Mantid::VATES::MultiDimensionalDbPresenter m_executor; -}; - - -#endif diff --git a/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderCommonPluginInfo.C b/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderCommonPluginInfo.C deleted file mode 100644 index 21da05d52b0..00000000000 --- a/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderCommonPluginInfo.C +++ /dev/null @@ -1,94 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#include <MDFileReaderPluginInfo.h> -#include <avtMDFileReaderFileFormat.h> -#include <avtMTSDFileFormatInterface.h> -#include <avtGenericDatabase.h> - -// **************************************************************************** -// Method: MDFileReaderCommonPluginInfo::GetDatabaseType -// -// Purpose: -// Returns the type of a MDFileReader database. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -DatabaseType -MDFileReaderCommonPluginInfo::GetDatabaseType() -{ - return DB_TYPE_MTSD; -} - -// **************************************************************************** -// Method: MDFileReaderCommonPluginInfo::SetupDatabase -// -// Purpose: -// Sets up a MDFileReader database. -// -// Arguments: -// list A list of file names. -// nList The number of timesteps in list. -// nBlocks The number of blocks in the list. -// -// Returns: A MDFileReader database from list. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -avtDatabase * -MDFileReaderCommonPluginInfo::SetupDatabase(const char *const *list, - int nList, int nBlock) -{ - int nTimestepGroups = nList / nBlock; - avtMTSDFileFormat ***ffl = new avtMTSDFileFormat**[nTimestepGroups]; - for (int i = 0 ; i < nTimestepGroups ; i++) - { - ffl[i] = new avtMTSDFileFormat*[nBlock]; - for (int j = 0 ; j < nBlock ; j++) - { - ffl[i][j] = new avtMDFileReaderFileFormat(list[i*nBlock + j]); - } - } - avtMTSDFileFormatInterface *inter - = new avtMTSDFileFormatInterface(ffl, nTimestepGroups, nBlock); - return new avtGenericDatabase(inter); -} diff --git a/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderEnginePluginInfo.C b/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderEnginePluginInfo.C deleted file mode 100644 index e36074bcc8b..00000000000 --- a/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderEnginePluginInfo.C +++ /dev/null @@ -1,73 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#include <MDFileReaderPluginInfo.h> - -// **************************************************************************** -// Function: GetEngineInfo -// -// Purpose: -// Return a new EnginePluginInfo for the MDFileReader database. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" DBP_EXPORT EngineDatabasePluginInfo* MDFileReader_GetEngineInfo() -{ - return new MDFileReaderEnginePluginInfo; -} - -// **************************************************************************** -// Method: MDFileReaderEnginePluginInfo::GetWriter -// -// Purpose: -// Sets up a MDFileReader writer. -// -// Returns: A MDFileReader writer. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -avtDatabaseWriter * -MDFileReaderEnginePluginInfo::GetWriter(void) -{ - return NULL; -} - diff --git a/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderMDServerPluginInfo.C b/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderMDServerPluginInfo.C deleted file mode 100644 index 728a80cc6ba..00000000000 --- a/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderMDServerPluginInfo.C +++ /dev/null @@ -1,60 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#include <MDFileReaderPluginInfo.h> - -// **************************************************************************** -// Function: GetMDServerInfo -// -// Purpose: -// Return a new MDServerPluginInfo for the MDFileReader database. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" DBP_EXPORT MDServerDatabasePluginInfo* MDFileReader_GetMDServerInfo() -{ - return new MDFileReaderMDServerPluginInfo; -} - -// this makes compilers happy... remove if we ever have functions here -void MDFileReaderMDServerPluginInfo::dummy() -{ -} - diff --git a/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderPluginInfo.C b/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderPluginInfo.C deleted file mode 100644 index de6e5baf27c..00000000000 --- a/Code/Mantid/Vates/VisitDataBases/src/MDFileReaderPluginInfo.C +++ /dev/null @@ -1,211 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: MDFileReaderPluginInfo.C -// ************************************************************************* // - -#include <MDFileReaderPluginInfo.h> - -#include <visit-config.h> -extern "C" DBP_EXPORT const char *MDFileReaderVisItPluginVersion = VISIT_VERSION; - -// **************************************************************************** -// Function: GetGeneralInfo -// -// Purpose: -// Return a new GeneralPluginInfo for the MDFileReader database. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" DBP_EXPORT GeneralDatabasePluginInfo* MDFileReader_GetGeneralInfo() -{ - return new MDFileReaderGeneralPluginInfo; -} - -// **************************************************************************** -// Method: MDFileReaderGeneralPluginInfo::GetName -// -// Purpose: -// Return the name of the database plugin. -// -// Returns: A pointer to the name of the database plugin. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -const char * -MDFileReaderGeneralPluginInfo::GetName() const -{ - return "MDFileReader"; -} - -// **************************************************************************** -// Method: MDFileReaderGeneralPluginInfo::GetVersion -// -// Purpose: -// Return the version of the database plugin. -// -// Returns: A pointer to the version of the database plugin. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -const char * -MDFileReaderGeneralPluginInfo::GetVersion() const -{ - return "2"; -} - -// **************************************************************************** -// Method: MDFileReaderGeneralPluginInfo::GetID -// -// Purpose: -// Return the id of the database plugin. -// -// Returns: A pointer to the id of the database plugin. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -const char * -MDFileReaderGeneralPluginInfo::GetID() const -{ - return "MDFileReader_2"; -} -// **************************************************************************** -// Method: MDFileReaderGeneralPluginInfo::EnabledByDefault -// -// Purpose: -// Return true if this plugin should be enabled by default; false otherwise. -// -// Returns: true/false -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -bool -MDFileReaderGeneralPluginInfo::EnabledByDefault() const -{ - return true; -} -// **************************************************************************** -// Method: MDFileReaderGeneralPluginInfo::HasWriter -// -// Purpose: -// Return true if this plugin has a database writer. -// -// Returns: true/false -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -bool -MDFileReaderGeneralPluginInfo::HasWriter() const -{ - return false; -} -// **************************************************************************** -// Method: MDFileReaderGeneralPluginInfo::GetDefaultFilePatterns -// -// Purpose: -// Returns the default patterns for a MDFileReader database. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -std::vector<std::string> -MDFileReaderGeneralPluginInfo::GetDefaultFilePatterns() const -{ - std::vector<std::string> defaultPatterns; - defaultPatterns.push_back("sqw"); - defaultPatterns.push_back("SQW"); - defaultPatterns.push_back(".sqw"); - defaultPatterns.push_back(".SQW"); - defaultPatterns.push_back("*.sqw"); - defaultPatterns.push_back("*.SQW"); - - return defaultPatterns; -} - -// **************************************************************************** -// Method: MDFileReaderGeneralPluginInfo::AreDefaultFilePatternsStrict -// -// Purpose: -// Returns if the file patterns for a MDFileReader database are -// intended to be interpreted strictly by default. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -bool -MDFileReaderGeneralPluginInfo::AreDefaultFilePatternsStrict() const -{ - return false; -} - -// **************************************************************************** -// Method: MDFileReaderGeneralPluginInfo::OpensWholeDirectory -// -// Purpose: -// Returns if the MDFileReader plugin opens a whole directory name -// instead of a single file. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -bool -MDFileReaderGeneralPluginInfo::OpensWholeDirectory() const -{ - return false; -} diff --git a/Code/Mantid/Vates/VisitDataBases/src/avtMDFileReaderFileFormat.C b/Code/Mantid/Vates/VisitDataBases/src/avtMDFileReaderFileFormat.C deleted file mode 100644 index 5fe6951fe53..00000000000 --- a/Code/Mantid/Vates/VisitDataBases/src/avtMDFileReaderFileFormat.C +++ /dev/null @@ -1,249 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// avtMDFileReaderFileFormat.C // -// ************************************************************************* // - -#include <avtMDFileReaderFileFormat.h> - -#include <string> - -#include <vtkFloatArray.h> -#include <vtkRectilinearGrid.h> -#include <vtkStructuredGrid.h> -#include <vtkUnstructuredGrid.h> -#include <vtkDoubleArray.h> -#include <avtDatabaseMetaData.h> - -#include <DBOptionsAttributes.h> -#include <Expression.h> - -#include <InvalidVariableException.h> -#include "DebugStream.h" - -using std::string; - - -// **************************************************************************** -// Method: avtMDFileReaderFileFormat constructor -// -// Programmer: owen -- generated by xml2avt -// Creation: Wed Dec 22 12:59:58 PDT 2010 -// -// **************************************************************************** - -avtMDFileReaderFileFormat::avtMDFileReaderFileFormat(const char *filename) : - avtMTSDFileFormat(&filename, 1), m_executor() -{ - m_executor.execute(std::string(filename)); -} - - -// **************************************************************************** -// Method: avtEMSTDFileFormat::GetNTimesteps -// -// Purpose: -// Tells the rest of the code how many timesteps there are in this file. -// -// Programmer: owen -- generated by xml2avt -// Creation: Wed Dec 22 12:59:58 PDT 2010 -// -// **************************************************************************** - -int -avtMDFileReaderFileFormat::GetNTimesteps(void) -{ - return m_executor.getNumberOfTimesteps(); -} - -void avtMDFileReaderFileFormat::GetCycles(std::vector<int> &cycles) -{ - std::vector<int> allCycles = m_executor.getCycles(); - cycles.swap(allCycles); -} - -void avtMDFileReaderFileFormat::GetTimes(std::vector<double> ×) -{ - std::vector<double> allTimes = m_executor.getTimesteps(); - times.swap(allTimes); -} - -bool avtMDFileReaderFileFormat::ReturnsValidCycle() const -{ - return true; -} - -bool avtMDFileReaderFileFormat::ReturnsValidTime() const -{ - return true; -} - - -// **************************************************************************** -// Method: avtMDFileReaderFileFormat::FreeUpResources -// -// Purpose: -// When VisIt is done focusing on a particular timestep, it asks that -// timestep to free up any resources (memory, file descriptors) that -// it has associated with it. This method is the mechanism for doing -// that. -// -// Programmer: owen -- generated by xml2avt -// Creation: Wed Dec 22 12:59:58 PDT 2010 -// -// **************************************************************************** - -void -avtMDFileReaderFileFormat::FreeUpResources(void) -{ -} - - -// **************************************************************************** -// Method: avtMDFileReaderFileFormat::PopulateDatabaseMetaData -// -// Purpose: -// This database meta-data object is like a table of contents for the -// file. By populating it, you are telling the rest of VisIt what -// information it can request from you. -// -// Programmer: owen -- generated by xml2avt -// Creation: Wed Dec 22 12:59:58 PDT 2010 -// -// **************************************************************************** - -void -avtMDFileReaderFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md, int timeState) -{ - - - avtMeshMetaData *mmd = new avtMeshMetaData; - mmd->name = "sqw"; - mmd->spatialDimension=3; - mmd->topologicalDimension =3; - mmd->meshType = AVT_CURVILINEAR_MESH; - mmd->numBlocks = 1; - mmd->xLabel = m_executor.getXAxisName(); - mmd->yLabel = m_executor.getYAxisName(); - mmd->zLabel = m_executor.getZAxisName(); - md->Add(mmd); - - avtScalarMetaData *smd = new avtScalarMetaData; - smd->name="signal"; - smd->meshName="sqw"; - smd->centering=AVT_ZONECENT; - smd->hasUnits=false; - md->Add(smd); -} - - -// **************************************************************************** -// Method: avtMDFileReaderFileFormat::GetMesh -// -// Purpose: -// Gets the mesh associated with this file. The mesh is returned as a -// derived type of vtkDataSet (ie vtkRectilinearGrid, vtkStructuredGrid, -// vtkUnstructuredGrid, etc). -// -// Arguments: -// timestate The index of the timestate. If GetNTimesteps returned -// 'N' time steps, this is guaranteed to be between 0 and N-1. -// meshname The name of the mesh of interest. This can be ignored if -// there is only one mesh. -// -// Programmer: owen -- generated by xml2avt -// Creation: Wed Dec 22 12:59:58 PDT 2010 -// -// **************************************************************************** - -vtkDataSet * -avtMDFileReaderFileFormat::GetMesh(int timestate, const char *meshname) -{ - return m_executor.getMesh(); -} - - -// **************************************************************************** -// Method: avtMDFileReaderFileFormat::GetVar -// -// Purpose: -// Gets a scalar variable associated with this file. Although VTK has -// support for many different types, the best bet is vtkFloatArray, since -// that is supported everywhere through VisIt. -// -// Arguments: -// timestate The index of the timestate. If GetNTimesteps returned -// 'N' time steps, this is guaranteed to be between 0 and N-1. -// varname The name of the variable requested. -// -// Programmer: owen -- generated by xml2avt -// Creation: Wed Dec 22 12:59:58 PDT 2010 -// -// **************************************************************************** - -vtkDataArray * -avtMDFileReaderFileFormat::GetVar(int timestate, const char *varname) -{ - return m_executor.getScalarDataFromTimeBin(timestate, varname); -} - - -// **************************************************************************** -// Method: avtMDFileReaderFileFormat::GetVectorVar -// -// Purpose: -// Gets a vector variable associated with this file. Although VTK has -// support for many different types, the best bet is vtkFloatArray, since -// that is supported everywhere through VisIt. -// -// Arguments: -// timestate The index of the timestate. If GetNTimesteps returned -// 'N' time steps, this is guaranteed to be between 0 and N-1. -// varname The name of the variable requested. -// -// Programmer: owen -- generated by xml2avt -// Creation: Wed Dec 22 12:59:58 PDT 2010 -// -// **************************************************************************** - -vtkDataArray * -avtMDFileReaderFileFormat::GetVectorVar(int timestate, const char *varname) -{ - return 0; -} diff --git a/Code/Mantid/Vates/VisitPlugins/CMakeLists.txt b/Code/Mantid/Vates/VisitPlugins/CMakeLists.txt deleted file mode 100644 index 691b8ef54df..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_subdirectory(RebinningCutterOperator) -add_subdirectory(CutterOperator) diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/CMakeLists.txt b/Code/Mantid/Vates/VisitPlugins/CutterOperator/CMakeLists.txt deleted file mode 100644 index 1b019c1254d..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/CMakeLists.txt +++ /dev/null @@ -1,136 +0,0 @@ -# DO NOT EDIT THIS FILE! THIS FILE IS AUTOMATICALLY GENERATED BY xml2cmake -CMAKE_MINIMUM_REQUIRED(VERSION 2.6.4 FATAL_ERROR) -INCLUDE(${VISIT_INCLUDE_DIR}/PluginVsInstall.cmake) -INCLUDE(${VISIT_INCLUDE_DIR}/VisItLibraryDependencies.cmake) - -PROJECT(CutterOperator) - -set_mantid_subprojects(Vates/VatesAPI) - -SET(COMMON_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/CutterOperatorPluginInfo.C -${CMAKE_CURRENT_SOURCE_DIR}/src/CutterOperatorCommonPluginInfo.C -${CMAKE_CURRENT_SOURCE_DIR}/src/CutterOperatorAttributes.C -) - -SET(LIBI_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/CutterOperatorPluginInfo.C -) - -SET(LIBG_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/CutterOperatorGUIPluginInfo.C -${CMAKE_CURRENT_SOURCE_DIR}/src/QvisCutterOperatorWindow.C -${COMMON_SOURCES} -) -SET(LIBG_MOC_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/inc/CutterOperator/QvisCutterOperatorWindow.h -) -QT_WRAP_CPP(GCutterOperatorOperator LIBG_SOURCES ${LIBG_MOC_SOURCES}) - -SET(LIBV_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/CutterOperatorViewerPluginInfo.C -${COMMON_SOURCES} -) - -SET(LIBE_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/CutterOperatorEnginePluginInfo.C -${CMAKE_CURRENT_SOURCE_DIR}/src/avtCutterOperatorFilter.C -${CMAKE_CURRENT_SOURCE_DIR}/src/ClipperAdapter.C -${COMMON_SOURCES} -) - -INCLUDE_DIRECTORIES( -${CMAKE_CURRENT_SOURCE_DIR} -${VISIT_COMMON_INCLUDES} -${VISIT_INCLUDE_DIR}/visit/avt/DBAtts/MetaData -${VISIT_INCLUDE_DIR}/visit/avt/DBAtts/SIL -${VISIT_INCLUDE_DIR}/visit/avt/Database/Database -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/Abstract -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/CMFE -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/Conditional -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/Derivations -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/General -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/ImageProcessing -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/Management -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/Math -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/MeshQuality -${VISIT_INCLUDE_DIR}/visit/avt/FileWriter -${VISIT_INCLUDE_DIR}/visit/avt/Filters -${VISIT_INCLUDE_DIR}/visit/avt/IVP -${VISIT_INCLUDE_DIR}/visit/avt/Math -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/AbstractFilters -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Data -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Pipeline -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Sinks -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Sources -${VISIT_INCLUDE_DIR}/visit/avt/Plotter -${VISIT_INCLUDE_DIR}/visit/avt/QtVisWindow -${VISIT_INCLUDE_DIR}/visit/avt/View -${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/Colleagues -${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/Interactors -${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/Proxies -${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/Tools -${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/VisWindow -${VISIT_INCLUDE_DIR}/visit/gui -${VISIT_INCLUDE_DIR}/visit/mdserver/proxy -${VISIT_INCLUDE_DIR}/visit/mdserver/rpc -${VISIT_INCLUDE_DIR}/visit/viewer/main -${VISIT_INCLUDE_DIR}/visit/viewer/proxy -${VISIT_INCLUDE_DIR}/visit/viewer/rpc -${VISIT_INCLUDE_DIR}/visit/winutil -${VISIT_INCLUDE_DIR}/visit/visit_vtk/full -${VISIT_INCLUDE_DIR}/visit/visit_vtk/lightweight -${QT_INCLUDE_DIR} -${QT_QTCORE_INCLUDE_DIR} -${QT_QTGUI_INCLUDE_DIR} -${VTK_INCLUDE_DIRS} -${PYTHON_INCLUDE_PATH} -${VISIT_INCLUDE_DIR}/visit/visitpy/visitpy -${CMAKE_CURRENT_SOURCE_DIR}/inc/CutterOperator -) - - -LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${QT_LIBRARY_DIR} ${GLEW_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} ) - -ADD_LIBRARY(ICutterOperatorOperator ${LIBI_SOURCES}) -TARGET_LINK_LIBRARIES(ICutterOperatorOperator visitcommon) -SET(INSTALLTARGETS ICutterOperatorOperator) - -IF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY) - ADD_LIBRARY(GCutterOperatorOperator ${LIBG_SOURCES}) - TARGET_LINK_LIBRARIES(GCutterOperatorOperator visitcommon gui ${MANTID_SUBPROJECT_LIBS}) - - ADD_LIBRARY(VCutterOperatorOperator ${LIBV_SOURCES}) - TARGET_LINK_LIBRARIES(VCutterOperatorOperator visitcommon viewer ) - SET(INSTALLTARGETS ${INSTALLTARGETS} GCutterOperatorOperator VCutterOperatorOperator) - - IF(VISIT_PYTHON_SCRIPTING) - SET(LIBS_SOURCES - ${CMAKE_CURRENT_SOURCE_DIR}/src/CutterOperatorScriptingPluginInfo.C - ${CMAKE_CURRENT_SOURCE_DIR}/src/PyCutterOperatorAttributes.C - ${COMMON_SOURCES} - ) - ADD_LIBRARY(SCutterOperatorOperator ${LIBS_SOURCES}) - TARGET_LINK_LIBRARIES(SCutterOperatorOperator visitcommon visitpy ${PYTHON_LIBRARY}) - SET(INSTALLTARGETS ${INSTALLTARGETS} SCutterOperatorOperator) - ENDIF(VISIT_PYTHON_SCRIPTING) - - IF(VISIT_JAVA) - ADD_CUSTOM_TARGET(JavaCutterOperator ALL ${CMAKE_Java_COMPILER} ${CMAKE_Java_FLAGS} -d ${VISIT_BINARY_DIR}/java -classpath ${VISIT_BINARY_DIR}/java CutterOperatorAttributes.java) - ADD_DEPENDENCIES(JavaCutterOperator JavaClient) - ENDIF(VISIT_JAVA) -ENDIF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY) - -ADD_LIBRARY(ECutterOperatorOperator_ser ${LIBE_SOURCES}) -TARGET_LINK_LIBRARIES(ECutterOperatorOperator_ser visitcommon avtexpressions_ser avtfilters_ser avtpipeline_ser ${MANTID_SUBPROJECT_LIBS}) -SET(INSTALLTARGETS ${INSTALLTARGETS} ECutterOperatorOperator_ser) - -IF(VISIT_PARALLEL) - ADD_PARALLEL_LIBRARY(ECutterOperatorOperator_par ${LIBE_SOURCES}) - TARGET_LINK_LIBRARIES(ECutterOperatorOperator_par visitcommon avtexpressions_par avtfilters_par avtpipeline_par ) - SET(INSTALLTARGETS ${INSTALLTARGETS} ECutterOperatorOperator_par) -ENDIF(VISIT_PARALLEL) - -VISIT_INSTALL_OPERATOR_PLUGINS(${INSTALLTARGETS}) -VISIT_PLUGIN_TARGET_PREFIX(${INSTALLTARGETS}) - diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperator.xml b/Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperator.xml deleted file mode 100644 index 171c5ca5aa4..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperator.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0"?> - <Plugin name="CutterOperator" type="operator" label="Pre-binning Cutter" version="1" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" iconFile="CutterOperator.xpm"> - <Attribute name="CutterOperatorAttributes" purpose="" persistent="true" keyframe="true" exportAPI="" exportInclude=""> - <Field name="originX" label="Origin X" type="double"> - </Field> - <Field name="originY" label="Origin Y" type="double"> - </Field> - <Field name="originZ" label="Origin Z" type="double"> - </Field> - <Field name="width" label="Width" type="double"> - </Field> - <Field name="height" label="Height" type="double"> - </Field> - <Field name="depth" label="Depth" type="double"> - </Field> - </Attribute> - </Plugin> diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperator.xpm b/Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperator.xpm deleted file mode 100644 index 7020c26172e..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperator.xpm +++ /dev/null @@ -1,217 +0,0 @@ -/* XPM */ -static const char * CutterOperator_xpm[] = { -"32 32 182 2", -" c None", -". c #FF6500", -"+ c #FF6B09", -"@ c #FFB787", -"# c #FF6000", -"$ c #FF6601", -"% c #FF6602", -"& c #FF6703", -"* c #FF6702", -"= c #FF6D0D", -"- c #FFAC75", -"; c #FF6805", -"> c #FF6906", -", c #FF6B0B", -"' c #FF934C", -") c #FFB07B", -"! c #FFA366", -"~ c #FF9D5C", -"{ c #FF893B", -"] c #FF6300", -"^ c #FF6A09", -"/ c #FF751A", -"( c #FF8E45", -"_ c #FFA569", -": c #FF7A22", -"< c #FF6400", -"[ c #FF6200", -"} c #FFB380", -"| c #FF5E00", -"1 c #FF9854", -"2 c #FFA76D", -"3 c #FFB17D", -"4 c #FF924A", -"5 c #FFA467", -"6 c #FF7921", -"7 c #FF5D00", -"8 c #FF6100", -"9 c #FFAE78", -"0 c #FF944F", -"a c #FF8A3D", -"b c #FF9047", -"c c #FF9148", -"d c #FFD0B0", -"e c #FFA970", -"f c #FFBD92", -"g c #FF5B00", -"h c #FF7215", -"i c #FFB98C", -"j c #FFEADC", -"k c #FFF2EA", -"l c #FFFFFF", -"m c #FFFBF8", -"n c #FFD2B4", -"o c #FF6B0A", -"p c #FFC199", -"q c #FFF7F1", -"r c #FF9B5A", -"s c #FF5900", -"t c #FFD7BD", -"u c #FFD3B5", -"v c #FF6806", -"w c #FFA56A", -"x c #FFEDE0", -"y c #FFA367", -"z c #FF5C00", -"A c #FF802C", -"B c #FFE5D3", -"C c #FFFAF6", -"D c #FFDAC2", -"E c #FF7418", -"F c #FF5A00", -"G c #FFFCFA", -"H c #FF8637", -"I c #FF9855", -"J c #FFA266", -"K c #FFF8F4", -"L c #FFD9C1", -"M c #FF7F2B", -"N c #FF7B24", -"O c #FFE0CA", -"P c #FFAB74", -"Q c #FF6804", -"R c #FF6A08", -"S c #FF7E28", -"T c #FF9652", -"U c #FFC6A0", -"V c #FF6D0C", -"W c #FF8D43", -"X c #FFE8D9", -"Y c #FFF9F5", -"Z c #FF761B", -"` c #FF812E", -" . c #FFDDC7", -".. c #FFD5B9", -"+. c #FF6F11", -"@. c #FF7114", -"#. c #FFCAA7", -"$. c #FFB88A", -"%. c #FF6C0B", -"&. c #FFA061", -"*. c #FF8C41", -"=. c #FF6501", -"-. c #FF7E29", -";. c #FFDBC3", -">. c #FFEADB", -",. c #FF771E", -"'. c #FF7D28", -"). c #FF9C5B", -"!. c #FFB584", -"~. c #FFB382", -"{. c #FF914A", -"]. c #FFFBF9", -"^. c #FF7216", -"/. c #FFFAF7", -"(. c #FF883A", -"_. c #FF8332", -":. c #FFB483", -"<. c #FFE1CD", -"[. c #FFD7BE", -"}. c #FFE1CC", -"|. c #FF944C", -"1. c #FF9550", -"2. c #FFF1E8", -"3. c #FFF2E9", -"4. c #FF954F", -"5. c #FFB07C", -"6. c #FFF4EE", -"7. c #FFC49D", -"8. c #FF802D", -"9. c #FFE0CC", -"0. c #FF934B", -"a. c #FFECE0", -"b. c #FFDEC9", -"c. c #FFEFE5", -"d. c #FFA469", -"e. c #FF6E0E", -"f. c #FFA163", -"g. c #FF5F00", -"h. c #FF9149", -"i. c #FFEEE2", -"j. c #FFDDC6", -"k. c #FF8D42", -"l. c #FFEFE4", -"m. c #FFBB8F", -"n. c #FF761D", -"o. c #FFE5D4", -"p. c #FFBA8D", -"q. c #FFDCC5", -"r. c #FFCFAF", -"s. c #FFDEC8", -"t. c #FFEDE1", -"u. c #FFCBA9", -"v. c #FF8E44", -"w. c #FF7419", -"x. c #FFDFC9", -"y. c #FF781F", -"z. c #FFF8F2", -"A. c #FFEADD", -"B. c #FFAF7A", -"C. c #FF7D29", -"D. c #FF761C", -"E. c #FFE2CE", -"F. c #FF7C26", -"G. c #FFC198", -"H. c #FFF0E6", -"I. c #FFAA73", -"J. c #FF7E2A", -"K. c #FF7011", -"L. c #FF8434", -"M. c #FFF4EC", -"N. c #FFCEAE", -"O. c #FFF7F2", -"P. c #FF9B59", -"Q. c #FFC095", -"R. c #FFE3D0", -"S. c #FFD8BE", -"T. c #FFE9DB", -"U. c #FF6A07", -"V. c #FFE4D3", -"W. c #FF9D5B", -"X. c #FF954E", -"Y. c #FFAC76", -". . . . . . . . . . . . . . . . . + @ # . . $ . . . $ % & * $ . ", -". . . . . . . . . . . . . . . . $ = - # $ . . $ ; > , ' ) ! > . ", -". . . . . . . . . . . . . . . . % ~ { ] . $ ^ / ( _ ' : < [ . $ ", -". . . . . . . . . . . . . . . . & } | . ; : 1 2 : | [ < . $ . . ", -". . . . . . . . . . . . . . . . & 3 # ^ 4 5 6 7 < $ . . . . . . ", -". . . . . . . . . . . . $ < [ 8 [ 9 % 0 ! # ] $ . . . . . . . . ", -". . . . . . . . . . . $ [ , a b c d e f g . $ . . . . . . . . . ", -". . . . . . . . . . . < h i j k k l m n o < . . . . . . . . . . ", -". . . . . . . . . . $ 7 p l l l l l l q r | $ . . . . . . . . . ", -". . . . . . . . . $ . s t l l l l l l l u v < . . . . . . . . . ", -". . . . . . . . . . 8 w x l l l l l l l q y z $ . . . . . . . . ", -". . . . . . . . . [ A B l l l C l l l l l D E ] . . . . . . . . ", -". . . . . . . . $ F @ G l l l H I J } K l L M [ . . . . . . . . ", -". . . . . . . . [ N O l l l P % Q > R S } T < . . . . . . . . . ", -". . . . . . . $ z - C l l U V . . . . $ > Q . $ . . . . . . . . ", -". . . . . . $ # W X l l Y Z . . . . $ . . . $ . . . . . . . . . ", -". . . . . . [ ` .l l l ..+.. . . . . . . . . . . . . . . . . . ", -". . . . $ < @.#.l l l l $.%.. . . $ . . . . $ . . . . . . . . . ", -". . . $ . [ &.l l l l l *.$ . . . . < Q %.=.. $ . . . . . . . . ", -". . . . ] -.;.l l l l >.,.< $ $ . % '.).f M < . . . . . . . . . ", -". . $ < R !.l l l l l ~.%.. . [ %.{.].l l L ^.] . . . . . . . . ", -". $ . . )./.l l l l l (.# 8 ; _.:.Y l <.[.}.|.# . . . . . . . . ", -"$ . < 1.2.l l l l l 3.4.A *.5.X l 6.7.8.I 9.0.# . . . . . . . . ", -". ] 4.a.l l l l l l 2. .b.c.l l l d.e.[ b .f.g.. . . . . . . . ", -"< h.i.l l l l l l l l l l l l j.P $ ] % k.l.m.z $ . . . . . . . ", -"n.o.l l l m l l l l l l l l C p.8 . $ < n.q.r.8 . . . . . . . . ", -"s.l l G t.K l l l l l l l u.v.'.. $ . < w.d x.y.] . . . . . . . ", -"l l l z.q.l l l l l l A.B.C.] ] $ . $ < D.t E.F.[ . . . . . . . ", -"l l l q G.l l l H.I.J.v.K.$ $ . . . . < L.M.N.. . . . . . . . . ", -"l l O.P.Z Q.R.S.0.$ < & $ . . $ $ . ] ; ~.<.6 ] . . . . . . . . ", -"l l T.| $ U.%.o & . . . . $ . . . & (.f V.W.# . $ . . . . . . . ", -"l /.X.[ . . . . . $ . . . . . . . . > c Y.# . $ . . . . . . . . "}; diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperatorAttributes.java b/Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperatorAttributes.java deleted file mode 100644 index f83d5985ef1..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/CutterOperatorAttributes.java +++ /dev/null @@ -1,234 +0,0 @@ -// *************************************************************************** -// -// Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -// Produced at the Lawrence Livermore National Laboratory -// LLNL-CODE-442911 -// All rights reserved. -// -// This file is part of VisIt. For details, see https://visit.llnl.gov/. The -// full copyright notice is contained in the file COPYRIGHT located at the root -// of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, -// this list of conditions and the disclaimer below. -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the disclaimer (as noted below) in the -// documentation and/or other materials provided with the distribution. -// - Neither the name of the LLNS/LLNL nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -// LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -// DAMAGE. -// -// *************************************************************************** - -package llnl.visit.operators; - -import llnl.visit.AttributeSubject; -import llnl.visit.CommunicationBuffer; -import llnl.visit.Plugin; - -// **************************************************************************** -// Class: CutterOperatorAttributes -// -// Purpose: -// -// -// Notes: Autogenerated by xml2java. -// -// Programmer: xml2java -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -public class CutterOperatorAttributes extends AttributeSubject implements Plugin -{ - private static int CutterOperatorAttributes_numAdditionalAtts = 6; - - public CutterOperatorAttributes() - { - super(CutterOperatorAttributes_numAdditionalAtts); - - originX = 0; - originY = 0; - originZ = 0; - width = 0; - height = 0; - depth = 0; - } - - public CutterOperatorAttributes(int nMoreFields) - { - super(CutterOperatorAttributes_numAdditionalAtts + nMoreFields); - - originX = 0; - originY = 0; - originZ = 0; - width = 0; - height = 0; - depth = 0; - } - - public CutterOperatorAttributes(CutterOperatorAttributes obj) - { - super(CutterOperatorAttributes_numAdditionalAtts); - - originX = obj.originX; - originY = obj.originY; - originZ = obj.originZ; - width = obj.width; - height = obj.height; - depth = obj.depth; - - SelectAll(); - } - - public int Offset() - { - return super.Offset() + super.GetNumAdditionalAttributes(); - } - - public int GetNumAdditionalAttributes() - { - return CutterOperatorAttributes_numAdditionalAtts; - } - - public boolean equals(CutterOperatorAttributes obj) - { - // Create the return value - return ((originX == obj.originX) && - (originY == obj.originY) && - (originZ == obj.originZ) && - (width == obj.width) && - (height == obj.height) && - (depth == obj.depth)); - } - - public String GetName() { return "CutterOperator"; } - public String GetVersion() { return "1"; } - - // Property setting methods - public void SetOriginX(double originX_) - { - originX = originX_; - Select(0); - } - - public void SetOriginY(double originY_) - { - originY = originY_; - Select(1); - } - - public void SetOriginZ(double originZ_) - { - originZ = originZ_; - Select(2); - } - - public void SetWidth(double width_) - { - width = width_; - Select(3); - } - - public void SetHeight(double height_) - { - height = height_; - Select(4); - } - - public void SetDepth(double depth_) - { - depth = depth_; - Select(5); - } - - // Property getting methods - public double GetOriginX() { return originX; } - public double GetOriginY() { return originY; } - public double GetOriginZ() { return originZ; } - public double GetWidth() { return width; } - public double GetHeight() { return height; } - public double GetDepth() { return depth; } - - // Write and read methods. - public void WriteAtts(CommunicationBuffer buf) - { - if(WriteSelect(0, buf)) - buf.WriteDouble(originX); - if(WriteSelect(1, buf)) - buf.WriteDouble(originY); - if(WriteSelect(2, buf)) - buf.WriteDouble(originZ); - if(WriteSelect(3, buf)) - buf.WriteDouble(width); - if(WriteSelect(4, buf)) - buf.WriteDouble(height); - if(WriteSelect(5, buf)) - buf.WriteDouble(depth); - } - - public void ReadAtts(int index, CommunicationBuffer buf) - { - switch(index) - { - case 0: - SetOriginX(buf.ReadDouble()); - break; - case 1: - SetOriginY(buf.ReadDouble()); - break; - case 2: - SetOriginZ(buf.ReadDouble()); - break; - case 3: - SetWidth(buf.ReadDouble()); - break; - case 4: - SetHeight(buf.ReadDouble()); - break; - case 5: - SetDepth(buf.ReadDouble()); - break; - } - } - - public String toString(String indent) - { - String str = new String(); - str = str + doubleToString("originX", originX, indent) + "\n"; - str = str + doubleToString("originY", originY, indent) + "\n"; - str = str + doubleToString("originZ", originZ, indent) + "\n"; - str = str + doubleToString("width", width, indent) + "\n"; - str = str + doubleToString("height", height, indent) + "\n"; - str = str + doubleToString("depth", depth, indent) + "\n"; - return str; - } - - - // Attributes - private double originX; - private double originY; - private double originZ; - private double width; - private double height; - private double depth; -} - diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/ClipperAdapter.h b/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/ClipperAdapter.h deleted file mode 100644 index c8ba2a4e16d..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/ClipperAdapter.h +++ /dev/null @@ -1,62 +0,0 @@ - -#ifndef CLIPPERADAPTER_H_ -#define CLIPPERADAPTER_H_ - - /** Concrete implementation of abstract clipper. Adapter wraps visit clipper. - * All calls to this type forwarded to adaptee. - - @author Owen Arnold, Tessella plc - @date 08/02/2011 - - Copyright © 2010 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory - - This file is part of Mantid. - - Mantid is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - Mantid is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - - File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid> - Code Documentation is available at: <http://doxygen.mantidproject.org> - */ - - -#include "MantidVatesAPI/Clipper.h" -#include <vtkVisItClipper.h> - -class ClipperAdapter : public Mantid::VATES::Clipper -{ -private: - vtkVisItClipper* m_clipper; -public: - - ClipperAdapter(vtkVisItClipper* pClipper); - - void SetInput(::vtkDataSet* in_ds); - - void SetClipFunction(vtkImplicitFunction* func); - - void SetInsideOut(bool insideout); - - void SetRemoveWholeCells(bool removeWholeCells); - - void SetOutput(vtkUnstructuredGrid* out_ds); - - void Update(); - - void Delete(); - - ~ClipperAdapter(); - -}; - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/CutterOperatorAttributes.h b/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/CutterOperatorAttributes.h deleted file mode 100644 index 93233d896fe..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/CutterOperatorAttributes.h +++ /dev/null @@ -1,141 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#ifndef CUTTEROPERATORATTRIBUTES_H -#define CUTTEROPERATORATTRIBUTES_H -#include <AttributeSubject.h> - - -// **************************************************************************** -// Class: CutterOperatorAttributes -// -// Purpose: -// -// -// Notes: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -class CutterOperatorAttributes : public AttributeSubject -{ -public: - // These constructors are for objects of this class - CutterOperatorAttributes(); - CutterOperatorAttributes(const CutterOperatorAttributes &obj); -protected: - // These constructors are for objects derived from this class - CutterOperatorAttributes(private_tmfs_t tmfs); - CutterOperatorAttributes(const CutterOperatorAttributes &obj, private_tmfs_t tmfs); -public: - virtual ~CutterOperatorAttributes(); - - virtual CutterOperatorAttributes& operator = (const CutterOperatorAttributes &obj); - virtual bool operator == (const CutterOperatorAttributes &obj) const; - virtual bool operator != (const CutterOperatorAttributes &obj) const; -private: - void Init(); - void Copy(const CutterOperatorAttributes &obj); -public: - - virtual const std::string TypeName() const; - virtual bool CopyAttributes(const AttributeGroup *); - virtual AttributeSubject *CreateCompatible(const std::string &) const; - virtual AttributeSubject *NewInstance(bool) const; - - // Property selection methods - virtual void SelectAll(); - - // Property setting methods - void SetOriginX(double originX_); - void SetOriginY(double originY_); - void SetOriginZ(double originZ_); - void SetWidth(double width_); - void SetHeight(double height_); - void SetDepth(double depth_); - - // Property getting methods - double GetOriginX() const; - double GetOriginY() const; - double GetOriginZ() const; - double GetWidth() const; - double GetHeight() const; - double GetDepth() const; - - // Persistence methods - virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd); - virtual void SetFromNode(DataNode *node); - - - // Keyframing methods - virtual std::string GetFieldName(int index) const; - virtual AttributeGroup::FieldType GetFieldType(int index) const; - virtual std::string GetFieldTypeName(int index) const; - virtual bool FieldsEqual(int index, const AttributeGroup *rhs) const; - - - // IDs that can be used to identify fields in case statements - enum { - ID_originX = 0, - ID_originY, - ID_originZ, - ID_width, - ID_height, - ID_depth, - ID__LAST - }; - -private: - double originX; - double originY; - double originZ; - double width; - double height; - double depth; - - // Static class format string for type map. - static const char *TypeMapFormatString; - static const private_tmfs_t TmfsStruct; -}; -#define CUTTEROPERATORATTRIBUTES_TMFS "dddddd" - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/CutterOperatorPluginInfo.h b/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/CutterOperatorPluginInfo.h deleted file mode 100644 index d0998f71350..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/CutterOperatorPluginInfo.h +++ /dev/null @@ -1,125 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: CutterOperatorPluginInfo.h -// ************************************************************************* // - -#ifndef CUTTEROPERATOR_PLUGIN_INFO_H -#define CUTTEROPERATOR_PLUGIN_INFO_H -#include <OperatorPluginInfo.h> -#include <operator_plugin_exports.h> - -class CutterOperatorAttributes; - -// **************************************************************************** -// Class: CutterOperatorPluginInfo -// -// Purpose: -// Five classes that provide all the information about an CutterOperator operator -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -class CutterOperatorGeneralPluginInfo : public virtual GeneralOperatorPluginInfo -{ - public: - virtual const char *GetName() const; - virtual const char *GetVersion() const; - virtual const char *GetID() const; - virtual bool EnabledByDefault() const; -}; - -class CutterOperatorCommonPluginInfo : public virtual CommonOperatorPluginInfo, public virtual CutterOperatorGeneralPluginInfo -{ - public: - virtual AttributeSubject *AllocAttributes(); - virtual void CopyAttributes(AttributeSubject *to, AttributeSubject *from); -}; - -class CutterOperatorGUIPluginInfo : public virtual GUIOperatorPluginInfo, public virtual CutterOperatorCommonPluginInfo -{ - public: - virtual QString *GetMenuName() const; - virtual QvisPostableWindowObserver *CreatePluginWindow(int type, - AttributeSubject *attr, const QString &caption, const QString &shortName, - QvisNotepadArea *notepad); - virtual const char **XPMIconData() const; -}; - -class CutterOperatorViewerPluginInfo : public virtual ViewerOperatorPluginInfo, public virtual CutterOperatorCommonPluginInfo -{ - public: - virtual AttributeSubject *GetClientAtts(); - virtual AttributeSubject *GetDefaultAtts(); - virtual void SetClientAtts(AttributeSubject *atts); - virtual void GetClientAtts(AttributeSubject *atts); - - virtual void InitializeOperatorAtts(AttributeSubject *atts, - const ViewerPlot *plot, - const bool fromDefault); - virtual QString *GetMenuName() const; - virtual const char **XPMIconData() const; - - static void InitializeGlobalObjects(); - private: - static CutterOperatorAttributes *defaultAtts; - static CutterOperatorAttributes *clientAtts; -}; - -class CutterOperatorEnginePluginInfo : public virtual EngineOperatorPluginInfo, public virtual CutterOperatorCommonPluginInfo -{ - public: - virtual avtPluginFilter *AllocAvtPluginFilter(); -}; - -class CutterOperatorScriptingPluginInfo : public virtual ScriptingOperatorPluginInfo, public virtual CutterOperatorCommonPluginInfo -{ - public: - virtual void InitializePlugin(AttributeSubject *subj, void *data); - virtual void *GetMethodTable(int *nMethods); - virtual bool TypesMatch(void *pyobject); - virtual char *GetLogString(); - virtual void SetDefaults(const AttributeSubject *atts); -}; - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/PyCutterOperatorAttributes.h b/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/PyCutterOperatorAttributes.h deleted file mode 100644 index e1f490c28dc..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/PyCutterOperatorAttributes.h +++ /dev/null @@ -1,64 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#ifndef PY_CUTTEROPERATORATTRIBUTES_H -#define PY_CUTTEROPERATORATTRIBUTES_H -#include <Python.h> -#include <CutterOperatorAttributes.h> - -// -// Functions exposed to the VisIt module. -// -#define CUTTEROPERATORATTRIBUTES_NMETH 14 -void PyCutterOperatorAttributes_StartUp(CutterOperatorAttributes *subj, void *data); -void PyCutterOperatorAttributes_CloseDown(); -PyMethodDef * PyCutterOperatorAttributes_GetMethodTable(int *nMethods); -bool PyCutterOperatorAttributes_Check(PyObject *obj); -CutterOperatorAttributes * PyCutterOperatorAttributes_FromPyObject(PyObject *obj); -PyObject * PyCutterOperatorAttributes_New(); -PyObject * PyCutterOperatorAttributes_Wrap(const CutterOperatorAttributes *attr); -void PyCutterOperatorAttributes_SetParent(PyObject *obj, PyObject *parent); -void PyCutterOperatorAttributes_SetDefaults(const CutterOperatorAttributes *atts); -std::string PyCutterOperatorAttributes_GetLogString(); -std::string PyCutterOperatorAttributes_ToString(const CutterOperatorAttributes *, const char *); -PyObject * PyCutterOperatorAttributes_getattr(PyObject *self, char *name); -int PyCutterOperatorAttributes_setattr(PyObject *self, char *name, PyObject *args); -extern PyMethodDef PyCutterOperatorAttributes_methods[CUTTEROPERATORATTRIBUTES_NMETH]; - -#endif - diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/QvisCutterOperatorWindow.h b/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/QvisCutterOperatorWindow.h deleted file mode 100644 index 30994dacdb2..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/QvisCutterOperatorWindow.h +++ /dev/null @@ -1,114 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#ifndef QVISCUTTEROPERATORWINDOW_H -#define QVISCUTTEROPERATORWINDOW_H - -#include <QvisOperatorWindow.h> -#include <AttributeSubject.h> - -class CutterOperatorAttributes; -class QLabel; -class QCheckBox; -class QLineEdit; -class QSpinBox; -class QVBox; -class QButtonGroup; -class QvisColorTableButton; -class QvisOpacitySlider; -class QvisColorButton; -class QvisLineStyleWidget; -class QvisLineWidthWidget; -class QvisVariableButton; - -// **************************************************************************** -// Class: QvisCutterOperatorWindow -// -// Purpose: -// Defines QvisCutterOperatorWindow class. -// -// Notes: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -class QvisCutterOperatorWindow : public QvisOperatorWindow -{ - Q_OBJECT - public: - QvisCutterOperatorWindow(const int type, - CutterOperatorAttributes *subj, - const QString &caption = QString::null, - const QString &shortName = QString::null, - QvisNotepadArea *notepad = 0); - virtual ~QvisCutterOperatorWindow(); - virtual void CreateWindowContents(); - protected: - void UpdateWindow(bool doAll); - virtual void GetCurrentValues(int which_widget); - private slots: - void originXProcessText(); - void originYProcessText(); - void originZProcessText(); - void widthProcessText(); - void heightProcessText(); - void depthProcessText(); - private: - QLineEdit *originX; - QLineEdit *originY; - QLineEdit *originZ; - QLineEdit *width; - QLineEdit *height; - QLineEdit *depth; - QLabel *originXLabel; - QLabel *originYLabel; - QLabel *originZLabel; - QLabel *widthLabel; - QLabel *heightLabel; - QLabel *depthLabel; - - CutterOperatorAttributes *atts; -}; - - - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/avtCutterOperatorFilter.h b/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/avtCutterOperatorFilter.h deleted file mode 100644 index 7d2b3b86c6e..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/inc/CutterOperator/avtCutterOperatorFilter.h +++ /dev/null @@ -1,97 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: avtCutterOperatorFilter.h -// ************************************************************************* // - -#ifndef AVT_CutterOperator_FILTER_H -#define AVT_CutterOperator_FILTER_H - - -#include <avtPluginDataTreeIterator.h> -#include <CutterOperatorAttributes.h> -#include <MantidVatesAPI/RebinningCutterPresenter.h> - -class vtkDataSet; - - -// **************************************************************************** -// Class: avtCutterOperatorFilter -// -// Purpose: -// A plugin operator for CutterOperator. -// -// Programmer: owen -- generated by xml2avt -// Creation: Tue Feb 8 13:11:52 PST 2011 -// -// **************************************************************************** - -class avtCutterOperatorFilter : public avtPluginDataTreeIterator -{ - public: - avtCutterOperatorFilter(); - virtual ~avtCutterOperatorFilter(); - - static avtFilter *Create(); - - virtual const char *GetType(void) { return "avtCutterOperatorFilter"; }; - virtual const char *GetDescription(void) - { return "Pre-binning Cutter"; }; - - virtual void SetAtts(const AttributeGroup*); - virtual bool Equivalent(const AttributeGroup*); - - protected: - CutterOperatorAttributes atts; - - virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string); - - private: - - boost::shared_ptr<Mantid::API::ImplicitFunction> constructBox( - Mantid::VATES::Dimension_sptr spDimX, - Mantid::VATES::Dimension_sptr spDimY, - Mantid::VATES::Dimension_sptr spDimZ) const; - - Mantid::VATES::RebinningCutterPresenter m_presenter; - -}; - - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/ClipperAdapter.C b/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/ClipperAdapter.C deleted file mode 100644 index 2e95399971e..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/ClipperAdapter.C +++ /dev/null @@ -1,48 +0,0 @@ -#include "ClipperAdapter.h" -#include "vtkVisItClipper.h" -#include "vtkUnstructuredGrid.h" - -ClipperAdapter::ClipperAdapter(vtkVisItClipper* pClipper) : - m_clipper(pClipper) //Initialised with adaptee. -{ -} - -void ClipperAdapter::SetInput(::vtkDataSet* in_ds) -{ - m_clipper->SetInput(in_ds); -} - -void ClipperAdapter::SetClipFunction(vtkImplicitFunction* func) -{ - m_clipper->SetClipFunction(func); -} - -void ClipperAdapter::SetInsideOut(bool insideout) -{ - m_clipper->SetInsideOut(insideout); -} - -void ClipperAdapter::SetRemoveWholeCells(bool removeWholeCells) -{ - m_clipper->SetRemoveWholeCells(removeWholeCells); -} - -void ClipperAdapter::SetOutput(vtkUnstructuredGrid* out_ds) -{ - m_clipper->SetOutput(out_ds); -} - -void ClipperAdapter::Update() -{ - m_clipper->Update(); -} - -void ClipperAdapter::Delete() -{ - delete this; -} - -ClipperAdapter::~ClipperAdapter() -{ - m_clipper->Delete(); -} diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorAttributes.C b/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorAttributes.C deleted file mode 100644 index 8cbb1545648..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorAttributes.C +++ /dev/null @@ -1,757 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#include <CutterOperatorAttributes.h> -#include <DataNode.h> - -// **************************************************************************** -// Method: CutterOperatorAttributes::CutterOperatorAttributes -// -// Purpose: -// Init utility for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void CutterOperatorAttributes::Init() -{ - - CutterOperatorAttributes::SelectAll(); -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::CutterOperatorAttributes -// -// Purpose: -// Copy utility for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void CutterOperatorAttributes::Copy(const CutterOperatorAttributes &obj) -{ - originX = obj.originX; - originY = obj.originY; - originZ = obj.originZ; - width = obj.width; - height = obj.height; - depth = obj.depth; - - CutterOperatorAttributes::SelectAll(); -} - -// Type map format string -const char *CutterOperatorAttributes::TypeMapFormatString = CUTTEROPERATORATTRIBUTES_TMFS; -const AttributeGroup::private_tmfs_t CutterOperatorAttributes::TmfsStruct = {CUTTEROPERATORATTRIBUTES_TMFS}; - - -// **************************************************************************** -// Method: CutterOperatorAttributes::CutterOperatorAttributes -// -// Purpose: -// Default constructor for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -CutterOperatorAttributes::CutterOperatorAttributes() : - AttributeSubject(CutterOperatorAttributes::TypeMapFormatString) -{ - CutterOperatorAttributes::Init(); -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::CutterOperatorAttributes -// -// Purpose: -// Constructor for the derived classes of CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -CutterOperatorAttributes::CutterOperatorAttributes(private_tmfs_t tmfs) : - AttributeSubject(tmfs.tmfs) -{ - CutterOperatorAttributes::Init(); -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::CutterOperatorAttributes -// -// Purpose: -// Copy constructor for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -CutterOperatorAttributes::CutterOperatorAttributes(const CutterOperatorAttributes &obj) : - AttributeSubject(CutterOperatorAttributes::TypeMapFormatString) -{ - CutterOperatorAttributes::Copy(obj); -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::CutterOperatorAttributes -// -// Purpose: -// Copy constructor for derived classes of the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -CutterOperatorAttributes::CutterOperatorAttributes(const CutterOperatorAttributes &obj, private_tmfs_t tmfs) : - AttributeSubject(tmfs.tmfs) -{ - CutterOperatorAttributes::Copy(obj); -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::~CutterOperatorAttributes -// -// Purpose: -// Destructor for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -CutterOperatorAttributes::~CutterOperatorAttributes() -{ - // nothing here -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::operator = -// -// Purpose: -// Assignment operator for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -CutterOperatorAttributes& -CutterOperatorAttributes::operator = (const CutterOperatorAttributes &obj) -{ - if (this == &obj) return *this; - - CutterOperatorAttributes::Copy(obj); - - return *this; -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::operator == -// -// Purpose: -// Comparison operator == for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -CutterOperatorAttributes::operator == (const CutterOperatorAttributes &obj) const -{ - // Create the return value - return ((originX == obj.originX) && - (originY == obj.originY) && - (originZ == obj.originZ) && - (width == obj.width) && - (height == obj.height) && - (depth == obj.depth)); -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::operator != -// -// Purpose: -// Comparison operator != for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -CutterOperatorAttributes::operator != (const CutterOperatorAttributes &obj) const -{ - return !(this->operator == (obj)); -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::TypeName -// -// Purpose: -// Type name method for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -const std::string -CutterOperatorAttributes::TypeName() const -{ - return "CutterOperatorAttributes"; -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::CopyAttributes -// -// Purpose: -// CopyAttributes method for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -CutterOperatorAttributes::CopyAttributes(const AttributeGroup *atts) -{ - if(TypeName() != atts->TypeName()) - return false; - - // Call assignment operator. - const CutterOperatorAttributes *tmp = (const CutterOperatorAttributes *)atts; - *this = *tmp; - - return true; -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::CreateCompatible -// -// Purpose: -// CreateCompatible method for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -AttributeSubject * -CutterOperatorAttributes::CreateCompatible(const std::string &tname) const -{ - AttributeSubject *retval = 0; - if(TypeName() == tname) - retval = new CutterOperatorAttributes(*this); - // Other cases could go here too. - - return retval; -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::NewInstance -// -// Purpose: -// NewInstance method for the CutterOperatorAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -AttributeSubject * -CutterOperatorAttributes::NewInstance(bool copy) const -{ - AttributeSubject *retval = 0; - if(copy) - retval = new CutterOperatorAttributes(*this); - else - retval = new CutterOperatorAttributes; - - return retval; -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::SelectAll -// -// Purpose: -// Selects all attributes. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -CutterOperatorAttributes::SelectAll() -{ - Select(ID_originX, (void *)&originX); - Select(ID_originY, (void *)&originY); - Select(ID_originZ, (void *)&originZ); - Select(ID_width, (void *)&width); - Select(ID_height, (void *)&height); - Select(ID_depth, (void *)&depth); -} - -/////////////////////////////////////////////////////////////////////////////// -// Persistence methods -/////////////////////////////////////////////////////////////////////////////// - -// **************************************************************************** -// Method: CutterOperatorAttributes::CreateNode -// -// Purpose: -// This method creates a DataNode representation of the object so it can be saved to a config file. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -CutterOperatorAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd) -{ - if(parentNode == 0) - return false; - - CutterOperatorAttributes defaultObject; - bool addToParent = false; - // Create a node for CutterOperatorAttributes. - DataNode *node = new DataNode("CutterOperatorAttributes"); - - if(completeSave || !FieldsEqual(ID_originX, &defaultObject)) - { - addToParent = true; - node->AddNode(new DataNode("originX", originX)); - } - - if(completeSave || !FieldsEqual(ID_originY, &defaultObject)) - { - addToParent = true; - node->AddNode(new DataNode("originY", originY)); - } - - if(completeSave || !FieldsEqual(ID_originZ, &defaultObject)) - { - addToParent = true; - node->AddNode(new DataNode("originZ", originZ)); - } - - if(completeSave || !FieldsEqual(ID_width, &defaultObject)) - { - addToParent = true; - node->AddNode(new DataNode("width", width)); - } - - if(completeSave || !FieldsEqual(ID_height, &defaultObject)) - { - addToParent = true; - node->AddNode(new DataNode("height", height)); - } - - if(completeSave || !FieldsEqual(ID_depth, &defaultObject)) - { - addToParent = true; - node->AddNode(new DataNode("depth", depth)); - } - - - // Add the node to the parent node. - if(addToParent || forceAdd) - parentNode->AddNode(node); - else - delete node; - - return (addToParent || forceAdd); -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::SetFromNode -// -// Purpose: -// This method sets attributes in this object from values in a DataNode representation of the object. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -CutterOperatorAttributes::SetFromNode(DataNode *parentNode) -{ - if(parentNode == 0) - return; - - DataNode *searchNode = parentNode->GetNode("CutterOperatorAttributes"); - if(searchNode == 0) - return; - - DataNode *node; - if((node = searchNode->GetNode("originX")) != 0) - SetOriginX(node->AsDouble()); - if((node = searchNode->GetNode("originY")) != 0) - SetOriginY(node->AsDouble()); - if((node = searchNode->GetNode("originZ")) != 0) - SetOriginZ(node->AsDouble()); - if((node = searchNode->GetNode("width")) != 0) - SetWidth(node->AsDouble()); - if((node = searchNode->GetNode("height")) != 0) - SetHeight(node->AsDouble()); - if((node = searchNode->GetNode("depth")) != 0) - SetDepth(node->AsDouble()); -} - -/////////////////////////////////////////////////////////////////////////////// -// Set property methods -/////////////////////////////////////////////////////////////////////////////// - -void -CutterOperatorAttributes::SetOriginX(double originX_) -{ - originX = originX_; - Select(ID_originX, (void *)&originX); -} - -void -CutterOperatorAttributes::SetOriginY(double originY_) -{ - originY = originY_; - Select(ID_originY, (void *)&originY); -} - -void -CutterOperatorAttributes::SetOriginZ(double originZ_) -{ - originZ = originZ_; - Select(ID_originZ, (void *)&originZ); -} - -void -CutterOperatorAttributes::SetWidth(double width_) -{ - width = width_; - Select(ID_width, (void *)&width); -} - -void -CutterOperatorAttributes::SetHeight(double height_) -{ - height = height_; - Select(ID_height, (void *)&height); -} - -void -CutterOperatorAttributes::SetDepth(double depth_) -{ - depth = depth_; - Select(ID_depth, (void *)&depth); -} - -/////////////////////////////////////////////////////////////////////////////// -// Get property methods -/////////////////////////////////////////////////////////////////////////////// - -double -CutterOperatorAttributes::GetOriginX() const -{ - return originX; -} - -double -CutterOperatorAttributes::GetOriginY() const -{ - return originY; -} - -double -CutterOperatorAttributes::GetOriginZ() const -{ - return originZ; -} - -double -CutterOperatorAttributes::GetWidth() const -{ - return width; -} - -double -CutterOperatorAttributes::GetHeight() const -{ - return height; -} - -double -CutterOperatorAttributes::GetDepth() const -{ - return depth; -} - -/////////////////////////////////////////////////////////////////////////////// -// Keyframing methods -/////////////////////////////////////////////////////////////////////////////// - -// **************************************************************************** -// Method: CutterOperatorAttributes::GetFieldName -// -// Purpose: -// This method returns the name of a field given its index. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -std::string -CutterOperatorAttributes::GetFieldName(int index) const -{ - switch (index) - { - case ID_originX: return "originX"; - case ID_originY: return "originY"; - case ID_originZ: return "originZ"; - case ID_width: return "width"; - case ID_height: return "height"; - case ID_depth: return "depth"; - default: return "invalid index"; - } -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::GetFieldType -// -// Purpose: -// This method returns the type of a field given its index. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -AttributeGroup::FieldType -CutterOperatorAttributes::GetFieldType(int index) const -{ - switch (index) - { - case ID_originX: return FieldType_double; - case ID_originY: return FieldType_double; - case ID_originZ: return FieldType_double; - case ID_width: return FieldType_double; - case ID_height: return FieldType_double; - case ID_depth: return FieldType_double; - default: return FieldType_unknown; - } -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::GetFieldTypeName -// -// Purpose: -// This method returns the name of a field type given its index. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -std::string -CutterOperatorAttributes::GetFieldTypeName(int index) const -{ - switch (index) - { - case ID_originX: return "double"; - case ID_originY: return "double"; - case ID_originZ: return "double"; - case ID_width: return "double"; - case ID_height: return "double"; - case ID_depth: return "double"; - default: return "invalid index"; - } -} - -// **************************************************************************** -// Method: CutterOperatorAttributes::FieldsEqual -// -// Purpose: -// This method compares two fields and return true if they are equal. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -CutterOperatorAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const -{ - const CutterOperatorAttributes &obj = *((const CutterOperatorAttributes*)rhs); - bool retval = false; - switch (index_) - { - case ID_originX: - { // new scope - retval = (originX == obj.originX); - } - break; - case ID_originY: - { // new scope - retval = (originY == obj.originY); - } - break; - case ID_originZ: - { // new scope - retval = (originZ == obj.originZ); - } - break; - case ID_width: - { // new scope - retval = (width == obj.width); - } - break; - case ID_height: - { // new scope - retval = (height == obj.height); - } - break; - case ID_depth: - { // new scope - retval = (depth == obj.depth); - } - break; - default: retval = false; - } - - return retval; -} - -/////////////////////////////////////////////////////////////////////////////// -// User-defined methods. -/////////////////////////////////////////////////////////////////////////////// - diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorCommonPluginInfo.C b/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorCommonPluginInfo.C deleted file mode 100644 index 6d91d373335..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorCommonPluginInfo.C +++ /dev/null @@ -1,85 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: CutterOperatorCommonPluginInfo.C -// ************************************************************************* // - -#include <CutterOperatorPluginInfo.h> -#include <CutterOperatorAttributes.h> - -// **************************************************************************** -// Method: CutterOperatorCommonPluginInfo::AllocAttributes -// -// Purpose: -// Return a pointer to a newly allocated attribute subject. -// -// Returns: A pointer to the newly allocated attribute subject. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -AttributeSubject * -CutterOperatorCommonPluginInfo::AllocAttributes() -{ - return new CutterOperatorAttributes; -} - -// **************************************************************************** -// Method: CutterOperatorCommonPluginInfo::CopyAttributes -// -// Purpose: -// Copy a CutterOperator attribute subject. -// -// Arguments: -// to The destination attribute subject. -// from The source attribute subject. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -void -CutterOperatorCommonPluginInfo::CopyAttributes(AttributeSubject *to, - AttributeSubject *from) -{ - *((CutterOperatorAttributes *) to) = *((CutterOperatorAttributes *) from); -} diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorEnginePluginInfo.C b/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorEnginePluginInfo.C deleted file mode 100644 index 7c0ab46b5e5..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorEnginePluginInfo.C +++ /dev/null @@ -1,78 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: CutterOperatorEnginePluginInfo.C -// ************************************************************************* // - -#include <CutterOperatorPluginInfo.h> -#include <avtCutterOperatorFilter.h> - -// **************************************************************************** -// Function: GetEngineInfo -// -// Purpose: -// Return a new EnginePluginInfo for the CutterOperator operator. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" OP_EXPORT EngineOperatorPluginInfo* CutterOperator_GetEngineInfo() -{ - return new CutterOperatorEnginePluginInfo; -} - -// **************************************************************************** -// Method: CutterOperatorEnginePluginInfo::AllocAvtPluginFilter -// -// Purpose: -// Return a pointer to a newly allocated avtPluginFilter. -// -// Returns: A pointer to the newly allocated avtPluginFilter. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -avtPluginFilter * -CutterOperatorEnginePluginInfo::AllocAvtPluginFilter() -{ - return new avtCutterOperatorFilter; -} diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorGUIPluginInfo.C b/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorGUIPluginInfo.C deleted file mode 100644 index d43df6c0f9f..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorGUIPluginInfo.C +++ /dev/null @@ -1,128 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: CutterOperatorGUIPluginInfo.C -// ************************************************************************* // - -#include <CutterOperatorPluginInfo.h> -#include <CutterOperatorAttributes.h> -#include <QApplication> -#include <QvisCutterOperatorWindow.h> - -// **************************************************************************** -// Function: GetGUIInfo -// -// Purpose: -// Return a new GUIPluginInfo for the CutterOperator operator. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" OP_EXPORT GUIOperatorPluginInfo* CutterOperator_GetGUIInfo() -{ - return new CutterOperatorGUIPluginInfo; -} - -// **************************************************************************** -// Method: CutterOperatorGUIPluginInfo::GetMenuName -// -// Purpose: -// Return a pointer to the name to use in the GUI menu. -// -// Returns: A pointer to the name to use in the GUI menu. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -QString * -CutterOperatorGUIPluginInfo::GetMenuName() const -{ - return new QString(qApp->translate("OperatorNames", "CutterOperator")); -} - - -// **************************************************************************** -// Method: CutterOperatorGUIPluginInfo::CreatePluginWindow -// -// Purpose: -// Return a pointer to an operator's attribute window. -// -// Arguments: -// type The type of the operator. -// attr The attribute subject for the operator. -// notepad The notepad to use for posting the window. -// -// Returns: A pointer to the operator's attribute window. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -QvisPostableWindowObserver * -CutterOperatorGUIPluginInfo::CreatePluginWindow(int type, AttributeSubject *attr, - const QString &caption, const QString &shortName, QvisNotepadArea *notepad) -{ - return new QvisCutterOperatorWindow(type, (CutterOperatorAttributes *)attr, - caption, shortName, notepad); -} - -// **************************************************************************** -// Method: CutterOperatorGUIPluginInfo::XPMIconData -// -// Purpose: -// Return a pointer to the icon data. -// -// Returns: A pointer to the icon data. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -#include <CutterOperator.xpm> -const char ** -CutterOperatorGUIPluginInfo::XPMIconData() const -{ - return CutterOperator_xpm; -} - diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorPluginInfo.C b/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorPluginInfo.C deleted file mode 100644 index 078d0154159..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorPluginInfo.C +++ /dev/null @@ -1,137 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: CutterOperatorPluginInfo.C -// ************************************************************************* // - -#include <CutterOperatorPluginInfo.h> -#include <CutterOperatorAttributes.h> - -#include <visit-config.h> -extern "C" OP_EXPORT const char *CutterOperatorVisItPluginVersion = VISIT_VERSION; - -// **************************************************************************** -// Function: GetGeneralInfo -// -// Purpose: -// Return a new GeneralPluginInfo for the CutterOperator operator. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" OP_EXPORT GeneralOperatorPluginInfo* CutterOperator_GetGeneralInfo() -{ - return new CutterOperatorGeneralPluginInfo; -} - -// **************************************************************************** -// Method: CutterOperatorGeneralPluginInfo::GetName -// -// Purpose: -// Return the name of the operator plugin. -// -// Returns: A pointer to the name of the operator plugin. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -const char * -CutterOperatorGeneralPluginInfo::GetName() const -{ - return "CutterOperator"; -} - -// **************************************************************************** -// Method: CutterOperatorGeneralPluginInfo::GetVersion -// -// Purpose: -// Return the version of the operator plugin. -// -// Returns: A pointer to the version of the operator plugin. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -const char * -CutterOperatorGeneralPluginInfo::GetVersion() const -{ - return "1"; -} - -// **************************************************************************** -// Method: CutterOperatorGeneralPluginInfo::GetID -// -// Purpose: -// Return the id of the operator plugin. -// -// Returns: A pointer to the id of the operator plugin. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -const char * -CutterOperatorGeneralPluginInfo::GetID() const -{ - return "CutterOperator_1"; -} -// **************************************************************************** -// Method: CutterOperatorGeneralPluginInfo::EnabledByDefault -// -// Purpose: -// Return true if this plugin should be enabled by default; false otherwise. -// -// Returns: true/false -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -bool -CutterOperatorGeneralPluginInfo::EnabledByDefault() const -{ - return true; -} diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorScriptingPluginInfo.C b/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorScriptingPluginInfo.C deleted file mode 100644 index 70cd146b1bf..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorScriptingPluginInfo.C +++ /dev/null @@ -1,176 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// CutterOperatorScriptingPluginInfo.C -// ************************************************************************* // -#include <PyCutterOperatorAttributes.h> -#include <CutterOperatorPluginInfo.h> - -// **************************************************************************** -// Function: GetScriptingInfo -// -// Purpose: -// Return a new ScriptingPluginInfo for the CutterOperator plot. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" OP_EXPORT ScriptingOperatorPluginInfo* CutterOperator_GetScriptingInfo() -{ - return new CutterOperatorScriptingPluginInfo; -} - -// **************************************************************************** -// Method: CutterOperatorScriptingPluginInfo::InitializePlugin -// -// Purpose: -// Calls the initialization function for the plugin. -// -// Arguments: -// subj : A pointer to the plugin's state object. -// data : A pointer to data to be used by the observer function. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -CutterOperatorScriptingPluginInfo::InitializePlugin(AttributeSubject *subj, - void *data) -{ - PyCutterOperatorAttributes_StartUp((CutterOperatorAttributes *)subj, data); -} - -// **************************************************************************** -// Method: CutterOperatorScriptingPluginInfo::GetMethodTable -// -// Purpose: -// Returns a pointer to the plugin's Python method table. These methods are -// added to the top-level visit module's methods. -// -// Arguments: -// nMethods : Returns the number of methods in the method table. -// -// Returns: A pointer to the method table. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void * -CutterOperatorScriptingPluginInfo::GetMethodTable(int *nMethods) -{ - return PyCutterOperatorAttributes_GetMethodTable(nMethods); -} - -// **************************************************************************** -// Method: CutterOperatorScriptingPluginInfo::TypesMatch -// -// Purpose: -// Returns whether or not the input PyObject is CutterOperator plot attributes. -// -// Arguments: -// pyobject : A PyObject cast to void*. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -CutterOperatorScriptingPluginInfo::TypesMatch(void *pyobject) -{ - return PyCutterOperatorAttributes_Check((PyObject *)pyobject); -} - -// **************************************************************************** -// Method: CutterOperatorScriptingPluginInfo::GetLogString -// -// Purpose: -// Gets a string representation of the current attributes. -// -// Arguments: -// val : Whether or not to log state information. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -char * -CutterOperatorScriptingPluginInfo::GetLogString() -{ - std::string s(PyCutterOperatorAttributes_GetLogString()); - char *v = new char[s.size() + 1]; - strcpy(v, s.c_str()); - return v; -} - -// **************************************************************************** -// Method: CutterOperatorScriptingPluginInfo::SetDefaults -// -// Purpose: -// Used to set the default values for a plugin's state object. -// -// Arguments: -// atts : The new state. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -CutterOperatorScriptingPluginInfo::SetDefaults(const AttributeSubject *atts) -{ - PyCutterOperatorAttributes_SetDefaults((const CutterOperatorAttributes *)atts); -} diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorViewerPluginInfo.C b/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorViewerPluginInfo.C deleted file mode 100644 index 97f66762904..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/CutterOperatorViewerPluginInfo.C +++ /dev/null @@ -1,230 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: CutterOperatorViewerPluginInfo.C -// ************************************************************************* // - -#include <CutterOperatorPluginInfo.h> -#include <QApplication> -#include <CutterOperatorAttributes.h> - -// **************************************************************************** -// Function: GetViewerInfo -// -// Purpose: -// Return a new ViewerPluginInfo for the CutterOperator operator. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" OP_EXPORT ViewerOperatorPluginInfo* CutterOperator_GetViewerInfo() -{ - CutterOperatorViewerPluginInfo::InitializeGlobalObjects(); - return new CutterOperatorViewerPluginInfo; -} - -// -// Storage for static data elements. -// -CutterOperatorAttributes *CutterOperatorViewerPluginInfo::clientAtts = NULL; -CutterOperatorAttributes *CutterOperatorViewerPluginInfo::defaultAtts = NULL; - -// **************************************************************************** -// Method: CutterOperatorViewerPluginInfo::InitializeGlobalObjects -// -// Purpose: -// Initialize the operator atts. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -void -CutterOperatorViewerPluginInfo::InitializeGlobalObjects() -{ - CutterOperatorViewerPluginInfo::clientAtts = new CutterOperatorAttributes; - CutterOperatorViewerPluginInfo::defaultAtts = new CutterOperatorAttributes; -} - -// **************************************************************************** -// Method: CutterOperatorViewerPluginInfo::GetClientAtts -// -// Purpose: -// Return a pointer to the viewer client attributes. -// -// Returns: A pointer to the viewer client attributes. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -AttributeSubject * -CutterOperatorViewerPluginInfo::GetClientAtts() -{ - return clientAtts; -} - -// **************************************************************************** -// Method: CutterOperatorViewerPluginInfo::GetDefaultAtts -// -// Purpose: -// Return a pointer to the viewer default attributes. -// -// Returns: A pointer to the viewer default attributes. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -AttributeSubject * -CutterOperatorViewerPluginInfo::GetDefaultAtts() -{ - return defaultAtts; -} - -// **************************************************************************** -// Method: CutterOperatorViewerPluginInfo::SetClientAtts -// -// Purpose: -// Set the viewer client attributes. -// -// Arguments: -// atts A pointer to the new client attributes. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -void -CutterOperatorViewerPluginInfo::SetClientAtts(AttributeSubject *atts) -{ - *clientAtts = *(CutterOperatorAttributes *)atts; - clientAtts->Notify(); -} - -// **************************************************************************** -// Method: CutterOperatorViewerPluginInfo::GetClientAtts -// -// Purpose: -// Get the viewer client attributes. -// -// Arguments: -// atts A pointer to return the client default attributes in. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -void -CutterOperatorViewerPluginInfo::GetClientAtts(AttributeSubject *atts) -{ - *(CutterOperatorAttributes *)atts = *clientAtts; -} - -// **************************************************************************** -// Method: CutterOperatorViewerPluginInfo::InitializeOperatorAtts -// -// Purpose: -// Initialize the operator attributes to the default attributes. -// -// Arguments: -// atts The attribute subject to initialize. -// plot The viewer plot that owns the operator. -// fromDefault True to initialize the attributes from the defaults. False -// to initialize from the current attributes. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -void -CutterOperatorViewerPluginInfo::InitializeOperatorAtts(AttributeSubject *atts, - const ViewerPlot *plot, - const bool fromDefault) -{ - if (fromDefault) - *(CutterOperatorAttributes*)atts = *defaultAtts; - else - *(CutterOperatorAttributes*)atts = *clientAtts; -} -// **************************************************************************** -// Method: CutterOperatorViewerPluginInfo::GetMenuName -// -// Purpose: -// Return a pointer to the name to use in the viewer menus. -// -// Returns: A pointer to the name to use in the viewer menus. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -QString * -CutterOperatorViewerPluginInfo::GetMenuName() const -{ - return new QString(qApp->translate("OperatorNames", "CutterOperator")); -} - -// **************************************************************************** -// Method: CutterOperatorViewerPluginInfo::XPMIconData -// -// Purpose: -// Return a pointer to the icon data. -// -// Returns: A pointer to the icon data. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -#include <CutterOperator.xpm> -const char ** -CutterOperatorViewerPluginInfo::XPMIconData() const -{ - return CutterOperator_xpm; -} - diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/PyCutterOperatorAttributes.C b/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/PyCutterOperatorAttributes.C deleted file mode 100644 index 09c80f1ad19..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/PyCutterOperatorAttributes.C +++ /dev/null @@ -1,577 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#include <PyCutterOperatorAttributes.h> -#include <ObserverToCallback.h> -#include <stdio.h> -#include <snprintf.h> - -// **************************************************************************** -// Module: PyCutterOperatorAttributes -// -// Purpose: -// -// -// Note: Autogenerated by xml2python. Do not modify by hand! -// -// Programmer: xml2python -// Creation: omitted -// -// **************************************************************************** - -// -// This struct contains the Python type information and a CutterOperatorAttributes. -// -struct CutterOperatorAttributesObject -{ - PyObject_HEAD - CutterOperatorAttributes *data; - bool owns; - PyObject *parent; -}; - -// -// Internal prototypes -// -static PyObject *NewCutterOperatorAttributes(int); - -std::string -PyCutterOperatorAttributes_ToString(const CutterOperatorAttributes *atts, const char *prefix) -{ - std::string str; - char tmpStr[1000]; - - SNPRINTF(tmpStr, 1000, "%soriginX = %g\n", prefix, atts->GetOriginX()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%soriginY = %g\n", prefix, atts->GetOriginY()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%soriginZ = %g\n", prefix, atts->GetOriginZ()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%swidth = %g\n", prefix, atts->GetWidth()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%sheight = %g\n", prefix, atts->GetHeight()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%sdepth = %g\n", prefix, atts->GetDepth()); - str += tmpStr; - return str; -} - -static PyObject * -CutterOperatorAttributes_Notify(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - obj->data->Notify(); - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -CutterOperatorAttributes_SetOriginX(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the originX in the object. - obj->data->SetOriginX(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -CutterOperatorAttributes_GetOriginX(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetOriginX()); - return retval; -} - -/*static*/ PyObject * -CutterOperatorAttributes_SetOriginY(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the originY in the object. - obj->data->SetOriginY(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -CutterOperatorAttributes_GetOriginY(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetOriginY()); - return retval; -} - -/*static*/ PyObject * -CutterOperatorAttributes_SetOriginZ(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the originZ in the object. - obj->data->SetOriginZ(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -CutterOperatorAttributes_GetOriginZ(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetOriginZ()); - return retval; -} - -/*static*/ PyObject * -CutterOperatorAttributes_SetWidth(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the width in the object. - obj->data->SetWidth(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -CutterOperatorAttributes_GetWidth(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetWidth()); - return retval; -} - -/*static*/ PyObject * -CutterOperatorAttributes_SetHeight(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the height in the object. - obj->data->SetHeight(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -CutterOperatorAttributes_GetHeight(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetHeight()); - return retval; -} - -/*static*/ PyObject * -CutterOperatorAttributes_SetDepth(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the depth in the object. - obj->data->SetDepth(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -CutterOperatorAttributes_GetDepth(PyObject *self, PyObject *args) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetDepth()); - return retval; -} - - - -PyMethodDef PyCutterOperatorAttributes_methods[CUTTEROPERATORATTRIBUTES_NMETH] = { - {"Notify", CutterOperatorAttributes_Notify, METH_VARARGS}, - {"SetOriginX", CutterOperatorAttributes_SetOriginX, METH_VARARGS}, - {"GetOriginX", CutterOperatorAttributes_GetOriginX, METH_VARARGS}, - {"SetOriginY", CutterOperatorAttributes_SetOriginY, METH_VARARGS}, - {"GetOriginY", CutterOperatorAttributes_GetOriginY, METH_VARARGS}, - {"SetOriginZ", CutterOperatorAttributes_SetOriginZ, METH_VARARGS}, - {"GetOriginZ", CutterOperatorAttributes_GetOriginZ, METH_VARARGS}, - {"SetWidth", CutterOperatorAttributes_SetWidth, METH_VARARGS}, - {"GetWidth", CutterOperatorAttributes_GetWidth, METH_VARARGS}, - {"SetHeight", CutterOperatorAttributes_SetHeight, METH_VARARGS}, - {"GetHeight", CutterOperatorAttributes_GetHeight, METH_VARARGS}, - {"SetDepth", CutterOperatorAttributes_SetDepth, METH_VARARGS}, - {"GetDepth", CutterOperatorAttributes_GetDepth, METH_VARARGS}, - {NULL, NULL} -}; - -// -// Type functions -// - -static void -CutterOperatorAttributes_dealloc(PyObject *v) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)v; - if(obj->parent != 0) - Py_DECREF(obj->parent); - if(obj->owns) - delete obj->data; -} - -static int -CutterOperatorAttributes_compare(PyObject *v, PyObject *w) -{ - CutterOperatorAttributes *a = ((CutterOperatorAttributesObject *)v)->data; - CutterOperatorAttributes *b = ((CutterOperatorAttributesObject *)w)->data; - return (*a == *b) ? 0 : -1; -} - -PyObject * -PyCutterOperatorAttributes_getattr(PyObject *self, char *name) -{ - if(strcmp(name, "originX") == 0) - return CutterOperatorAttributes_GetOriginX(self, NULL); - if(strcmp(name, "originY") == 0) - return CutterOperatorAttributes_GetOriginY(self, NULL); - if(strcmp(name, "originZ") == 0) - return CutterOperatorAttributes_GetOriginZ(self, NULL); - if(strcmp(name, "width") == 0) - return CutterOperatorAttributes_GetWidth(self, NULL); - if(strcmp(name, "height") == 0) - return CutterOperatorAttributes_GetHeight(self, NULL); - if(strcmp(name, "depth") == 0) - return CutterOperatorAttributes_GetDepth(self, NULL); - - return Py_FindMethod(PyCutterOperatorAttributes_methods, self, name); -} - -int -PyCutterOperatorAttributes_setattr(PyObject *self, char *name, PyObject *args) -{ - // Create a tuple to contain the arguments since all of the Set - // functions expect a tuple. - PyObject *tuple = PyTuple_New(1); - PyTuple_SET_ITEM(tuple, 0, args); - Py_INCREF(args); - PyObject *obj = NULL; - - if(strcmp(name, "originX") == 0) - obj = CutterOperatorAttributes_SetOriginX(self, tuple); - else if(strcmp(name, "originY") == 0) - obj = CutterOperatorAttributes_SetOriginY(self, tuple); - else if(strcmp(name, "originZ") == 0) - obj = CutterOperatorAttributes_SetOriginZ(self, tuple); - else if(strcmp(name, "width") == 0) - obj = CutterOperatorAttributes_SetWidth(self, tuple); - else if(strcmp(name, "height") == 0) - obj = CutterOperatorAttributes_SetHeight(self, tuple); - else if(strcmp(name, "depth") == 0) - obj = CutterOperatorAttributes_SetDepth(self, tuple); - - if(obj != NULL) - Py_DECREF(obj); - - Py_DECREF(tuple); - if( obj == NULL) - PyErr_Format(PyExc_RuntimeError, "Unable to set unknown attribute: '%s'", name); - return (obj != NULL) ? 0 : -1; -} - -static int -CutterOperatorAttributes_print(PyObject *v, FILE *fp, int flags) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)v; - fprintf(fp, "%s", PyCutterOperatorAttributes_ToString(obj->data, "").c_str()); - return 0; -} - -PyObject * -CutterOperatorAttributes_str(PyObject *v) -{ - CutterOperatorAttributesObject *obj = (CutterOperatorAttributesObject *)v; - return PyString_FromString(PyCutterOperatorAttributes_ToString(obj->data,"").c_str()); -} - -// -// The doc string for the class. -// -#if PY_MAJOR_VERSION > 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 5) -static const char *CutterOperatorAttributes_Purpose = ""; -#else -static char *CutterOperatorAttributes_Purpose = ""; -#endif - -// -// The type description structure -// -static PyTypeObject CutterOperatorAttributesType = -{ - // - // Type header - // - PyObject_HEAD_INIT(&PyType_Type) - 0, // ob_size - "CutterOperatorAttributes", // tp_name - sizeof(CutterOperatorAttributesObject), // tp_basicsize - 0, // tp_itemsize - // - // Standard methods - // - (destructor)CutterOperatorAttributes_dealloc, // tp_dealloc - (printfunc)CutterOperatorAttributes_print, // tp_print - (getattrfunc)PyCutterOperatorAttributes_getattr, // tp_getattr - (setattrfunc)PyCutterOperatorAttributes_setattr, // tp_setattr - (cmpfunc)CutterOperatorAttributes_compare, // tp_compare - (reprfunc)0, // tp_repr - // - // Type categories - // - 0, // tp_as_number - 0, // tp_as_sequence - 0, // tp_as_mapping - // - // More methods - // - 0, // tp_hash - 0, // tp_call - (reprfunc)CutterOperatorAttributes_str, // tp_str - 0, // tp_getattro - 0, // tp_setattro - 0, // tp_as_buffer - Py_TPFLAGS_CHECKTYPES, // tp_flags - CutterOperatorAttributes_Purpose, // tp_doc - 0, // tp_traverse - 0, // tp_clear - 0, // tp_richcompare - 0 // tp_weaklistoffset -}; - -// -// Helper functions for object allocation. -// - -static CutterOperatorAttributes *defaultAtts = 0; -static CutterOperatorAttributes *currentAtts = 0; - -static PyObject * -NewCutterOperatorAttributes(int useCurrent) -{ - CutterOperatorAttributesObject *newObject; - newObject = PyObject_NEW(CutterOperatorAttributesObject, &CutterOperatorAttributesType); - if(newObject == NULL) - return NULL; - if(useCurrent && currentAtts != 0) - newObject->data = new CutterOperatorAttributes(*currentAtts); - else if(defaultAtts != 0) - newObject->data = new CutterOperatorAttributes(*defaultAtts); - else - newObject->data = new CutterOperatorAttributes; - newObject->owns = true; - newObject->parent = 0; - return (PyObject *)newObject; -} - -static PyObject * -WrapCutterOperatorAttributes(const CutterOperatorAttributes *attr) -{ - CutterOperatorAttributesObject *newObject; - newObject = PyObject_NEW(CutterOperatorAttributesObject, &CutterOperatorAttributesType); - if(newObject == NULL) - return NULL; - newObject->data = (CutterOperatorAttributes *)attr; - newObject->owns = false; - newObject->parent = 0; - return (PyObject *)newObject; -} - -/////////////////////////////////////////////////////////////////////////////// -// -// Interface that is exposed to the VisIt module. -// -/////////////////////////////////////////////////////////////////////////////// - -PyObject * -CutterOperatorAttributes_new(PyObject *self, PyObject *args) -{ - int useCurrent = 0; - if (!PyArg_ParseTuple(args, "i", &useCurrent)) - { - if (!PyArg_ParseTuple(args, "")) - return NULL; - else - PyErr_Clear(); - } - - return (PyObject *)NewCutterOperatorAttributes(useCurrent); -} - -// -// Plugin method table. These methods are added to the visitmodule's methods. -// -static PyMethodDef CutterOperatorAttributesMethods[] = { - {"CutterOperatorAttributes", CutterOperatorAttributes_new, METH_VARARGS}, - {NULL, NULL} /* Sentinel */ -}; - -static Observer *CutterOperatorAttributesObserver = 0; - -std::string -PyCutterOperatorAttributes_GetLogString() -{ - std::string s("CutterOperatorAtts = CutterOperatorAttributes()\n"); - if(currentAtts != 0) - s += PyCutterOperatorAttributes_ToString(currentAtts, "CutterOperatorAtts."); - return s; -} - -static void -PyCutterOperatorAttributes_CallLogRoutine(Subject *subj, void *data) -{ - CutterOperatorAttributes *atts = (CutterOperatorAttributes *)subj; - typedef void (*logCallback)(const std::string &); - logCallback cb = (logCallback)data; - - if(cb != 0) - { - std::string s("CutterOperatorAtts = CutterOperatorAttributes()\n"); - s += PyCutterOperatorAttributes_ToString(currentAtts, "CutterOperatorAtts."); - cb(s); - } -} - -void -PyCutterOperatorAttributes_StartUp(CutterOperatorAttributes *subj, void *data) -{ - if(subj == 0) - return; - - currentAtts = subj; - PyCutterOperatorAttributes_SetDefaults(subj); - - // - // Create the observer that will be notified when the attributes change. - // - if(CutterOperatorAttributesObserver == 0) - { - CutterOperatorAttributesObserver = new ObserverToCallback(subj, - PyCutterOperatorAttributes_CallLogRoutine, (void *)data); - } - -} - -void -PyCutterOperatorAttributes_CloseDown() -{ - delete defaultAtts; - defaultAtts = 0; - delete CutterOperatorAttributesObserver; - CutterOperatorAttributesObserver = 0; -} - -PyMethodDef * -PyCutterOperatorAttributes_GetMethodTable(int *nMethods) -{ - *nMethods = 1; - return CutterOperatorAttributesMethods; -} - -bool -PyCutterOperatorAttributes_Check(PyObject *obj) -{ - return (obj->ob_type == &CutterOperatorAttributesType); -} - -CutterOperatorAttributes * -PyCutterOperatorAttributes_FromPyObject(PyObject *obj) -{ - CutterOperatorAttributesObject *obj2 = (CutterOperatorAttributesObject *)obj; - return obj2->data; -} - -PyObject * -PyCutterOperatorAttributes_New() -{ - return NewCutterOperatorAttributes(0); -} - -PyObject * -PyCutterOperatorAttributes_Wrap(const CutterOperatorAttributes *attr) -{ - return WrapCutterOperatorAttributes(attr); -} - -void -PyCutterOperatorAttributes_SetParent(PyObject *obj, PyObject *parent) -{ - CutterOperatorAttributesObject *obj2 = (CutterOperatorAttributesObject *)obj; - obj2->parent = parent; -} - -void -PyCutterOperatorAttributes_SetDefaults(const CutterOperatorAttributes *atts) -{ - if(defaultAtts) - delete defaultAtts; - - defaultAtts = new CutterOperatorAttributes(*atts); -} - diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/QvisCutterOperatorWindow.C b/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/QvisCutterOperatorWindow.C deleted file mode 100644 index 028b98cb98e..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/QvisCutterOperatorWindow.C +++ /dev/null @@ -1,388 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#include "QvisCutterOperatorWindow.h" - -#include <CutterOperatorAttributes.h> -#include <ViewerProxy.h> - -#include <QCheckBox> -#include <QLabel> -#include <QLayout> -#include <QLineEdit> -#include <QSpinBox> -#include <QButtonGroup> -#include <QRadioButton> -#include <QvisColorTableButton.h> -#include <QvisOpacitySlider.h> -#include <QvisColorButton.h> -#include <QvisLineStyleWidget.h> -#include <QvisLineWidthWidget.h> -#include <QvisVariableButton.h> - -#include <stdio.h> -#include <string> - -using std::string; - -// **************************************************************************** -// Method: QvisCutterOperatorWindow::QvisCutterOperatorWindow -// -// Purpose: -// Constructor -// -// Note: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -QvisCutterOperatorWindow::QvisCutterOperatorWindow(const int type, - CutterOperatorAttributes *subj, - const QString &caption, - const QString &shortName, - QvisNotepadArea *notepad) - : QvisOperatorWindow(type,subj, caption, shortName, notepad) -{ - atts = subj; -} - - -// **************************************************************************** -// Method: QvisCutterOperatorWindow::~QvisCutterOperatorWindow -// -// Purpose: -// Destructor -// -// Note: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -QvisCutterOperatorWindow::~QvisCutterOperatorWindow() -{ -} - - -// **************************************************************************** -// Method: QvisCutterOperatorWindow::CreateWindowContents -// -// Purpose: -// Creates the widgets for the window. -// -// Note: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -QvisCutterOperatorWindow::CreateWindowContents() -{ - QGridLayout *mainLayout = new QGridLayout(); - topLayout->addLayout(mainLayout); - - originXLabel = new QLabel(tr("Origin X"), central); - mainLayout->addWidget(originXLabel,0,0); - originX = new QLineEdit(central); - connect(originX, SIGNAL(returnPressed()), - this, SLOT(originXProcessText())); - mainLayout->addWidget(originX, 0,1); - - originYLabel = new QLabel(tr("Origin Y"), central); - mainLayout->addWidget(originYLabel,1,0); - originY = new QLineEdit(central); - connect(originY, SIGNAL(returnPressed()), - this, SLOT(originYProcessText())); - mainLayout->addWidget(originY, 1,1); - - originZLabel = new QLabel(tr("Origin Z"), central); - mainLayout->addWidget(originZLabel,2,0); - originZ = new QLineEdit(central); - connect(originZ, SIGNAL(returnPressed()), - this, SLOT(originZProcessText())); - mainLayout->addWidget(originZ, 2,1); - - widthLabel = new QLabel(tr("Width"), central); - mainLayout->addWidget(widthLabel,3,0); - width = new QLineEdit(central); - connect(width, SIGNAL(returnPressed()), - this, SLOT(widthProcessText())); - mainLayout->addWidget(width, 3,1); - - heightLabel = new QLabel(tr("Height"), central); - mainLayout->addWidget(heightLabel,4,0); - height = new QLineEdit(central); - connect(height, SIGNAL(returnPressed()), - this, SLOT(heightProcessText())); - mainLayout->addWidget(height, 4,1); - - depthLabel = new QLabel(tr("Depth"), central); - mainLayout->addWidget(depthLabel,5,0); - depth = new QLineEdit(central); - connect(depth, SIGNAL(returnPressed()), - this, SLOT(depthProcessText())); - mainLayout->addWidget(depth, 5,1); - -} - - -// **************************************************************************** -// Method: QvisCutterOperatorWindow::UpdateWindow -// -// Purpose: -// Updates the widgets in the window when the subject changes. -// -// Note: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -QvisCutterOperatorWindow::UpdateWindow(bool doAll) -{ - - for(int i = 0; i < atts->NumAttributes(); ++i) - { - if(!doAll) - { - if(!atts->IsSelected(i)) - { - continue; - } - } - - switch(i) - { - case CutterOperatorAttributes::ID_originX: - originX->setText(DoubleToQString(atts->GetOriginX())); - break; - case CutterOperatorAttributes::ID_originY: - originY->setText(DoubleToQString(atts->GetOriginY())); - break; - case CutterOperatorAttributes::ID_originZ: - originZ->setText(DoubleToQString(atts->GetOriginZ())); - break; - case CutterOperatorAttributes::ID_width: - width->setText(DoubleToQString(atts->GetWidth())); - break; - case CutterOperatorAttributes::ID_height: - height->setText(DoubleToQString(atts->GetHeight())); - break; - case CutterOperatorAttributes::ID_depth: - depth->setText(DoubleToQString(atts->GetDepth())); - break; - } - } -} - - -// **************************************************************************** -// Method: QvisCutterOperatorWindow::GetCurrentValues -// -// Purpose: -// Gets values from certain widgets and stores them in the subject. -// -// Note: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -QvisCutterOperatorWindow::GetCurrentValues(int which_widget) -{ - bool doAll = (which_widget == -1); - - // Do originX - if(which_widget == CutterOperatorAttributes::ID_originX || doAll) - { - double val; - if(LineEditGetDouble(originX, val)) - atts->SetOriginX(val); - else - { - ResettingError(tr("Origin X"), - DoubleToQString(atts->GetOriginX())); - atts->SetOriginX(atts->GetOriginX()); - } - } - - // Do originY - if(which_widget == CutterOperatorAttributes::ID_originY || doAll) - { - double val; - if(LineEditGetDouble(originY, val)) - atts->SetOriginY(val); - else - { - ResettingError(tr("Origin Y"), - DoubleToQString(atts->GetOriginY())); - atts->SetOriginY(atts->GetOriginY()); - } - } - - // Do originZ - if(which_widget == CutterOperatorAttributes::ID_originZ || doAll) - { - double val; - if(LineEditGetDouble(originZ, val)) - atts->SetOriginZ(val); - else - { - ResettingError(tr("Origin Z"), - DoubleToQString(atts->GetOriginZ())); - atts->SetOriginZ(atts->GetOriginZ()); - } - } - - // Do width - if(which_widget == CutterOperatorAttributes::ID_width || doAll) - { - double val; - if(LineEditGetDouble(width, val)) - atts->SetWidth(val); - else - { - ResettingError(tr("Width"), - DoubleToQString(atts->GetWidth())); - atts->SetWidth(atts->GetWidth()); - } - } - - // Do height - if(which_widget == CutterOperatorAttributes::ID_height || doAll) - { - double val; - if(LineEditGetDouble(height, val)) - atts->SetHeight(val); - else - { - ResettingError(tr("Height"), - DoubleToQString(atts->GetHeight())); - atts->SetHeight(atts->GetHeight()); - } - } - - // Do depth - if(which_widget == CutterOperatorAttributes::ID_depth || doAll) - { - double val; - if(LineEditGetDouble(depth, val)) - atts->SetDepth(val); - else - { - ResettingError(tr("Depth"), - DoubleToQString(atts->GetDepth())); - atts->SetDepth(atts->GetDepth()); - } - } - -} - - -// -// Qt Slot functions -// - - -void -QvisCutterOperatorWindow::originXProcessText() -{ - GetCurrentValues(CutterOperatorAttributes::ID_originX); - Apply(); -} - - -void -QvisCutterOperatorWindow::originYProcessText() -{ - GetCurrentValues(CutterOperatorAttributes::ID_originY); - Apply(); -} - - -void -QvisCutterOperatorWindow::originZProcessText() -{ - GetCurrentValues(CutterOperatorAttributes::ID_originZ); - Apply(); -} - - -void -QvisCutterOperatorWindow::widthProcessText() -{ - GetCurrentValues(CutterOperatorAttributes::ID_width); - Apply(); -} - - -void -QvisCutterOperatorWindow::heightProcessText() -{ - GetCurrentValues(CutterOperatorAttributes::ID_height); - Apply(); -} - - -void -QvisCutterOperatorWindow::depthProcessText() -{ - GetCurrentValues(CutterOperatorAttributes::ID_depth); - Apply(); -} - - diff --git a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/avtCutterOperatorFilter.C b/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/avtCutterOperatorFilter.C deleted file mode 100644 index 68a959507e2..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/CutterOperator/src/avtCutterOperatorFilter.C +++ /dev/null @@ -1,216 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: avtCutterOperatorFilter.C -// ************************************************************************* // - -#include <avtCutterOperatorFilter.h> -#include <vtkDataSet.h> -#include <vtkVisItClipper.h> -#include <ClipperAdapter.h> -#include <MantidMDAlgorithms/CompositeImplicitFunction.h> -#include <MantidMDAlgorithms/BoxImplicitFunction.h> -#include <MantidVatesAPI/vtkClipperDataSetFactory.h> -#include <vtkVisItClipper.h> - - -// **************************************************************************** -// Method: avtCutterOperatorFilter constructor -// -// Programmer: owen -- generated by xml2avt -// Creation: Tue Feb 8 13:11:52 PST 2011 -// -// **************************************************************************** - -using namespace Mantid::VATES; - - - -avtCutterOperatorFilter::avtCutterOperatorFilter() -{ -} - - -// **************************************************************************** -// Method: avtCutterOperatorFilter destructor -// -// Programmer: owen -- generated by xml2avt -// Creation: Tue Feb 8 13:11:52 PST 2011 -// -// Modifications: -// -// **************************************************************************** - -avtCutterOperatorFilter::~avtCutterOperatorFilter() -{ -} - - -// **************************************************************************** -// Method: avtCutterOperatorFilter::Create -// -// Programmer: owen -- generated by xml2avt -// Creation: Tue Feb 8 13:11:52 PST 2011 -// -// **************************************************************************** - -avtFilter * -avtCutterOperatorFilter::Create() -{ - return new avtCutterOperatorFilter(); -} - - -// **************************************************************************** -// Method: avtCutterOperatorFilter::SetAtts -// -// Purpose: -// Sets the state of the filter based on the attribute object. -// -// Arguments: -// a The attributes to use. -// -// Programmer: owen -- generated by xml2avt -// Creation: Tue Feb 8 13:11:52 PST 2011 -// -// **************************************************************************** - -void -avtCutterOperatorFilter::SetAtts(const AttributeGroup *a) -{ - atts = *(const CutterOperatorAttributes*)a; -} - - -// **************************************************************************** -// Method: avtCutterOperatorFilter::Equivalent -// -// Purpose: -// Returns true if creating a new avtCutterOperatorFilter with the given -// parameters would result in an equivalent avtCutterOperatorFilter. -// -// Programmer: owen -- generated by xml2avt -// Creation: Tue Feb 8 13:11:52 PST 2011 -// -// **************************************************************************** - -bool -avtCutterOperatorFilter::Equivalent(const AttributeGroup *a) -{ - return (atts == *(CutterOperatorAttributes*)a); -} - -boost::shared_ptr<Mantid::API::ImplicitFunction> avtCutterOperatorFilter::constructBox( - Dimension_sptr spDimX, Dimension_sptr spDimY, Dimension_sptr spDimZ) const -{ - using namespace Mantid::MDAlgorithms; - BoxImplicitFunction* boxFunction; - - //Have to use dimension knowledge to construct box. - double originX = (spDimX->getMaximum() + spDimX->getMinimum()) / 2; - double originY = (spDimY->getMaximum() + spDimY->getMinimum()) / 2; - double originZ = (spDimZ->getMaximum() + spDimZ->getMinimum()) / 2; - double width = spDimX->getMaximum() - spDimX->getMinimum(); - double height = spDimY->getMaximum() - spDimY->getMinimum(); - double depth = spDimZ->getMaximum() - spDimZ->getMinimum(); - - //Create domain parameters. - OriginParameter originParam = OriginParameter(originX, originY, originZ); - WidthParameter widthParam = WidthParameter(width); - HeightParameter heightParam = HeightParameter(height); - DepthParameter depthParam = DepthParameter(depth); - - //Create the box. This is specific to this type of presenter and this type of filter. Other rebinning filters may use planes etc. - boxFunction = new BoxImplicitFunction(widthParam, heightParam, depthParam, originParam); - - - - return boost::shared_ptr<Mantid::API::ImplicitFunction>(boxFunction); -} - - - -// **************************************************************************** -// Method: avtCutterOperatorFilter::ExecuteData -// -// Purpose: -// Sends the specified input and output through the CutterOperator filter. -// -// Arguments: -// in_ds The input dataset. -// <unused> The domain number. -// <unused> The label. -// -// Returns: The output dataset. -// -// Programmer: owen -- generated by xml2avt -// Creation: Tue Feb 8 13:11:52 PST 2011 -// -// **************************************************************************** - -vtkDataSet * -avtCutterOperatorFilter::ExecuteData(vtkDataSet *in_ds, int, std::string) -{ - using namespace Mantid::MDAlgorithms; - - Dimension_sptr spxDimension = m_presenter.getXDimensionFromDS(in_ds); - Dimension_sptr spyDimension = m_presenter.getYDimensionFromDS(in_ds); - Dimension_sptr spzDimension = m_presenter.getZDimensionFromDS(in_ds); - Dimension_sptr sptDimension = m_presenter.getTDimensionFromDS(in_ds); - - DimensionVec dimensions(4); - dimensions[0] = spxDimension; - dimensions[1] = spyDimension; - dimensions[2] = spzDimension; - dimensions[3] = sptDimension; - - CompositeImplicitFunction* compFunction = new CompositeImplicitFunction; - compFunction->addFunction(constructBox(spxDimension, spyDimension, spzDimension)); - - m_presenter.constructReductionKnowledge(dimensions, spxDimension, spyDimension, spzDimension, sptDimension, compFunction, in_ds); - - Clipper* clipper = new ClipperAdapter(vtkVisItClipper::New()); - vtkDataSetFactory* factory = new vtkClipperDataSetFactory(m_presenter.getFunction(), in_ds, clipper); - - vtkDataSet* output = m_presenter.createVisualDataSet(boost::shared_ptr<vtkDataSetFactory>(factory)); - return output; - -} - - diff --git a/Code/Mantid/Vates/VisitPlugins/FindMantidKernel.cmake b/Code/Mantid/Vates/VisitPlugins/FindMantidKernel.cmake deleted file mode 100644 index 15dd698af34..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/FindMantidKernel.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# - Try to find ImageMagick++ -# Once done, this will define -# -# Magick++_FOUND - system has Magick++ -# Magick++_INCLUDE_DIRS - the Magick++ include directories -# Magick++_LIBRARIES - link these to use Magick++ - -include(LibFindMacros) - -# Dependencies -#libfind_package(MantidKernel Kernel) - -# Use pkg-config to get hints about paths -#libfind_pkg_check_modules(MantidKernel_PKGCONF ImageMagick++) - -# Include dir -find_path(MantidKernel_INCLUDE_DIR - NAMES System.h - PATHS ${/home/spu92482/mantid/trunk/Code/Mantid/Mantid/API/inc/MantidAPI} -) - -# Finally the library itself -find_library(MantidKernel_LIBRARY - NAMES MantidKernel - PATHS /home/spu92482/mantid/trunk/Code/Mantid/debug -) - -# Set the include dir variables and the libraries and let libfind_process do the rest. -# NOTE: Singular variables for this library, plural for libraries this this lib depends on. -set(MantidKernel_PROCESS_INCLUDES MantidKernel_INCLUDE_DIR MantidKernel_INCLUDE_DIRS) -set(MantidKernel_PROCESS_LIBS MantidKernel_LIBRARY MantidKernel_LIBRARIES) -libfind_process(Magick++) - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/CMakeLists.txt b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/CMakeLists.txt deleted file mode 100644 index 9720c524229..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/CMakeLists.txt +++ /dev/null @@ -1,142 +0,0 @@ -# DO NOT EDIT THIS FILE! THIS FILE IS AUTOMATICALLY GENERATED BY xml2cmake -CMAKE_MINIMUM_REQUIRED(VERSION 2.6.4 FATAL_ERROR) -INCLUDE(${VISIT_INCLUDE_DIR}/PluginVsInstall.cmake) -INCLUDE(${VISIT_INCLUDE_DIR}/VisItLibraryDependencies.cmake) - -PROJECT(RebinningCutter) - -set_mantid_subprojects(Vates/VatesAPI) - -SET(COMMON_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/RebinningCutterPluginInfo.C -${CMAKE_CURRENT_SOURCE_DIR}/src/RebinningCutterCommonPluginInfo.C -${CMAKE_CURRENT_SOURCE_DIR}/src/RebinningCutterAttributes.C -) - -SET(LIBI_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/RebinningCutterPluginInfo.C -) - -SET(LIBG_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/RebinningCutterGUIPluginInfo.C -${CMAKE_CURRENT_SOURCE_DIR}/src/QvisRebinningCutterWindow.C -${CMAKE_CURRENT_SOURCE_DIR}/src/IntegratedDimensionWidget.C -${CMAKE_CURRENT_SOURCE_DIR}/src/GeometryWidget.C -${CMAKE_CURRENT_SOURCE_DIR}/src/DimensionWidget.C -${COMMON_SOURCES} -) -SET(LIBG_MOC_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/inc/RebinningCutterOperator/QvisRebinningCutterWindow.h -${CMAKE_CURRENT_SOURCE_DIR}/inc/RebinningCutterOperator/IntegratedDimensionWidget.h -${CMAKE_CURRENT_SOURCE_DIR}/inc/RebinningCutterOperator/GeometryWidget.h -${CMAKE_CURRENT_SOURCE_DIR}/inc/RebinningCutterOperator/DimensionWidget.h -) -QT_WRAP_CPP(GRebinningCutterOperator LIBG_SOURCES ${LIBG_MOC_SOURCES}) - -SET(LIBV_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/RebinningCutterViewerPluginInfo.C -${COMMON_SOURCES} -) - -SET(LIBE_SOURCES -${CMAKE_CURRENT_SOURCE_DIR}/src/RebinningCutterEnginePluginInfo.C -${CMAKE_CURRENT_SOURCE_DIR}/src/avtRebinningCutterFilter.C -${CMAKE_CURRENT_SOURCE_DIR}/src/VisITProgressAction.C -${COMMON_SOURCES} -) - -INCLUDE_DIRECTORIES( -${CMAKE_CURRENT_SOURCE_DIR} -${VISIT_COMMON_INCLUDES} -${VISIT_INCLUDE_DIR}/visit/avt/DBAtts/MetaData -${VISIT_INCLUDE_DIR}/visit/avt/DBAtts/SIL -${VISIT_INCLUDE_DIR}/visit/avt/Database/Database -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/Abstract -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/CMFE -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/Conditional -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/Derivations -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/General -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/ImageProcessing -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/Management -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/Math -${VISIT_INCLUDE_DIR}/visit/avt/Expressions/MeshQuality -${VISIT_INCLUDE_DIR}/visit/avt/FileWriter -${VISIT_INCLUDE_DIR}/visit/avt/Filters -${VISIT_INCLUDE_DIR}/visit/avt/IVP -${VISIT_INCLUDE_DIR}/visit/avt/Math -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/AbstractFilters -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Data -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Pipeline -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Sinks -${VISIT_INCLUDE_DIR}/visit/avt/Pipeline/Sources -${VISIT_INCLUDE_DIR}/visit/avt/Plotter -${VISIT_INCLUDE_DIR}/visit/avt/QtVisWindow -${VISIT_INCLUDE_DIR}/visit/avt/View -${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/Colleagues -${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/Interactors -${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/Proxies -${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/Tools -${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/VisWindow -${VISIT_INCLUDE_DIR}/visit/gui -${VISIT_INCLUDE_DIR}/visit/mdserver/proxy -${VISIT_INCLUDE_DIR}/visit/mdserver/rpc -${VISIT_INCLUDE_DIR}/visit/viewer/main -${VISIT_INCLUDE_DIR}/visit/viewer/proxy -${VISIT_INCLUDE_DIR}/visit/viewer/rpc -${VISIT_INCLUDE_DIR}/visit/winutil -${VISIT_INCLUDE_DIR}/visit/visit_vtk/full -${VISIT_INCLUDE_DIR}/visit/visit_vtk/lightweight -${QT_INCLUDE_DIR} -${QT_QTCORE_INCLUDE_DIR} -${QT_QTGUI_INCLUDE_DIR} -${VTK_INCLUDE_DIRS} -${PYTHON_INCLUDE_PATH} -${VISIT_INCLUDE_DIR}/visit/visitpy/visitpy -${CMAKE_CURRENT_SOURCE_DIR}/inc/RebinningCutterOperator -) - -LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${QT_LIBRARY_DIR} ${MESA_LIBRARY_DIR} ${GLEW_LIBRARY_DIR} ${VTK_LIBRARY_DIRS}) - -ADD_LIBRARY(IRebinningCutterOperator ${LIBI_SOURCES}) -TARGET_LINK_LIBRARIES(IRebinningCutterOperator visitcommon) -SET(INSTALLTARGETS IRebinningCutterOperator) - -IF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY) - ADD_LIBRARY(GRebinningCutterOperator ${LIBG_SOURCES}) - TARGET_LINK_LIBRARIES(GRebinningCutterOperator visitcommon gui ${MANTID_SUBPROJECT_LIBS}) - - ADD_LIBRARY(VRebinningCutterOperator ${LIBV_SOURCES}) - TARGET_LINK_LIBRARIES(VRebinningCutterOperator visitcommon viewer) - SET(INSTALLTARGETS ${INSTALLTARGETS} GRebinningCutterOperator VRebinningCutterOperator) - - IF(VISIT_PYTHON_SCRIPTING) - SET(LIBS_SOURCES - ${CMAKE_CURRENT_SOURCE_DIR}/src/RebinningCutterScriptingPluginInfo.C - ${CMAKE_CURRENT_SOURCE_DIR}/src/PyRebinningCutterAttributes.C - ${COMMON_SOURCES} - ) - ADD_LIBRARY(SRebinningCutterOperator ${LIBS_SOURCES}) - TARGET_LINK_LIBRARIES(SRebinningCutterOperator visitcommon visitpy ${PYTHON_LIBRARY}) - SET(INSTALLTARGETS ${INSTALLTARGETS} SRebinningCutterOperator) - ENDIF(VISIT_PYTHON_SCRIPTING) - - IF(VISIT_JAVA) - ADD_CUSTOM_TARGET(JavaRebinningCutter ALL ${CMAKE_Java_COMPILER} ${CMAKE_Java_FLAGS} -d ${VISIT_BINARY_DIR}/java -classpath ${VISIT_BINARY_DIR}/java RebinningCutterAttributes.java) - ADD_DEPENDENCIES(JavaRebinningCutter JavaClient) - ENDIF(VISIT_JAVA) -ENDIF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY) - -ADD_LIBRARY(ERebinningCutterOperator_ser ${LIBE_SOURCES}) -TARGET_LINK_LIBRARIES(ERebinningCutterOperator_ser visitcommon avtexpressions_ser avtfilters_ser avtpipeline_ser ${MANTID_SUBPROJECT_LIBS}) -SET(INSTALLTARGETS ${INSTALLTARGETS} ERebinningCutterOperator_ser) - -IF(VISIT_PARALLEL) - ADD_PARALLEL_LIBRARY(ERebinningCutterOperator_par ${LIBE_SOURCES}) - TARGET_LINK_LIBRARIES(ERebinningCutterOperator_par visitcommon avtexpressions_par avtfilters_par avtpipeline_par ) - SET(INSTALLTARGETS ${INSTALLTARGETS} ERebinningCutterOperator_par) -ENDIF(VISIT_PARALLEL) - - -VISIT_INSTALL_OPERATOR_PLUGINS(${INSTALLTARGETS}) -VISIT_PLUGIN_TARGET_PREFIX(${INSTALLTARGETS}) - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.java b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.java deleted file mode 100644 index 9e7c4630561..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.java +++ /dev/null @@ -1,198 +0,0 @@ -// *************************************************************************** -// -// Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -// Produced at the Lawrence Livermore National Laboratory -// LLNL-CODE-442911 -// All rights reserved. -// -// This file is part of VisIt. For details, see https://visit.llnl.gov/. The -// full copyright notice is contained in the file COPYRIGHT located at the root -// of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, -// this list of conditions and the disclaimer below. -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the disclaimer (as noted below) in the -// documentation and/or other materials provided with the distribution. -// - Neither the name of the LLNS/LLNL nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -// LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -// DAMAGE. -// -// *************************************************************************** - -package llnl.visit.operators; - -import llnl.visit.AttributeSubject; -import llnl.visit.CommunicationBuffer; -import llnl.visit.Plugin; -import java.lang.Double; -import java.util.Vector; - -// **************************************************************************** -// Class: RebinningCutter -// -// Purpose: -// -// -// Notes: Autogenerated by xml2java. -// -// Programmer: xml2java -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -public class RebinningCutter extends AttributeSubject implements Plugin -{ - private static int RebinningCutter_numAdditionalAtts = 2; - - public RebinningCutter() - { - super(RebinningCutter_numAdditionalAtts); - - origin = new Vector(); - normal = new Vector(); - } - - public RebinningCutter(int nMoreFields) - { - super(RebinningCutter_numAdditionalAtts + nMoreFields); - - origin = new Vector(); - normal = new Vector(); - } - - public RebinningCutter(RebinningCutter obj) - { - super(RebinningCutter_numAdditionalAtts); - - int i; - - origin = new Vector(obj.origin.size()); - for(i = 0; i < obj.origin.size(); ++i) - { - Double dv = (Double)obj.origin.elementAt(i); - origin.addElement(new Double(dv.doubleValue())); - } - - normal = new Vector(obj.normal.size()); - for(i = 0; i < obj.normal.size(); ++i) - { - Double dv = (Double)obj.normal.elementAt(i); - normal.addElement(new Double(dv.doubleValue())); - } - - - SelectAll(); - } - - public int Offset() - { - return super.Offset() + super.GetNumAdditionalAttributes(); - } - - public int GetNumAdditionalAttributes() - { - return RebinningCutter_numAdditionalAtts; - } - - public boolean equals(RebinningCutter obj) - { - int i; - - // Compare the elements in the origin vector. - boolean origin_equal = (obj.origin.size() == origin.size()); - for(i = 0; (i < origin.size()) && origin_equal; ++i) - { - // Make references to Double from Object. - Double origin1 = (Double)origin.elementAt(i); - Double origin2 = (Double)obj.origin.elementAt(i); - origin_equal = origin1.equals(origin2); - } - // Compare the elements in the normal vector. - boolean normal_equal = (obj.normal.size() == normal.size()); - for(i = 0; (i < normal.size()) && normal_equal; ++i) - { - // Make references to Double from Object. - Double normal1 = (Double)normal.elementAt(i); - Double normal2 = (Double)obj.normal.elementAt(i); - normal_equal = normal1.equals(normal2); - } - // Create the return value - return (origin_equal && - normal_equal); - } - - public String GetName() { return "RebinningCutter"; } - public String GetVersion() { return "1.0"; } - - // Property setting methods - public void SetOrigin(Vector origin_) - { - origin = origin_; - Select(0); - } - - public void SetNormal(Vector normal_) - { - normal = normal_; - Select(1); - } - - // Property getting methods - public Vector GetOrigin() { return origin; } - public Vector GetNormal() { return normal; } - - // Write and read methods. - public void WriteAtts(CommunicationBuffer buf) - { - if(WriteSelect(0, buf)) - buf.WriteDoubleVector(origin); - if(WriteSelect(1, buf)) - buf.WriteDoubleVector(normal); - } - - public void ReadAtts(int index, CommunicationBuffer buf) - { - switch(index) - { - case 0: - SetOrigin(buf.ReadDoubleVector()); - break; - case 1: - SetNormal(buf.ReadDoubleVector()); - break; - } - } - - public String toString(String indent) - { - String str = new String(); - str = str + doubleVectorToString("origin", origin, indent) + "\n"; - str = str + doubleVectorToString("normal", normal, indent) + "\n"; - return str; - } - - - // Attributes - private Vector origin; // vector of Double objects - private Vector normal; // vector of Double objects -} - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.xml b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.xml deleted file mode 100644 index 40074d2113c..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0"?> - <Plugin name="RebinningCutter" type="operator" label="Rebinning Cutter" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" iconFile="RebinningCutter.xpm"> - <Attribute name="RebinningCutterAttributes" purpose="Attributes for the Rebinning Cutter" persistent="false" keyframe="true" exportAPI="" exportInclude=""> - <Field name="originX" label="Origin X" type="double"> - </Field> - <Field name="originY" label="Origin Y" type="double"> - </Field> - <Field name="originZ" label="Origin Z" type="double"> - </Field> - <Field name="normalX" label="Normal X" type="double"> - </Field> - <Field name="normalY" label="Normal Y" type="double"> - </Field> - <Field name="normalZ" label="Normal Z" type="double"> - </Field> - <Field name="width" label="Width" type="double"> - </Field> - <Field name="height" label="Height" type="double"> - </Field> - <Field name="depth" label="Depth" type="double"> - </Field> - <Field name="structured" label="Is Structured Grid" type="bool"> - </Field> - <Field name="xDimensionXML" label="unnamed1" type="string"> - </Field> - <Field name="yDimensionXML" label="unnamed1" type="int"> - </Field> - <Field name="zDimensionXML" label="unnamed2" type="int"> - </Field> - <Field name="tDimensionXML" label="unnamed3" type="int"> - </Field> - <Field name="isSetUp" label="unnamed4" type="bool"> - </Field> - <Field name="dimensionXML" label="unnamed1" type="stringVector"> - </Field> - <Field name="upX" label="" type="double"> - </Field> - <Field name="upY" label="" type="double"> - </Field> - <Field name="upZ" label="" type="double"> - </Field> - <Field name="isDirty" label="unnamed1" type="bool"> - </Field> - </Attribute> - </Plugin> diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.xpm b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.xpm deleted file mode 100644 index 931e7acb8e6..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutter.xpm +++ /dev/null @@ -1,217 +0,0 @@ -/* XPM */ -static const char * RebinningCutter_xpm[] = { -"32 32 182 2", -" c None", -". c #009AFF", -"+ c #0094F6", -"@ c #004878", -"# c #009FFF", -"$ c #0099FE", -"% c #0099FD", -"& c #0098FC", -"* c #0098FD", -"= c #0092F2", -"- c #00538A", -"; c #0097FA", -"> c #0096F9", -", c #0094F4", -"' c #006CB3", -") c #004F84", -"! c #005C99", -"~ c #0062A3", -"{ c #0076C4", -"] c #009CFF", -"^ c #0095F6", -"/ c #008AE5", -"( c #0071BA", -"_ c #005A96", -": c #0085DD", -"< c #009BFF", -"[ c #009DFF", -"} c #004C7F", -"| c #00A1FF", -"1 c #0067AB", -"2 c #005892", -"3 c #004E82", -"4 c #006DB5", -"5 c #005B98", -"6 c #0086DE", -"7 c #00A2FF", -"8 c #009EFF", -"9 c #005187", -"0 c #006BB0", -"a c #0075C2", -"b c #006FB8", -"c c #006EB7", -"d c #002F4F", -"e c #00568F", -"f c #00426D", -"g c #00A4FF", -"h c #008DEA", -"i c #004673", -"j c #001523", -"k c #000D15", -"l c #000000", -"m c #000407", -"n c #002D4B", -"o c #0094F5", -"p c #003E66", -"q c #00080E", -"r c #0064A5", -"s c #00A6FF", -"t c #002842", -"u c #002C4A", -"v c #0097F9", -"w c #005A95", -"x c #00121F", -"y c #005C98", -"z c #00A3FF", -"A c #007FD3", -"B c #001A2C", -"C c #000509", -"D c #00253D", -"E c #008BE7", -"F c #00A5FF", -"G c #000305", -"H c #0079C8", -"I c #0067AA", -"J c #005D99", -"K c #00070B", -"L c #00263E", -"M c #0080D4", -"N c #0084DB", -"O c #001F35", -"P c #00548B", -"Q c #0097FB", -"R c #0095F7", -"S c #0081D7", -"T c #0069AD", -"U c #00395F", -"V c #0092F3", -"W c #0072BC", -"X c #001726", -"Y c #00060A", -"Z c #0089E4", -"` c #007ED1", -" . c #002238", -".. c #002A46", -"+. c #0090EE", -"@. c #008EEB", -"#. c #003558", -"$. c #004775", -"%. c #0093F4", -"&. c #005F9E", -"*. c #0073BE", -"=. c #009AFE", -"-. c #0081D6", -";. c #00243C", -">. c #001524", -",. c #0088E1", -"'. c #0082D7", -"). c #0063A4", -"!. c #004A7B", -"~. c #004C7D", -"{. c #006EB5", -"]. c #000406", -"^. c #008DE9", -"/. c #000508", -"(. c #0077C5", -"_. c #007CCD", -":. c #004B7C", -"<. c #001E32", -"[. c #002841", -"}. c #001E33", -"|. c #006BB3", -"1. c #006AAF", -"2. c #000E17", -"3. c #000D16", -"4. c #006AB0", -"5. c #004F83", -"6. c #000B11", -"7. c #003B62", -"8. c #007FD2", -"9. c #001F33", -"0. c #006CB4", -"a. c #00131F", -"b. c #002136", -"c. c #00101A", -"d. c #005B96", -"e. c #0091F1", -"f. c #005E9C", -"g. c #00A0FF", -"h. c #006EB6", -"i. c #00111D", -"j. c #002239", -"k. c #0072BD", -"l. c #00101B", -"m. c #004470", -"n. c #0089E2", -"o. c #001A2B", -"p. c #004572", -"q. c #00233A", -"r. c #003050", -"s. c #002137", -"t. c #00121E", -"u. c #003456", -"v. c #0071BB", -"w. c #008BE6", -"x. c #002036", -"y. c #0087E0", -"z. c #00070D", -"A. c #001522", -"B. c #005085", -"C. c #0082D6", -"D. c #0089E3", -"E. c #001D31", -"F. c #0083D9", -"G. c #003E67", -"H. c #000F19", -"I. c #00558C", -"J. c #0081D5", -"K. c #008FEE", -"L. c #007BCB", -"M. c #000B13", -"N. c #003151", -"O. c #00080D", -"P. c #0064A6", -"Q. c #003F6A", -"R. c #001C2F", -"S. c #002741", -"T. c #001624", -"U. c #0095F8", -"V. c #001B2C", -"W. c #0062A4", -"X. c #006AB1", -"Y. c #005389", -". . . . . . . . . . . . . . . . . + @ # . . $ . . . $ % & * $ . ", -". . . . . . . . . . . . . . . . $ = - # $ . . $ ; > , ' ) ! > . ", -". . . . . . . . . . . . . . . . % ~ { ] . $ ^ / ( _ ' : < [ . $ ", -". . . . . . . . . . . . . . . . & } | . ; : 1 2 : | [ < . $ . . ", -". . . . . . . . . . . . . . . . & 3 # ^ 4 5 6 7 < $ . . . . . . ", -". . . . . . . . . . . . $ < [ 8 [ 9 % 0 ! # ] $ . . . . . . . . ", -". . . . . . . . . . . $ [ , a b c d e f g . $ . . . . . . . . . ", -". . . . . . . . . . . < h i j k k l m n o < . . . . . . . . . . ", -". . . . . . . . . . $ 7 p l l l l l l q r | $ . . . . . . . . . ", -". . . . . . . . . $ . s t l l l l l l l u v < . . . . . . . . . ", -". . . . . . . . . . 8 w x l l l l l l l q y z $ . . . . . . . . ", -". . . . . . . . . [ A B l l l C l l l l l D E ] . . . . . . . . ", -". . . . . . . . $ F @ G l l l H I J } K l L M [ . . . . . . . . ", -". . . . . . . . [ N O l l l P % Q > R S } T < . . . . . . . . . ", -". . . . . . . $ z - C l l U V . . . . $ > Q . $ . . . . . . . . ", -". . . . . . $ # W X l l Y Z . . . . $ . . . $ . . . . . . . . . ", -". . . . . . [ ` .l l l ..+.. . . . . . . . . . . . . . . . . . ", -". . . . $ < @.#.l l l l $.%.. . . $ . . . . $ . . . . . . . . . ", -". . . $ . [ &.l l l l l *.$ . . . . < Q %.=.. $ . . . . . . . . ", -". . . . ] -.;.l l l l >.,.< $ $ . % '.).f M < . . . . . . . . . ", -". . $ < R !.l l l l l ~.%.. . [ %.{.].l l L ^.] . . . . . . . . ", -". $ . . )./.l l l l l (.# 8 ; _.:.Y l <.[.}.|.# . . . . . . . . ", -"$ . < 1.2.l l l l l 3.4.A *.5.X l 6.7.8.I 9.0.# . . . . . . . . ", -". ] 4.a.l l l l l l 2. .b.c.l l l d.e.[ b .f.g.. . . . . . . . ", -"< h.i.l l l l l l l l l l l l j.P $ ] % k.l.m.z $ . . . . . . . ", -"n.o.l l l m l l l l l l l l C p.8 . $ < n.q.r.8 . . . . . . . . ", -"s.l l G t.K l l l l l l l u.v.'.. $ . < w.d x.y.] . . . . . . . ", -"l l l z.q.l l l l l l A.B.C.] ] $ . $ < D.t E.F.[ . . . . . . . ", -"l l l q G.l l l H.I.J.v.K.$ $ . . . . < L.M.N.. . . . . . . . . ", -"l l O.P.Z Q.R.S.0.$ < & $ . . $ $ . ] ; ~.<.6 ] . . . . . . . . ", -"l l T.| $ U.%.o & . . . . $ . . . & (.f V.W.# . $ . . . . . . . ", -"l /.X.[ . . . . . $ . . . . . . . . > c Y.# . $ . . . . . . . . "}; diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutterAttributes.java b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutterAttributes.java deleted file mode 100644 index 6e3da4d59b6..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/RebinningCutterAttributes.java +++ /dev/null @@ -1,503 +0,0 @@ -// *************************************************************************** -// -// Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -// Produced at the Lawrence Livermore National Laboratory -// LLNL-CODE-442911 -// All rights reserved. -// -// This file is part of VisIt. For details, see https://visit.llnl.gov/. The -// full copyright notice is contained in the file COPYRIGHT located at the root -// of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, -// this list of conditions and the disclaimer below. -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the disclaimer (as noted below) in the -// documentation and/or other materials provided with the distribution. -// - Neither the name of the LLNS/LLNL nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -// LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -// DAMAGE. -// -// *************************************************************************** - -package llnl.visit.operators; - -import llnl.visit.AttributeSubject; -import llnl.visit.CommunicationBuffer; -import llnl.visit.Plugin; -import java.util.Vector; - -// **************************************************************************** -// Class: RebinningCutterAttributes -// -// Purpose: -// Attributes for the Rebinning Cutter -// -// Notes: Autogenerated by xml2java. -// -// Programmer: xml2java -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -public class RebinningCutterAttributes extends AttributeSubject implements Plugin -{ - private static int RebinningCutterAttributes_numAdditionalAtts = 20; - - public RebinningCutterAttributes() - { - super(RebinningCutterAttributes_numAdditionalAtts); - - originX = 0; - originY = 0; - originZ = 0; - normalX = 0; - normalY = 0; - normalZ = 0; - width = 0; - height = 0; - depth = 8.76801e-317; - structured = false; - xDimensionXML = new String(""); - yDimensionXML = 0; - zDimensionXML = 0; - tDimensionXML = 0; - isSetUp = false; - dimensionXML = new Vector(); - upX = 0; - upY = 0; - upZ = 0; - isDirty = false; - } - - public RebinningCutterAttributes(int nMoreFields) - { - super(RebinningCutterAttributes_numAdditionalAtts + nMoreFields); - - originX = 0; - originY = 0; - originZ = 0; - normalX = 0; - normalY = 0; - normalZ = 0; - width = 0; - height = 0; - depth = 8.76801e-317; - structured = false; - xDimensionXML = new String(""); - yDimensionXML = 0; - zDimensionXML = 0; - tDimensionXML = 0; - isSetUp = false; - dimensionXML = new Vector(); - upX = 0; - upY = 0; - upZ = 0; - isDirty = false; - } - - public RebinningCutterAttributes(RebinningCutterAttributes obj) - { - super(RebinningCutterAttributes_numAdditionalAtts); - - int i; - - originX = obj.originX; - originY = obj.originY; - originZ = obj.originZ; - normalX = obj.normalX; - normalY = obj.normalY; - normalZ = obj.normalZ; - width = obj.width; - height = obj.height; - depth = obj.depth; - structured = obj.structured; - xDimensionXML = new String(obj.xDimensionXML); - yDimensionXML = obj.yDimensionXML; - zDimensionXML = obj.zDimensionXML; - tDimensionXML = obj.tDimensionXML; - isSetUp = obj.isSetUp; - dimensionXML = new Vector(obj.dimensionXML.size()); - for(i = 0; i < obj.dimensionXML.size(); ++i) - dimensionXML.addElement(new String((String)obj.dimensionXML.elementAt(i))); - - upX = obj.upX; - upY = obj.upY; - upZ = obj.upZ; - isDirty = obj.isDirty; - - SelectAll(); - } - - public int Offset() - { - return super.Offset() + super.GetNumAdditionalAttributes(); - } - - public int GetNumAdditionalAttributes() - { - return RebinningCutterAttributes_numAdditionalAtts; - } - - public boolean equals(RebinningCutterAttributes obj) - { - int i; - - // Compare the elements in the dimensionXML vector. - boolean dimensionXML_equal = (obj.dimensionXML.size() == dimensionXML.size()); - for(i = 0; (i < dimensionXML.size()) && dimensionXML_equal; ++i) - { - // Make references to String from Object. - String dimensionXML1 = (String)dimensionXML.elementAt(i); - String dimensionXML2 = (String)obj.dimensionXML.elementAt(i); - dimensionXML_equal = dimensionXML1.equals(dimensionXML2); - } - // Create the return value - return ((originX == obj.originX) && - (originY == obj.originY) && - (originZ == obj.originZ) && - (normalX == obj.normalX) && - (normalY == obj.normalY) && - (normalZ == obj.normalZ) && - (width == obj.width) && - (height == obj.height) && - (depth == obj.depth) && - (structured == obj.structured) && - (xDimensionXML.equals(obj.xDimensionXML)) && - (yDimensionXML == obj.yDimensionXML) && - (zDimensionXML == obj.zDimensionXML) && - (tDimensionXML == obj.tDimensionXML) && - (isSetUp == obj.isSetUp) && - dimensionXML_equal && - (upX == obj.upX) && - (upY == obj.upY) && - (upZ == obj.upZ) && - (isDirty == obj.isDirty)); - } - - public String GetName() { return "RebinningCutter"; } - public String GetVersion() { return "1.0"; } - - // Property setting methods - public void SetOriginX(double originX_) - { - originX = originX_; - Select(0); - } - - public void SetOriginY(double originY_) - { - originY = originY_; - Select(1); - } - - public void SetOriginZ(double originZ_) - { - originZ = originZ_; - Select(2); - } - - public void SetNormalX(double normalX_) - { - normalX = normalX_; - Select(3); - } - - public void SetNormalY(double normalY_) - { - normalY = normalY_; - Select(4); - } - - public void SetNormalZ(double normalZ_) - { - normalZ = normalZ_; - Select(5); - } - - public void SetWidth(double width_) - { - width = width_; - Select(6); - } - - public void SetHeight(double height_) - { - height = height_; - Select(7); - } - - public void SetDepth(double depth_) - { - depth = depth_; - Select(8); - } - - public void SetStructured(boolean structured_) - { - structured = structured_; - Select(9); - } - - public void SetXDimensionXML(String xDimensionXML_) - { - xDimensionXML = xDimensionXML_; - Select(10); - } - - public void SetYDimensionXML(int yDimensionXML_) - { - yDimensionXML = yDimensionXML_; - Select(11); - } - - public void SetZDimensionXML(int zDimensionXML_) - { - zDimensionXML = zDimensionXML_; - Select(12); - } - - public void SetTDimensionXML(int tDimensionXML_) - { - tDimensionXML = tDimensionXML_; - Select(13); - } - - public void SetIsSetUp(boolean isSetUp_) - { - isSetUp = isSetUp_; - Select(14); - } - - public void SetDimensionXML(Vector dimensionXML_) - { - dimensionXML = dimensionXML_; - Select(15); - } - - public void SetUpX(double upX_) - { - upX = upX_; - Select(16); - } - - public void SetUpY(double upY_) - { - upY = upY_; - Select(17); - } - - public void SetUpZ(double upZ_) - { - upZ = upZ_; - Select(18); - } - - public void SetIsDirty(boolean isDirty_) - { - isDirty = isDirty_; - Select(19); - } - - // Property getting methods - public double GetOriginX() { return originX; } - public double GetOriginY() { return originY; } - public double GetOriginZ() { return originZ; } - public double GetNormalX() { return normalX; } - public double GetNormalY() { return normalY; } - public double GetNormalZ() { return normalZ; } - public double GetWidth() { return width; } - public double GetHeight() { return height; } - public double GetDepth() { return depth; } - public boolean GetStructured() { return structured; } - public String GetXDimensionXML() { return xDimensionXML; } - public int GetYDimensionXML() { return yDimensionXML; } - public int GetZDimensionXML() { return zDimensionXML; } - public int GetTDimensionXML() { return tDimensionXML; } - public boolean GetIsSetUp() { return isSetUp; } - public Vector GetDimensionXML() { return dimensionXML; } - public double GetUpX() { return upX; } - public double GetUpY() { return upY; } - public double GetUpZ() { return upZ; } - public boolean GetIsDirty() { return isDirty; } - - // Write and read methods. - public void WriteAtts(CommunicationBuffer buf) - { - if(WriteSelect(0, buf)) - buf.WriteDouble(originX); - if(WriteSelect(1, buf)) - buf.WriteDouble(originY); - if(WriteSelect(2, buf)) - buf.WriteDouble(originZ); - if(WriteSelect(3, buf)) - buf.WriteDouble(normalX); - if(WriteSelect(4, buf)) - buf.WriteDouble(normalY); - if(WriteSelect(5, buf)) - buf.WriteDouble(normalZ); - if(WriteSelect(6, buf)) - buf.WriteDouble(width); - if(WriteSelect(7, buf)) - buf.WriteDouble(height); - if(WriteSelect(8, buf)) - buf.WriteDouble(depth); - if(WriteSelect(9, buf)) - buf.WriteBool(structured); - if(WriteSelect(10, buf)) - buf.WriteString(xDimensionXML); - if(WriteSelect(11, buf)) - buf.WriteInt(yDimensionXML); - if(WriteSelect(12, buf)) - buf.WriteInt(zDimensionXML); - if(WriteSelect(13, buf)) - buf.WriteInt(tDimensionXML); - if(WriteSelect(14, buf)) - buf.WriteBool(isSetUp); - if(WriteSelect(15, buf)) - buf.WriteStringVector(dimensionXML); - if(WriteSelect(16, buf)) - buf.WriteDouble(upX); - if(WriteSelect(17, buf)) - buf.WriteDouble(upY); - if(WriteSelect(18, buf)) - buf.WriteDouble(upZ); - if(WriteSelect(19, buf)) - buf.WriteBool(isDirty); - } - - public void ReadAtts(int index, CommunicationBuffer buf) - { - switch(index) - { - case 0: - SetOriginX(buf.ReadDouble()); - break; - case 1: - SetOriginY(buf.ReadDouble()); - break; - case 2: - SetOriginZ(buf.ReadDouble()); - break; - case 3: - SetNormalX(buf.ReadDouble()); - break; - case 4: - SetNormalY(buf.ReadDouble()); - break; - case 5: - SetNormalZ(buf.ReadDouble()); - break; - case 6: - SetWidth(buf.ReadDouble()); - break; - case 7: - SetHeight(buf.ReadDouble()); - break; - case 8: - SetDepth(buf.ReadDouble()); - break; - case 9: - SetStructured(buf.ReadBool()); - break; - case 10: - SetXDimensionXML(buf.ReadString()); - break; - case 11: - SetYDimensionXML(buf.ReadInt()); - break; - case 12: - SetZDimensionXML(buf.ReadInt()); - break; - case 13: - SetTDimensionXML(buf.ReadInt()); - break; - case 14: - SetIsSetUp(buf.ReadBool()); - break; - case 15: - SetDimensionXML(buf.ReadStringVector()); - break; - case 16: - SetUpX(buf.ReadDouble()); - break; - case 17: - SetUpY(buf.ReadDouble()); - break; - case 18: - SetUpZ(buf.ReadDouble()); - break; - case 19: - SetIsDirty(buf.ReadBool()); - break; - } - } - - public String toString(String indent) - { - String str = new String(); - str = str + doubleToString("originX", originX, indent) + "\n"; - str = str + doubleToString("originY", originY, indent) + "\n"; - str = str + doubleToString("originZ", originZ, indent) + "\n"; - str = str + doubleToString("normalX", normalX, indent) + "\n"; - str = str + doubleToString("normalY", normalY, indent) + "\n"; - str = str + doubleToString("normalZ", normalZ, indent) + "\n"; - str = str + doubleToString("width", width, indent) + "\n"; - str = str + doubleToString("height", height, indent) + "\n"; - str = str + doubleToString("depth", depth, indent) + "\n"; - str = str + boolToString("structured", structured, indent) + "\n"; - str = str + stringToString("xDimensionXML", xDimensionXML, indent) + "\n"; - str = str + intToString("yDimensionXML", yDimensionXML, indent) + "\n"; - str = str + intToString("zDimensionXML", zDimensionXML, indent) + "\n"; - str = str + intToString("tDimensionXML", tDimensionXML, indent) + "\n"; - str = str + boolToString("isSetUp", isSetUp, indent) + "\n"; - str = str + stringVectorToString("dimensionXML", dimensionXML, indent) + "\n"; - str = str + doubleToString("upX", upX, indent) + "\n"; - str = str + doubleToString("upY", upY, indent) + "\n"; - str = str + doubleToString("upZ", upZ, indent) + "\n"; - str = str + boolToString("isDirty", isDirty, indent) + "\n"; - return str; - } - - - // Attributes - private double originX; - private double originY; - private double originZ; - private double normalX; - private double normalY; - private double normalZ; - private double width; - private double height; - private double depth; - private boolean structured; - private String xDimensionXML; - private int yDimensionXML; - private int zDimensionXML; - private int tDimensionXML; - private boolean isSetUp; - private Vector dimensionXML; // vector of String objects - private double upX; - private double upY; - private double upZ; - private boolean isDirty; -} - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/DimensionWidget.h b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/DimensionWidget.h deleted file mode 100644 index 3bff579dff7..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/DimensionWidget.h +++ /dev/null @@ -1,104 +0,0 @@ -#ifndef DIMENSION_WIDGET_H -#define DIMENSION_WIDGET_H - -#include <qgridlayout.h> -#include <qwidget.h> -#include <memory> -#include <boost/shared_ptr.hpp> -#include <vector> - -//Foward decs -class QLabel; -class QComboBox; -class QLineEdit; -class GeometryWidget; - -namespace Mantid -{ - namespace Geometry - { - class IMDDimension; - } -} - - -class DimensionWidget: public QWidget -{ -Q_OBJECT -public: - - /// Constructor. - DimensionWidget(GeometryWidget* geometryWidget, const std::string& name, const int dimensionIndex, - std::vector<boost::shared_ptr<Mantid::Geometry::IMDDimension> > nonIntegratedDimensions ); - - /// Destructor - ~DimensionWidget(); - - /// Get minimum - double getMinimum() const; - - /// Get maximum - double getMaximum() const; - - /// Set minimum - void setMinimum(double minimum); - - /// Set maximum - void setMaximum(double maximum); - - /// Get the number of dimensions. - boost::shared_ptr<Mantid::Geometry::IMDDimension> getDimension() const; - - /// Get the number of bins. - int getNBins() const; - - /// Get the selected index. - int getSelectedIndex() const; - - /// Populates gui controls. May be called more than once. - void populateWidget(const int dimensionIndex); - - /// Reset the bin values. - void resetBins(); - -signals: - void maxSet(); - void minSet(); - void nBinsSet(); -private: - QGridLayout* m_layout; - - QLineEdit* m_nBinsBox; - - QLineEdit* m_minBox; - - QLineEdit* m_maxBox; - - QComboBox* m_dimensionCombo; - - int m_currentDimensionIndex; - - std::string m_name; - - GeometryWidget* m_geometryWidget; - - std::vector<boost::shared_ptr<Mantid::Geometry::IMDDimension> > m_vecNonIntegratedDimensions; - - /// Creates gui layout and controls. - void constructWidget(const int dimensionIndex); - - - -private slots: - - /// Handles dimension change events. - void dimensionSelectedListener(); - - void nBinsListener(); - - void maxBoxListener(); - - void minBoxListener(); -}; - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/GeometryWidget.h b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/GeometryWidget.h deleted file mode 100644 index dac72fe1943..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/GeometryWidget.h +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef GEOMETRY_WIDGET_H -#define GEOMETRY_WIDGET_H - -/** This is the GUI implementation of the geometry layout for the Rebinning operations. - * Inpects input geometry to determine possibilities for shaping the geometry via the user interface. - * Manages DimensionWidget and IntegratedDimensionWidget types. - - @author Owen Arnold Tessella/ISIS - @date January 10/2011 - - Copyright © 2008 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory - - This file is part of Mantid. - - Mantid is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - Mantid is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - - File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>. - Code Documentation is available at: <http://doxygen.mantidproject.org> -*/ - - - -#include <qgridlayout.h> -#include <qwidget.h> -#include <memory> -#include <boost/shared_ptr.hpp> - -//Foward decs -class QLabel; -class QComboBox; -class IntegratedDimensionWidget; -class DimensionWidget; - -namespace Mantid -{ - namespace Geometry - { - class MDGeometry; - class IMDDimension; - } -} - - -class GeometryWidget: public QWidget -{ -Q_OBJECT -public: - -GeometryWidget(); -void constructWidget(std::vector<boost::shared_ptr<Mantid::Geometry::IMDDimension> > nonIntegratedVector); - -void childAppliedNewDimensionSelection( - const unsigned int oldDimensionIndex, - boost::shared_ptr<Mantid::Geometry::IMDDimension> newDimension, - DimensionWidget* pDimensionWidget); - -void dimensionWidgetChanged(); - -~GeometryWidget(); - -/// Gets the x dimension in a serialized form -std::string getXDimensionXML() const; - -/// Gets the y dimension in a serialized form -std::string getYDimensionXML() const; - -/// Gets the z dimension in a serialzed form -std::string getZDimensionXML() const; - - -bool isSetup() const -{ - return m_isConstructed; -} - -/// Single signal gets raised if anything changes -signals: - void valueChanged(); - -private: - -/// Check that constructWidget has been called. -void validateSetup() const; -DimensionWidget* m_xDimensionWidget; -DimensionWidget* m_yDimensionWidget; -DimensionWidget* m_zDimensionWidget; -bool m_isConstructed; -std::vector<boost::shared_ptr<Mantid::Geometry::IMDDimension> > m_nonIntegratedVector; -/// Directs Reset of all bin values of child dimension widgets. -void resetAllBinValues(); - -}; - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/IntegratedDimensionWidget.h b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/IntegratedDimensionWidget.h deleted file mode 100644 index 7bc564fc7b9..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/IntegratedDimensionWidget.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef INTEGRATED_DIMENSION_WIDGET_H -#define INTEGRATED_DIMENSION_WIDGET_H - -#include <qgridlayout.h> -#include <qwidget.h> - -class RebinningCutterAttributes; -class QLabel; -class QLineEdit; - -class IntegratedDimensionWidget: public QWidget -{ -Q_OBJECT -public: - IntegratedDimensionWidget(std::string dimensionName, double min, double max); //TODO, widget should have ref to Dimension - - ~IntegratedDimensionWidget() - { - } - double getLowerLimit() const; - double getUpperLimit() const; -private: - QLineEdit* m_LowerLimitInput; - QLineEdit* m_UpperLimitInput; -}; - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/PyRebinningCutter.h b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/PyRebinningCutter.h deleted file mode 100644 index 1ac647be572..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/PyRebinningCutter.h +++ /dev/null @@ -1,64 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#ifndef PY_REBINNINGCUTTER_H -#define PY_REBINNINGCUTTER_H -#include <Python.h> -#include <RebinningCutter.h> - -// -// Functions exposed to the VisIt module. -// -#define REBINNINGCUTTER_NMETH 6 -void PyRebinningCutter_StartUp(RebinningCutter *subj, void *data); -void PyRebinningCutter_CloseDown(); -PyMethodDef * PyRebinningCutter_GetMethodTable(int *nMethods); -bool PyRebinningCutter_Check(PyObject *obj); -RebinningCutter * PyRebinningCutter_FromPyObject(PyObject *obj); -PyObject * PyRebinningCutter_New(); -PyObject * PyRebinningCutter_Wrap(const RebinningCutter *attr); -void PyRebinningCutter_SetParent(PyObject *obj, PyObject *parent); -void PyRebinningCutter_SetDefaults(const RebinningCutter *atts); -std::string PyRebinningCutter_GetLogString(); -std::string PyRebinningCutter_ToString(const RebinningCutter *, const char *); -PyObject * PyRebinningCutter_getattr(PyObject *self, char *name); -int PyRebinningCutter_setattr(PyObject *self, char *name, PyObject *args); -extern PyMethodDef PyRebinningCutter_methods[REBINNINGCUTTER_NMETH]; - -#endif - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/PyRebinningCutterAttributes.h b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/PyRebinningCutterAttributes.h deleted file mode 100644 index e292854a2e3..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/PyRebinningCutterAttributes.h +++ /dev/null @@ -1,64 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#ifndef PY_REBINNINGCUTTERATTRIBUTES_H -#define PY_REBINNINGCUTTERATTRIBUTES_H -#include <Python.h> -#include <RebinningCutterAttributes.h> - -// -// Functions exposed to the VisIt module. -// -#define REBINNINGCUTTERATTRIBUTES_NMETH 42 -void PyRebinningCutterAttributes_StartUp(RebinningCutterAttributes *subj, void *data); -void PyRebinningCutterAttributes_CloseDown(); -PyMethodDef * PyRebinningCutterAttributes_GetMethodTable(int *nMethods); -bool PyRebinningCutterAttributes_Check(PyObject *obj); -RebinningCutterAttributes * PyRebinningCutterAttributes_FromPyObject(PyObject *obj); -PyObject * PyRebinningCutterAttributes_New(); -PyObject * PyRebinningCutterAttributes_Wrap(const RebinningCutterAttributes *attr); -void PyRebinningCutterAttributes_SetParent(PyObject *obj, PyObject *parent); -void PyRebinningCutterAttributes_SetDefaults(const RebinningCutterAttributes *atts); -std::string PyRebinningCutterAttributes_GetLogString(); -std::string PyRebinningCutterAttributes_ToString(const RebinningCutterAttributes *, const char *); -PyObject * PyRebinningCutterAttributes_getattr(PyObject *self, char *name); -int PyRebinningCutterAttributes_setattr(PyObject *self, char *name, PyObject *args); -extern PyMethodDef PyRebinningCutterAttributes_methods[REBINNINGCUTTERATTRIBUTES_NMETH]; - -#endif - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/QvisRebinningCutterWindow.h b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/QvisRebinningCutterWindow.h deleted file mode 100644 index ee922e2a7a7..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/QvisRebinningCutterWindow.h +++ /dev/null @@ -1,161 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#ifndef QVISREBINNINGCUTTERWINDOW_H -#define QVISREBINNINGCUTTERWINDOW_H - -#include <QvisOperatorWindow.h> -#include <AttributeSubject.h> -#include <qgridlayout.h> -#include <qwidget.h> - -class RebinningCutterAttributes; -class PlotInfoAttributes; -class QLabel; -class QCheckBox; -class QLineEdit; -class QSpinBox; -class QVBox; -class QButtonGroup; -class QvisColorTableButton; -class QvisOpacitySlider; -class QvisColorButton; -class QvisLineStyleWidget; -class QvisLineWidthWidget; -class QvisVariableButton; -class QComboBox; -class GeometryWidget; -enum Visibility{Hide, Show}; -// **************************************************************************** -// Class: QvisRebinningCutterWindow -// -// Purpose: -// Defines QvisRebinningCutterWindow class. -// -// Notes: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -class QvisRebinningCutterWindow : public QvisOperatorWindow -{ - Q_OBJECT - public: - QvisRebinningCutterWindow(const int type, - RebinningCutterAttributes *subj, - const QString &caption = QString::null, - const QString &shortName = QString::null, - QvisNotepadArea *notepad = 0); - virtual ~QvisRebinningCutterWindow(); - virtual void CreateWindowContents(); - protected: - void UpdateWindow(bool doAll); - virtual void GetCurrentValues(int which_widget); - private slots: - void originXProcessText(); - void originYProcessText(); - void originZProcessText(); - void normalXProcessText(); - void normalYProcessText(); - void normalZProcessText(); - void widthProcessText(); - void heightProcessText(); - void depthProcessText(); - void structuredChanged(bool val); - void xDimensionXMLProcessText(); - void yDimensionXMLProcessText(); - void zDimensionXMLProcessText(); - void tDimensionXMLProcessText(); - void geometryChangedlistener(); - //writeHeaderCallback unknown for stringVector (variable dimensionXML) - void upYProcessText(); - void upZProcessText(); - private: - /// If possible create the geometry widget from pipeline information. - void createGeometryWidget(); - /// helper method to determine wheter plot information is present. Returns Null if not present. - PlotInfoAttributes* findRebinningInfo() const; - /// Enable hiding/showing of selected controls - void setControlsVisibility(Visibility vis) const; - - QLineEdit *originX; - QLineEdit *originY; - QLineEdit *originZ; - QLineEdit *normalX; - QLineEdit *normalY; - QLineEdit *normalZ; - QLineEdit *width; - QLineEdit *height; - QLineEdit *depth; - QCheckBox *structured; - - //writeHeaderData unknown for stringVector (variable dimensionXML) - QLineEdit *upY; - QLineEdit *upZ; - QLabel *originXLabel; - QLabel *originYLabel; - QLabel *originZLabel; - QLabel *normalXLabel; - QLabel *normalYLabel; - QLabel *normalZLabel; - QLabel *widthLabel; - QLabel *heightLabel; - QLabel *depthLabel; - QLabel *xDimensionXMLLabel; - QLabel *yDimensionXMLLabel; - QLabel *zDimensionXMLLabel; - QLabel *tDimensionXMLLabel; - QLabel *dimensionXMLLabel; - QLabel *upYLabel; - QLabel *upZLabel; - - RebinningCutterAttributes *atts; - GeometryWidget* m_geomWidget; - QGridLayout* mainLayout; - QLabel* m_setupMessageLabel; - QLabel* normalXYZLabel; - QLabel* originXYZLabel; -}; - - - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutter.h b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutter.h deleted file mode 100644 index f8fc0d323a5..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutter.h +++ /dev/null @@ -1,125 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#ifndef REBINNINGCUTTER_H -#define REBINNINGCUTTER_H -#include <AttributeSubject.h> - - -// **************************************************************************** -// Class: RebinningCutter -// -// Purpose: -// -// -// Notes: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -class RebinningCutter : public AttributeSubject -{ -public: - // These constructors are for objects of this class - RebinningCutter(); - RebinningCutter(const RebinningCutter &obj); -protected: - // These constructors are for objects derived from this class - RebinningCutter(private_tmfs_t tmfs); - RebinningCutter(const RebinningCutter &obj, private_tmfs_t tmfs); -public: - virtual ~RebinningCutter(); - - virtual RebinningCutter& operator = (const RebinningCutter &obj); - virtual bool operator == (const RebinningCutter &obj) const; - virtual bool operator != (const RebinningCutter &obj) const; -private: - void Init(); - void Copy(const RebinningCutter &obj); -public: - - virtual const std::string TypeName() const; - virtual bool CopyAttributes(const AttributeGroup *); - virtual AttributeSubject *CreateCompatible(const std::string &) const; - virtual AttributeSubject *NewInstance(bool) const; - - // Property selection methods - virtual void SelectAll(); - void SelectOrigin(); - void SelectNormal(); - - // Property setting methods - void SetOrigin(const doubleVector &origin_); - void SetNormal(const doubleVector &normal_); - - // Property getting methods - const doubleVector &GetOrigin() const; - doubleVector &GetOrigin(); - const doubleVector &GetNormal() const; - doubleVector &GetNormal(); - - - // Keyframing methods - virtual std::string GetFieldName(int index) const; - virtual AttributeGroup::FieldType GetFieldType(int index) const; - virtual std::string GetFieldTypeName(int index) const; - virtual bool FieldsEqual(int index, const AttributeGroup *rhs) const; - - - // IDs that can be used to identify fields in case statements - enum { - ID_origin = 0, - ID_normal, - ID__LAST - }; - -private: - doubleVector origin; - doubleVector normal; - - // Static class format string for type map. - static const char *TypeMapFormatString; - static const private_tmfs_t TmfsStruct; -}; -#define REBINNINGCUTTER_TMFS "d*d*" - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutterAttributes.h b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutterAttributes.h deleted file mode 100644 index 5317a5d6910..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutterAttributes.h +++ /dev/null @@ -1,198 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#ifndef REBINNINGCUTTERATTRIBUTES_H -#define REBINNINGCUTTERATTRIBUTES_H -#include <string> -#include <AttributeSubject.h> - - -// **************************************************************************** -// Class: RebinningCutterAttributes -// -// Purpose: -// Attributes for the Rebinning Cutter -// -// Notes: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -class RebinningCutterAttributes : public AttributeSubject -{ -public: - // These constructors are for objects of this class - RebinningCutterAttributes(); - RebinningCutterAttributes(const RebinningCutterAttributes &obj); -protected: - // These constructors are for objects derived from this class - RebinningCutterAttributes(private_tmfs_t tmfs); - RebinningCutterAttributes(const RebinningCutterAttributes &obj, private_tmfs_t tmfs); -public: - virtual ~RebinningCutterAttributes(); - - virtual RebinningCutterAttributes& operator = (const RebinningCutterAttributes &obj); - virtual bool operator == (const RebinningCutterAttributes &obj) const; - virtual bool operator != (const RebinningCutterAttributes &obj) const; -private: - void Init(); - void Copy(const RebinningCutterAttributes &obj); -public: - - virtual const std::string TypeName() const; - virtual bool CopyAttributes(const AttributeGroup *); - virtual AttributeSubject *CreateCompatible(const std::string &) const; - virtual AttributeSubject *NewInstance(bool) const; - - // Property selection methods - virtual void SelectAll(); - void SelectXDimensionXML(); - void SelectDimensionXML(); - - // Property setting methods - void SetOriginX(double originX_); - void SetOriginY(double originY_); - void SetOriginZ(double originZ_); - void SetNormalX(double normalX_); - void SetNormalY(double normalY_); - void SetNormalZ(double normalZ_); - void SetWidth(double width_); - void SetHeight(double height_); - void SetDepth(double depth_); - void SetStructured(bool structured_); - void SetXDimensionXML(const std::string &xDimensionXML_); - void SetYDimensionXML(int yDimensionXML_); - void SetZDimensionXML(int zDimensionXML_); - void SetTDimensionXML(int tDimensionXML_); - void SetIsSetUp(bool isSetUp_); - void SetDimensionXML(const stringVector &dimensionXML_); - void SetUpX(double upX_); - void SetUpY(double upY_); - void SetUpZ(double upZ_); - void SetIsDirty(bool isDirty_); - - // Property getting methods - double GetOriginX() const; - double GetOriginY() const; - double GetOriginZ() const; - double GetNormalX() const; - double GetNormalY() const; - double GetNormalZ() const; - double GetWidth() const; - double GetHeight() const; - double GetDepth() const; - bool GetStructured() const; - const std::string &GetXDimensionXML() const; - std::string &GetXDimensionXML(); - int GetYDimensionXML() const; - int GetZDimensionXML() const; - int GetTDimensionXML() const; - bool GetIsSetUp() const; - const stringVector &GetDimensionXML() const; - stringVector &GetDimensionXML(); - double GetUpX() const; - double GetUpY() const; - double GetUpZ() const; - bool GetIsDirty() const; - - - // Keyframing methods - virtual std::string GetFieldName(int index) const; - virtual AttributeGroup::FieldType GetFieldType(int index) const; - virtual std::string GetFieldTypeName(int index) const; - virtual bool FieldsEqual(int index, const AttributeGroup *rhs) const; - - - // IDs that can be used to identify fields in case statements - enum { - ID_originX = 0, - ID_originY, - ID_originZ, - ID_normalX, - ID_normalY, - ID_normalZ, - ID_width, - ID_height, - ID_depth, - ID_structured, - ID_xDimensionXML, - ID_yDimensionXML, - ID_zDimensionXML, - ID_tDimensionXML, - ID_isSetUp, - ID_dimensionXML, - ID_upX, - ID_upY, - ID_upZ, - ID_isDirty, - ID__LAST - }; - -private: - double originX; - double originY; - double originZ; - double normalX; - double normalY; - double normalZ; - double width; - double height; - double depth; - bool structured; - std::string xDimensionXML; - int yDimensionXML; - int zDimensionXML; - int tDimensionXML; - bool isSetUp; - stringVector dimensionXML; - double upX; - double upY; - double upZ; - bool isDirty; - - // Static class format string for type map. - static const char *TypeMapFormatString; - static const private_tmfs_t TmfsStruct; -}; -#define REBINNINGCUTTERATTRIBUTES_TMFS "dddddddddbsiiibs*dddb" - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutterPluginInfo.h b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutterPluginInfo.h deleted file mode 100644 index cae979804e2..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/RebinningCutterPluginInfo.h +++ /dev/null @@ -1,125 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: RebinningCutterPluginInfo.h -// ************************************************************************* // - -#ifndef REBINNINGCUTTER_PLUGIN_INFO_H -#define REBINNINGCUTTER_PLUGIN_INFO_H -#include <OperatorPluginInfo.h> -#include <operator_plugin_exports.h> - -class RebinningCutterAttributes; - -// **************************************************************************** -// Class: RebinningCutterPluginInfo -// -// Purpose: -// Five classes that provide all the information about an RebinningCutter operator -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -class RebinningCutterGeneralPluginInfo : public virtual GeneralOperatorPluginInfo -{ - public: - virtual const char *GetName() const; - virtual const char *GetVersion() const; - virtual const char *GetID() const; - virtual bool EnabledByDefault() const; -}; - -class RebinningCutterCommonPluginInfo : public virtual CommonOperatorPluginInfo, public virtual RebinningCutterGeneralPluginInfo -{ - public: - virtual AttributeSubject *AllocAttributes(); - virtual void CopyAttributes(AttributeSubject *to, AttributeSubject *from); -}; - -class RebinningCutterGUIPluginInfo : public virtual GUIOperatorPluginInfo, public virtual RebinningCutterCommonPluginInfo -{ - public: - virtual QString *GetMenuName() const; - virtual QvisPostableWindowObserver *CreatePluginWindow(int type, - AttributeSubject *attr, const QString &caption, const QString &shortName, - QvisNotepadArea *notepad); - virtual const char **XPMIconData() const; -}; - -class RebinningCutterViewerPluginInfo : public virtual ViewerOperatorPluginInfo, public virtual RebinningCutterCommonPluginInfo -{ - public: - virtual AttributeSubject *GetClientAtts(); - virtual AttributeSubject *GetDefaultAtts(); - virtual void SetClientAtts(AttributeSubject *atts); - virtual void GetClientAtts(AttributeSubject *atts); - - virtual void InitializeOperatorAtts(AttributeSubject *atts, - const ViewerPlot *plot, - const bool fromDefault); - virtual QString *GetMenuName() const; - virtual const char **XPMIconData() const; - - static void InitializeGlobalObjects(); - private: - static RebinningCutterAttributes *defaultAtts; - static RebinningCutterAttributes *clientAtts; -}; - -class RebinningCutterEnginePluginInfo : public virtual EngineOperatorPluginInfo, public virtual RebinningCutterCommonPluginInfo -{ - public: - virtual avtPluginFilter *AllocAvtPluginFilter(); -}; - -class RebinningCutterScriptingPluginInfo : public virtual ScriptingOperatorPluginInfo, public virtual RebinningCutterCommonPluginInfo -{ - public: - virtual void InitializePlugin(AttributeSubject *subj, void *data); - virtual void *GetMethodTable(int *nMethods); - virtual bool TypesMatch(void *pyobject); - virtual char *GetLogString(); - virtual void SetDefaults(const AttributeSubject *atts); -}; - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/VisITProgressAction.h b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/VisITProgressAction.h deleted file mode 100644 index 688de7cc2da..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/VisITProgressAction.h +++ /dev/null @@ -1,29 +0,0 @@ -#include "MantidVatesAPI/ProgressAction.h" - -#ifndef UPDATEHANDLER_H_ -#define UPDATEHANDLER_H_ - -class avtRebinningCutterFilter; -namespace Mantid -{ -namespace VATES -{ - -class VisITProgressAction : public ProgressAction -{ - -public: - - VisITProgressAction(avtRebinningCutterFilter* filter); - - virtual void eventRaised(int progressPercent); - -private: - - avtRebinningCutterFilter* m_filter; -}; - -} -} - -#endif /* UPDATEHANDLER_H_ */ diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/avtRebinningCutterFilter.h b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/avtRebinningCutterFilter.h deleted file mode 100644 index 0f4b438f795..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/inc/RebinningCutterOperator/avtRebinningCutterFilter.h +++ /dev/null @@ -1,149 +0,0 @@ -/***************************************************************************** - * - * Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC - * Produced at the Lawrence Livermore National Laboratory - * LLNL-CODE-442911 - * All rights reserved. - * - * This file is part of VisIt. For details, see https://visit.llnl.gov/. The - * full copyright notice is contained in the file COPYRIGHT located at the root - * of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer below. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the disclaimer (as noted below) in the - * documentation and/or other materials provided with the distribution. - * - Neither the name of the LLNS/LLNL nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, - * LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - *****************************************************************************/ - -// ************************************************************************* // -// File: avtRebinningCutterFilter.h -// ************************************************************************* // - -#ifndef AVT_RebinningCutter_FILTER_H -#define AVT_RebinningCutter_FILTER_H - -#include <vtkUnstructuredGrid.h> -#include <vtkPlane.h> -#include <avtPluginDatasetToDatasetFilter.h> -#include <avtPluginDataTreeIterator.h> -#include <RebinningCutterAttributes.h> -#include <vtkVisItClipper.h> - -#include <MantidVatesAPI/RebinningCutterPresenter.h> -#include <string.h> - -// **************************************************************************** -// Class: avtRebinningCutterFilter -// -// Purpose: -// A plugin operator for RebinningCutter. -// -// Programmer: spu92482 -- generated by xml2avt -// Creation: Fri Sep 24 18:04:29 PST 2010 -// -// **************************************************************************** - -class vtkDataSet; - -class avtRebinningCutterFilter: public avtPluginDatasetToDatasetFilter -{ - -public: - avtRebinningCutterFilter(); - virtual ~avtRebinningCutterFilter(); - - static avtFilter *Create(); - const virtual char *GetType(void) - { - return "avtRebinningCutterFilter"; - } - - const virtual char *GetDescription(void) - { - return "Rebinning Cutter"; - } - - virtual void SetAtts(const AttributeGroup*); - virtual bool Equivalent(const AttributeGroup*); - virtual void UpdateDataObjectInfo(void); - void UpdateAlgorithmProgress(int progressPercent); -protected: - RebinningCutterAttributes atts; - virtual void Execute(); - virtual avtContract_p ModifyContract(avtContract_p); - - -private: - - /// Timestep value from contract. - int m_timestep; - - /// Name to apply to the x axis - std::string xAxisName; - - /// Name to apply to the y axis - std::string yAxisName; - - /// Name to apply to the z axis - std::string zAxisName; - - /// Set up execution from input dataset values. - Mantid::VATES::Dimension_sptr getDimensionX(vtkDataSet* in_ds) const; - - Mantid::VATES::Dimension_sptr getDimensionY(vtkDataSet* in_ds) const; - - Mantid::VATES::Dimension_sptr getDimensionZ(vtkDataSet* in_ds) const; - - Mantid::VATES::Dimension_sptr getDimensiont(vtkDataSet* in_ds) const; - - /// Determine if a plane has been applied. - bool anyPlaneApplied() const; - - /// Construct a plane, which specifies rotations if the correct information is available. - boost::shared_ptr<Mantid::API::ImplicitFunction> constructPlane() const; - - /// Construct a plane, which specifies rotations if the correct information is available. - boost::shared_ptr<Mantid::API::ImplicitFunction> constructBox( - Mantid::VATES::Dimension_sptr spDimX, - Mantid::VATES::Dimension_sptr spDimY, - Mantid::VATES::Dimension_sptr spDimZ) const; - - /// Helper method. Selects the dataset factory to use. - boost::shared_ptr<Mantid::VATES::vtkDataSetFactory> createDataSetFactory(Mantid::MDDataObjects::MDWorkspace_sptr spRebinnedWs) const; - - /// Create a hash based on the attributes. - std::string createHash() const; - - /// Optimisation method. Used to determien what strategy to use to create the dataset. - Mantid::VATES::RebinningIterationAction decideIterationAction(); - - /// Executor peforms the logic associated with running rebinning operations. - Mantid::VATES::RebinningCutterPresenter m_presenter; - -}; - -// Non member helper deletion method for working with VisITs ref_void_ptr types. -void deleteTimeMarker(void* cachedMarkerVoid); - -#endif diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/DimensionWidget.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/DimensionWidget.C deleted file mode 100644 index e818a65522f..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/DimensionWidget.C +++ /dev/null @@ -1,199 +0,0 @@ -#include <QLabel> -#include <QLayout> -#include <QLineEdit> -#include <QComboBox> -#include <QPushButton> -#include <qmessagebox.h> -#include <stdio.h> -#include <string> -#include <vector> -#include <iostream> -#include "GeometryWidget.h" -#include "DimensionWidget.h" -#include "MantidGeometry/MDGeometry/IMDDimension.h" -#include <boost/algorithm/string.hpp> -#include <boost/format.hpp> -#include "MantidVatesAPI/RebinningCutterPresenter.h" - -DimensionWidget::DimensionWidget( - GeometryWidget* geometryWidget, - const std::string& name, - const int dimensionIndex, - std::vector<boost::shared_ptr<Mantid::Geometry::IMDDimension> > vecNonIntegratedDimensions ) -: - m_layout(NULL), - m_nBinsBox(NULL), - m_minBox(NULL), - m_maxBox(NULL), - m_dimensionCombo(NULL), - m_currentDimensionIndex(0), - m_name(name), - m_geometryWidget(geometryWidget), - m_vecNonIntegratedDimensions(vecNonIntegratedDimensions) -{ - constructWidget(dimensionIndex); - populateWidget(dimensionIndex); -} - -void DimensionWidget::constructWidget(const int dimensionIndex) -{ - using namespace Mantid::Geometry; - - boost::shared_ptr<IMDDimension> spDimensionToRender = m_vecNonIntegratedDimensions[dimensionIndex]; - QGridLayout* m_layout = new QGridLayout(); - - QLabel* dimensionLabel = new QLabel(); - dimensionLabel->setText(m_name.c_str()); - m_layout->addWidget(dimensionLabel, 0, 0, Qt::AlignLeft); - m_dimensionCombo = new QComboBox(); - - //Loop through non-integrated dimensions and add them to the combobox. - for(unsigned int i = 0; i < m_vecNonIntegratedDimensions.size(); i++) - { - boost::shared_ptr<Mantid::Geometry::IMDDimension> currentDimension = m_vecNonIntegratedDimensions[i]; - m_dimensionCombo->addItem( currentDimension->getName().c_str()); - if(currentDimension->getDimensionId() == spDimensionToRender->getDimensionId()) - { - m_dimensionCombo->setCurrentItem(i); - } - } - - connect(m_dimensionCombo,SIGNAL(currentIndexChanged(int)),this ,SLOT(dimensionSelectedListener())); - m_layout->addWidget(m_dimensionCombo, 0, 1, Qt::AlignLeft); - - QLabel* nBinsLabel = new QLabel(); - nBinsLabel->setText("Number of Bins"); - m_layout->addWidget(nBinsLabel, 1, 0, Qt::AlignLeft); - m_nBinsBox = new QLineEdit(); - connect(m_nBinsBox, SIGNAL(returnPressed()), this, SLOT(nBinsListener())); - m_layout->addWidget(m_nBinsBox, 1, 1, Qt::AlignLeft); - - QLabel* maxLabel = new QLabel("Maximum"); - maxLabel->setText("Maximum"); - m_layout->addWidget(maxLabel, 2, 0, Qt::AlignLeft); - m_maxBox = new QLineEdit(); - m_maxBox->setEnabled(false); - connect(m_maxBox, SIGNAL(returnPressed()), this, SLOT(maxBoxListener())); - m_layout->addWidget(m_maxBox, 2, 1, Qt::AlignLeft); - - QLabel* minLabel = new QLabel(); - minLabel->setText("Minimum"); - m_layout->addWidget(minLabel, 3, 0, Qt::AlignLeft); - m_minBox = new QLineEdit(); - m_minBox->setEnabled(false); - connect(m_minBox, SIGNAL(returnPressed()), this, SLOT(minBoxListener())); - m_layout->addWidget(m_minBox, 3, 1, Qt::AlignLeft); - - this->setLayout(m_layout); -} - -void DimensionWidget::populateWidget(const int dimensionIndex) -{ - //Essentially check that the construct method has actually been called first. - if (m_dimensionCombo != NULL) - { - using namespace Mantid::Geometry; - boost::shared_ptr<IMDDimension> spDimensionToRender = m_vecNonIntegratedDimensions[dimensionIndex]; - - m_currentDimensionIndex = dimensionIndex; - m_dimensionCombo->setCurrentIndex(dimensionIndex); - - if(m_nBinsBox->text().isEmpty()) - { - std::string nBinsString = boost::str(boost::format("%i") % spDimensionToRender->getNBins()); - m_nBinsBox->setText(nBinsString.c_str()); - } - - std::string maxValueString = boost::str(boost::format("%i") % spDimensionToRender->getMaximum()); - m_maxBox->setText(maxValueString.c_str()); - - std::string minValueString = boost::str(boost::format("%i") % spDimensionToRender->getMinimum()); - m_minBox->setText(minValueString.c_str()); - } -} - -double DimensionWidget::getMinimum() const -{ - return atof(m_minBox->text().toStdString().c_str()); -} - -double DimensionWidget::getMaximum() const -{ - return atof(m_maxBox->text().toStdString().c_str()); -} - -int DimensionWidget::getNBins() const -{ - return atoi(m_nBinsBox->text().toStdString().c_str()); -} - -int DimensionWidget::getSelectedIndex() const -{ - return m_dimensionCombo->currentIndex(); -} - -void DimensionWidget::setMinimum(double minimum) -{ - std::string minValueString = boost::str(boost::format("%i") % minimum); - m_minBox->setText(minValueString.c_str()); -} - -void DimensionWidget::setMaximum(double maximum) -{ - std::string maxValueString = boost::str(boost::format("%i") % maximum); - m_maxBox->setText(maxValueString.c_str()); -} - -boost::shared_ptr<Mantid::Geometry::IMDDimension> DimensionWidget::getDimension() const -{ - boost::shared_ptr<Mantid::Geometry::IMDDimension> originalDimension = m_vecNonIntegratedDimensions[m_currentDimensionIndex]; - //Remake the dimension with a new number of bins. Note: Would be much better to have the clone facility. - - - return Mantid::VATES::createDimension(originalDimension->toXMLString(), this->getNBins()); -} - -void DimensionWidget::dimensionSelectedListener() -{ - //Providing that the current item has not been reselected, populate/repopulate the widget with - //Dimension information from the newly selected dimension. - if (m_dimensionCombo->currentIndex() != m_currentDimensionIndex) - { - using namespace Mantid::Geometry; - - const int oldDimensionIndex = m_currentDimensionIndex; - - boost::shared_ptr<IMDDimension> spNewDimension = m_vecNonIntegratedDimensions[m_dimensionCombo->currentIndex()]; - - int dimensionIndex = m_dimensionCombo->currentIndex(); - populateWidget(dimensionIndex); - m_geometryWidget->childAppliedNewDimensionSelection(oldDimensionIndex, spNewDimension, this); - } -} - -void DimensionWidget::resetBins() -{ - int nbins = m_vecNonIntegratedDimensions[m_currentDimensionIndex]->getNBins(); - std::string nBinsString = boost::str(boost::format("%i") % nbins); - m_nBinsBox->setText(nBinsString.c_str()); -} - -void DimensionWidget::nBinsListener() -{ - -} - -void DimensionWidget::minBoxListener() -{ - -} - -void DimensionWidget::maxBoxListener() -{ - -} - -DimensionWidget::~DimensionWidget() -{ - -} diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/GeometryWidget.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/GeometryWidget.C deleted file mode 100644 index 4efe3fa85c9..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/GeometryWidget.C +++ /dev/null @@ -1,150 +0,0 @@ -#include "GeometryWidget.h" -#include "DimensionWidget.h" -#include "MantidGeometry/MDGeometry/MDGeometryDescription.h" -#include "MantidGeometry/MDGeometry/MDGeometry.h" -#include <boost/shared_ptr.hpp> -#include <map> -#include <functional> -#include <algorithm> -#include <QString> - - -using Mantid::Geometry::IMDDimension; - -//Comparitor Functor -struct DimensionCompare : public std::binary_function<boost::shared_ptr<IMDDimension>, boost::shared_ptr<IMDDimension>, bool> -{ - bool operator()(boost::shared_ptr<IMDDimension> a, boost::shared_ptr<IMDDimension> b) const - { - return a->getDimensionId() == b->getDimensionId(); - } -}; - -void GeometryWidget::validateSetup() const -{ - if(!m_isConstructed) - { - throw new std::runtime_error("Must geometry widget before doing anything else."); - } -} - -GeometryWidget::GeometryWidget() : m_isConstructed(false) -{ -} - -void GeometryWidget::constructWidget(std::vector<boost::shared_ptr<Mantid::Geometry::IMDDimension> > nonIntegratedVector) -{ - - m_nonIntegratedVector = nonIntegratedVector; - delete layout(); - - QGridLayout* layout = new QGridLayout; - if(true == m_isConstructed) //Essentially assignment operation. - { - delete m_xDimensionWidget; - delete m_yDimensionWidget; - delete m_zDimensionWidget; - } - - //Create widget to display/control the aligned x-dimension - m_xDimensionWidget = new DimensionWidget(this, "x Dimension", 0, nonIntegratedVector); - layout->addWidget(m_xDimensionWidget, 0, 0); - - //Create widget to display/control the aligned y-dimension - m_yDimensionWidget = new DimensionWidget(this, "y Dimension", 1, nonIntegratedVector); - layout->addWidget(m_yDimensionWidget, 1, 0); - - //Create widget to display/control the aligned z-dimension - m_zDimensionWidget = new DimensionWidget(this, "z Dimension", 2, nonIntegratedVector); - layout->addWidget(m_zDimensionWidget, 2, 0); - - this->setLayout(layout); - m_isConstructed = true; -} - - -QString GeometryWidget::getXDimensionXML() -{ - validateSetup(); - //Get the selected alignment for the xdimension. - return m_xDimensionWidget->getDimension()->toXMLString().c_str(); -} - -QString GeometryWidget::getYDimensionXML() const -{ - validateSetup(); - return m_yDimensionWidget->getDimension()->toXMLString().c_str(); -} - -QString GeometryWidget::getZDimensionXML() const -{ - validateSetup(); - return m_zDimensionWidget->getDimension()->toXMLString().c_str(); -} - - -GeometryWidget::~GeometryWidget() -{ -} - -void GeometryWidget::dimensionWidgetChanged() -{ - validateSetup(); - emit valueChanged(); - -} - -void GeometryWidget::resetAllBinValues() -{ - //If dimensions have been swapped, then all bins should be reset to their original values. - m_xDimensionWidget->resetBins(); - m_yDimensionWidget->resetBins(); - m_zDimensionWidget->resetBins(); -} - -void GeometryWidget::childAppliedNewDimensionSelection(const unsigned int oldDimensionIndex, - boost::shared_ptr<IMDDimension> newDimension, DimensionWidget* pDimensionWidget) -{ - validateSetup(); - //Updates all child guis with overwrite dimension. - using namespace Mantid::Geometry; - - //Comparitor - DimensionCompare areEqual; - std::binder1st<DimensionCompare> isEqualToChangedDimension(areEqual, newDimension); - - - //The new Dimension is overwriting the dimension on this widget. - //Assign the old widget the old dimension from the calling widget. - - if (isEqualToChangedDimension(m_xDimensionWidget->getDimension())) - { - if (pDimensionWidget != m_xDimensionWidget) - { - //Update the xDimensionWidget only. - m_xDimensionWidget->populateWidget(oldDimensionIndex); - } - } - - if (isEqualToChangedDimension(m_yDimensionWidget->getDimension())) - { - if (pDimensionWidget != m_yDimensionWidget) - { - //Update the yDimensionWidget only. - m_yDimensionWidget->populateWidget(oldDimensionIndex); - } - } - - if (isEqualToChangedDimension(m_zDimensionWidget->getDimension())) - { - if (pDimensionWidget != m_zDimensionWidget) - { - //Update the zDimensionWidget only. - m_zDimensionWidget->populateWidget(oldDimensionIndex); - } - } - resetAllBinValues(); - - //Raise event. - dimensionWidgetChanged(); -} diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/IntegratedDimensionWidget.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/IntegratedDimensionWidget.C deleted file mode 100644 index 9b21d873c2e..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/IntegratedDimensionWidget.C +++ /dev/null @@ -1,46 +0,0 @@ -#include <QLabel> -#include <QLayout> -#include <QLineEdit> -#include <stdio.h> -#include "IntegratedDimensionWidget.h" - -IntegratedDimensionWidget::IntegratedDimensionWidget(std::string dimensionName, double min, double max) : - QWidget() //TODO Const ptr to dimension should be passed in instead. -{ - QGridLayout* layout = new QGridLayout(); - - QLabel* titleLabel = new QLabel(dimensionName.c_str()); - layout->addWidget(titleLabel, 0, 0, 1, 2, Qt::AlignLeft); - - char buffer[255]; - sprintf(buffer, "Min = %.2f, Max = %.2f", min, max); - QLabel* minMaxLabel = new QLabel(buffer); - layout->addWidget(minMaxLabel, 1, 0, 1, 2, Qt::AlignLeft); - - QLabel* lowerLimitLabel = new QLabel("Lower Limit"); - m_LowerLimitInput = new QLineEdit; - sprintf(buffer, "%.2f", min); - m_LowerLimitInput->setText(buffer); - layout->addWidget(lowerLimitLabel, 2, 0); - layout->addWidget(m_LowerLimitInput, 2, 1); - - QLabel* upperLimitLabel = new QLabel("Upper Limit"); - m_UpperLimitInput = new QLineEdit; - sprintf(buffer, "%.2f", max); - m_UpperLimitInput->setText(buffer); - layout->addWidget(upperLimitLabel, 3, 0); - layout->addWidget(m_UpperLimitInput, 3, 1); - - setLayout(layout); -} - -double IntegratedDimensionWidget::getUpperLimit() const -{ - return atof(m_UpperLimitInput->text().toStdString().c_str()); -} - -double IntegratedDimensionWidget::getLowerLimit() const -{ - return atof(m_LowerLimitInput->text().toStdString().c_str()); -} - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/PyRebinningCutter.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/PyRebinningCutter.C deleted file mode 100644 index 427b2ee3764..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/PyRebinningCutter.C +++ /dev/null @@ -1,555 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#include <PyRebinningCutter.h> -#include <ObserverToCallback.h> -#include <stdio.h> -#include <snprintf.h> - -// **************************************************************************** -// Module: PyRebinningCutter -// -// Purpose: -// -// -// Note: Autogenerated by xml2python. Do not modify by hand! -// -// Programmer: xml2python -// Creation: omitted -// -// **************************************************************************** - -// -// This struct contains the Python type information and a RebinningCutter. -// -struct RebinningCutterObject -{ - PyObject_HEAD - RebinningCutter *data; - bool owns; - PyObject *parent; -}; - -// -// Internal prototypes -// -static PyObject *NewRebinningCutter(int); - -std::string -PyRebinningCutter_ToString(const RebinningCutter *atts, const char *prefix) -{ - std::string str; - char tmpStr[1000]; - - { const doubleVector &origin = atts->GetOrigin(); - SNPRINTF(tmpStr, 1000, "%sorigin = (", prefix); - str += tmpStr; - for(size_t i = 0; i < origin.size(); ++i) - { - SNPRINTF(tmpStr, 1000, "%g", origin[i]); - str += tmpStr; - if(i < origin.size() - 1) - { - SNPRINTF(tmpStr, 1000, ", "); - str += tmpStr; - } - } - SNPRINTF(tmpStr, 1000, ")\n"); - str += tmpStr; - } - { const doubleVector &normal = atts->GetNormal(); - SNPRINTF(tmpStr, 1000, "%snormal = (", prefix); - str += tmpStr; - for(size_t i = 0; i < normal.size(); ++i) - { - SNPRINTF(tmpStr, 1000, "%g", normal[i]); - str += tmpStr; - if(i < normal.size() - 1) - { - SNPRINTF(tmpStr, 1000, ", "); - str += tmpStr; - } - } - SNPRINTF(tmpStr, 1000, ")\n"); - str += tmpStr; - } - return str; -} - -static PyObject * -RebinningCutter_Notify(PyObject *self, PyObject *args) -{ - RebinningCutterObject *obj = (RebinningCutterObject *)self; - obj->data->Notify(); - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutter_SetOrigin(PyObject *self, PyObject *args) -{ - RebinningCutterObject *obj = (RebinningCutterObject *)self; - - doubleVector &vec = obj->data->GetOrigin(); - PyObject *tuple; - if(!PyArg_ParseTuple(args, "O", &tuple)) - return NULL; - - if(PyTuple_Check(tuple)) - { - vec.resize(PyTuple_Size(tuple)); - for(int i = 0; i < PyTuple_Size(tuple); ++i) - { - PyObject *item = PyTuple_GET_ITEM(tuple, i); - if(PyFloat_Check(item)) - vec[i] = PyFloat_AS_DOUBLE(item); - else if(PyInt_Check(item)) - vec[i] = double(PyInt_AS_LONG(item)); - else if(PyLong_Check(item)) - vec[i] = PyLong_AsDouble(item); - else - vec[i] = 0.; - } - } - else if(PyFloat_Check(tuple)) - { - vec.resize(1); - vec[0] = PyFloat_AS_DOUBLE(tuple); - } - else if(PyInt_Check(tuple)) - { - vec.resize(1); - vec[0] = double(PyInt_AS_LONG(tuple)); - } - else if(PyLong_Check(tuple)) - { - vec.resize(1); - vec[0] = PyLong_AsDouble(tuple); - } - else - return NULL; - - // Mark the origin in the object as modified. - obj->data->SelectOrigin(); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutter_GetOrigin(PyObject *self, PyObject *args) -{ - RebinningCutterObject *obj = (RebinningCutterObject *)self; - // Allocate a tuple the with enough entries to hold the origin. - const doubleVector &origin = obj->data->GetOrigin(); - PyObject *retval = PyTuple_New(origin.size()); - for(size_t i = 0; i < origin.size(); ++i) - PyTuple_SET_ITEM(retval, i, PyFloat_FromDouble(origin[i])); - return retval; -} - -/*static*/ PyObject * -RebinningCutter_SetNormal(PyObject *self, PyObject *args) -{ - RebinningCutterObject *obj = (RebinningCutterObject *)self; - - doubleVector &vec = obj->data->GetNormal(); - PyObject *tuple; - if(!PyArg_ParseTuple(args, "O", &tuple)) - return NULL; - - if(PyTuple_Check(tuple)) - { - vec.resize(PyTuple_Size(tuple)); - for(int i = 0; i < PyTuple_Size(tuple); ++i) - { - PyObject *item = PyTuple_GET_ITEM(tuple, i); - if(PyFloat_Check(item)) - vec[i] = PyFloat_AS_DOUBLE(item); - else if(PyInt_Check(item)) - vec[i] = double(PyInt_AS_LONG(item)); - else if(PyLong_Check(item)) - vec[i] = PyLong_AsDouble(item); - else - vec[i] = 0.; - } - } - else if(PyFloat_Check(tuple)) - { - vec.resize(1); - vec[0] = PyFloat_AS_DOUBLE(tuple); - } - else if(PyInt_Check(tuple)) - { - vec.resize(1); - vec[0] = double(PyInt_AS_LONG(tuple)); - } - else if(PyLong_Check(tuple)) - { - vec.resize(1); - vec[0] = PyLong_AsDouble(tuple); - } - else - return NULL; - - // Mark the normal in the object as modified. - obj->data->SelectNormal(); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutter_GetNormal(PyObject *self, PyObject *args) -{ - RebinningCutterObject *obj = (RebinningCutterObject *)self; - // Allocate a tuple the with enough entries to hold the normal. - const doubleVector &normal = obj->data->GetNormal(); - PyObject *retval = PyTuple_New(normal.size()); - for(size_t i = 0; i < normal.size(); ++i) - PyTuple_SET_ITEM(retval, i, PyFloat_FromDouble(normal[i])); - return retval; -} - - - -PyMethodDef PyRebinningCutter_methods[REBINNINGCUTTER_NMETH] = { - {"Notify", RebinningCutter_Notify, METH_VARARGS}, - {"SetOrigin", RebinningCutter_SetOrigin, METH_VARARGS}, - {"GetOrigin", RebinningCutter_GetOrigin, METH_VARARGS}, - {"SetNormal", RebinningCutter_SetNormal, METH_VARARGS}, - {"GetNormal", RebinningCutter_GetNormal, METH_VARARGS}, - {NULL, NULL} -}; - -// -// Type functions -// - -static void -RebinningCutter_dealloc(PyObject *v) -{ - RebinningCutterObject *obj = (RebinningCutterObject *)v; - if(obj->parent != 0) - Py_DECREF(obj->parent); - if(obj->owns) - delete obj->data; -} - -static int -RebinningCutter_compare(PyObject *v, PyObject *w) -{ - RebinningCutter *a = ((RebinningCutterObject *)v)->data; - RebinningCutter *b = ((RebinningCutterObject *)w)->data; - return (*a == *b) ? 0 : -1; -} - -PyObject * -PyRebinningCutter_getattr(PyObject *self, char *name) -{ - if(strcmp(name, "origin") == 0) - return RebinningCutter_GetOrigin(self, NULL); - if(strcmp(name, "normal") == 0) - return RebinningCutter_GetNormal(self, NULL); - - return Py_FindMethod(PyRebinningCutter_methods, self, name); -} - -int -PyRebinningCutter_setattr(PyObject *self, char *name, PyObject *args) -{ - // Create a tuple to contain the arguments since all of the Set - // functions expect a tuple. - PyObject *tuple = PyTuple_New(1); - PyTuple_SET_ITEM(tuple, 0, args); - Py_INCREF(args); - PyObject *obj = NULL; - - if(strcmp(name, "origin") == 0) - obj = RebinningCutter_SetOrigin(self, tuple); - else if(strcmp(name, "normal") == 0) - obj = RebinningCutter_SetNormal(self, tuple); - - if(obj != NULL) - Py_DECREF(obj); - - Py_DECREF(tuple); - if( obj == NULL) - PyErr_Format(PyExc_RuntimeError, "Unable to set unknown attribute: '%s'", name); - return (obj != NULL) ? 0 : -1; -} - -static int -RebinningCutter_print(PyObject *v, FILE *fp, int flags) -{ - RebinningCutterObject *obj = (RebinningCutterObject *)v; - fprintf(fp, "%s", PyRebinningCutter_ToString(obj->data, "").c_str()); - return 0; -} - -PyObject * -RebinningCutter_str(PyObject *v) -{ - RebinningCutterObject *obj = (RebinningCutterObject *)v; - return PyString_FromString(PyRebinningCutter_ToString(obj->data,"").c_str()); -} - -// -// The doc string for the class. -// -#if PY_MAJOR_VERSION > 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 5) -static const char *RebinningCutter_Purpose = ""; -#else -static char *RebinningCutter_Purpose = ""; -#endif - -// -// The type description structure -// -static PyTypeObject RebinningCutterType = -{ - // - // Type header - // - PyObject_HEAD_INIT(&PyType_Type) - 0, // ob_size - "RebinningCutter", // tp_name - sizeof(RebinningCutterObject), // tp_basicsize - 0, // tp_itemsize - // - // Standard methods - // - (destructor)RebinningCutter_dealloc, // tp_dealloc - (printfunc)RebinningCutter_print, // tp_print - (getattrfunc)PyRebinningCutter_getattr, // tp_getattr - (setattrfunc)PyRebinningCutter_setattr, // tp_setattr - (cmpfunc)RebinningCutter_compare, // tp_compare - (reprfunc)0, // tp_repr - // - // Type categories - // - 0, // tp_as_number - 0, // tp_as_sequence - 0, // tp_as_mapping - // - // More methods - // - 0, // tp_hash - 0, // tp_call - (reprfunc)RebinningCutter_str, // tp_str - 0, // tp_getattro - 0, // tp_setattro - 0, // tp_as_buffer - Py_TPFLAGS_CHECKTYPES, // tp_flags - RebinningCutter_Purpose, // tp_doc - 0, // tp_traverse - 0, // tp_clear - 0, // tp_richcompare - 0 // tp_weaklistoffset -}; - -// -// Helper functions for object allocation. -// - -static RebinningCutter *defaultAtts = 0; -static RebinningCutter *currentAtts = 0; - -static PyObject * -NewRebinningCutter(int useCurrent) -{ - RebinningCutterObject *newObject; - newObject = PyObject_NEW(RebinningCutterObject, &RebinningCutterType); - if(newObject == NULL) - return NULL; - if(useCurrent && currentAtts != 0) - newObject->data = new RebinningCutter(*currentAtts); - else if(defaultAtts != 0) - newObject->data = new RebinningCutter(*defaultAtts); - else - newObject->data = new RebinningCutter; - newObject->owns = true; - newObject->parent = 0; - return (PyObject *)newObject; -} - -static PyObject * -WrapRebinningCutter(const RebinningCutter *attr) -{ - RebinningCutterObject *newObject; - newObject = PyObject_NEW(RebinningCutterObject, &RebinningCutterType); - if(newObject == NULL) - return NULL; - newObject->data = (RebinningCutter *)attr; - newObject->owns = false; - newObject->parent = 0; - return (PyObject *)newObject; -} - -/////////////////////////////////////////////////////////////////////////////// -// -// Interface that is exposed to the VisIt module. -// -/////////////////////////////////////////////////////////////////////////////// - -PyObject * -RebinningCutter_new(PyObject *self, PyObject *args) -{ - int useCurrent = 0; - if (!PyArg_ParseTuple(args, "i", &useCurrent)) - { - if (!PyArg_ParseTuple(args, "")) - return NULL; - else - PyErr_Clear(); - } - - return (PyObject *)NewRebinningCutter(useCurrent); -} - -// -// Plugin method table. These methods are added to the visitmodule's methods. -// -static PyMethodDef RebinningCutterMethods[] = { - {"RebinningCutter", RebinningCutter_new, METH_VARARGS}, - {NULL, NULL} /* Sentinel */ -}; - -static Observer *RebinningCutterObserver = 0; - -std::string -PyRebinningCutter_GetLogString() -{ - std::string s("RebinningCutter = RebinningCutter()\n"); - if(currentAtts != 0) - s += PyRebinningCutter_ToString(currentAtts, "RebinningCutter."); - return s; -} - -static void -PyRebinningCutter_CallLogRoutine(Subject *subj, void *data) -{ - RebinningCutter *atts = (RebinningCutter *)subj; - typedef void (*logCallback)(const std::string &); - logCallback cb = (logCallback)data; - - if(cb != 0) - { - std::string s("RebinningCutter = RebinningCutter()\n"); - s += PyRebinningCutter_ToString(currentAtts, "RebinningCutter."); - cb(s); - } -} - -void -PyRebinningCutter_StartUp(RebinningCutter *subj, void *data) -{ - if(subj == 0) - return; - - currentAtts = subj; - PyRebinningCutter_SetDefaults(subj); - - // - // Create the observer that will be notified when the attributes change. - // - if(RebinningCutterObserver == 0) - { - RebinningCutterObserver = new ObserverToCallback(subj, - PyRebinningCutter_CallLogRoutine, (void *)data); - } - -} - -void -PyRebinningCutter_CloseDown() -{ - delete defaultAtts; - defaultAtts = 0; - delete RebinningCutterObserver; - RebinningCutterObserver = 0; -} - -PyMethodDef * -PyRebinningCutter_GetMethodTable(int *nMethods) -{ - *nMethods = 1; - return RebinningCutterMethods; -} - -bool -PyRebinningCutter_Check(PyObject *obj) -{ - return (obj->ob_type == &RebinningCutterType); -} - -RebinningCutter * -PyRebinningCutter_FromPyObject(PyObject *obj) -{ - RebinningCutterObject *obj2 = (RebinningCutterObject *)obj; - return obj2->data; -} - -PyObject * -PyRebinningCutter_New() -{ - return NewRebinningCutter(0); -} - -PyObject * -PyRebinningCutter_Wrap(const RebinningCutter *attr) -{ - return WrapRebinningCutter(attr); -} - -void -PyRebinningCutter_SetParent(PyObject *obj, PyObject *parent) -{ - RebinningCutterObject *obj2 = (RebinningCutterObject *)obj; - obj2->parent = parent; -} - -void -PyRebinningCutter_SetDefaults(const RebinningCutter *atts) -{ - if(defaultAtts) - delete defaultAtts; - - defaultAtts = new RebinningCutter(*atts); -} - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/PyRebinningCutterAttributes.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/PyRebinningCutterAttributes.C deleted file mode 100644 index d6e865f67e5..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/PyRebinningCutterAttributes.C +++ /dev/null @@ -1,1073 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#include <PyRebinningCutterAttributes.h> -#include <ObserverToCallback.h> -#include <stdio.h> -#include <snprintf.h> - -// **************************************************************************** -// Module: PyRebinningCutterAttributes -// -// Purpose: -// Attributes for the Rebinning Cutter -// -// Note: Autogenerated by xml2python. Do not modify by hand! -// -// Programmer: xml2python -// Creation: omitted -// -// **************************************************************************** - -// -// This struct contains the Python type information and a RebinningCutterAttributes. -// -struct RebinningCutterAttributesObject -{ - PyObject_HEAD - RebinningCutterAttributes *data; - bool owns; - PyObject *parent; -}; - -// -// Internal prototypes -// -static PyObject *NewRebinningCutterAttributes(int); - -std::string -PyRebinningCutterAttributes_ToString(const RebinningCutterAttributes *atts, const char *prefix) -{ - std::string str; - char tmpStr[1000]; - - SNPRINTF(tmpStr, 1000, "%soriginX = %g\n", prefix, atts->GetOriginX()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%soriginY = %g\n", prefix, atts->GetOriginY()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%soriginZ = %g\n", prefix, atts->GetOriginZ()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%snormalX = %g\n", prefix, atts->GetNormalX()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%snormalY = %g\n", prefix, atts->GetNormalY()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%snormalZ = %g\n", prefix, atts->GetNormalZ()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%swidth = %g\n", prefix, atts->GetWidth()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%sheight = %g\n", prefix, atts->GetHeight()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%sdepth = %g\n", prefix, atts->GetDepth()); - str += tmpStr; - if(atts->GetStructured()) - SNPRINTF(tmpStr, 1000, "%sstructured = 1\n", prefix); - else - SNPRINTF(tmpStr, 1000, "%sstructured = 0\n", prefix); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%sxDimensionXML = \"%s\"\n", prefix, atts->GetXDimensionXML().c_str()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%syDimensionXML = %d\n", prefix, atts->GetYDimensionXML()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%szDimensionXML = %d\n", prefix, atts->GetZDimensionXML()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%stDimensionXML = %d\n", prefix, atts->GetTDimensionXML()); - str += tmpStr; - if(atts->GetIsSetUp()) - SNPRINTF(tmpStr, 1000, "%sisSetUp = 1\n", prefix); - else - SNPRINTF(tmpStr, 1000, "%sisSetUp = 0\n", prefix); - str += tmpStr; - { const stringVector &dimensionXML = atts->GetDimensionXML(); - SNPRINTF(tmpStr, 1000, "%sdimensionXML = (", prefix); - str += tmpStr; - for(size_t i = 0; i < dimensionXML.size(); ++i) - { - SNPRINTF(tmpStr, 1000, "\"%s\"", dimensionXML[i].c_str()); - str += tmpStr; - if(i < dimensionXML.size() - 1) - { - SNPRINTF(tmpStr, 1000, ", "); - str += tmpStr; - } - } - SNPRINTF(tmpStr, 1000, ")\n"); - str += tmpStr; - } - SNPRINTF(tmpStr, 1000, "%supX = %g\n", prefix, atts->GetUpX()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%supY = %g\n", prefix, atts->GetUpY()); - str += tmpStr; - SNPRINTF(tmpStr, 1000, "%supZ = %g\n", prefix, atts->GetUpZ()); - str += tmpStr; - if(atts->GetIsDirty()) - SNPRINTF(tmpStr, 1000, "%sisDirty = 1\n", prefix); - else - SNPRINTF(tmpStr, 1000, "%sisDirty = 0\n", prefix); - str += tmpStr; - return str; -} - -static PyObject * -RebinningCutterAttributes_Notify(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - obj->data->Notify(); - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetOriginX(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the originX in the object. - obj->data->SetOriginX(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetOriginX(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetOriginX()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetOriginY(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the originY in the object. - obj->data->SetOriginY(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetOriginY(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetOriginY()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetOriginZ(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the originZ in the object. - obj->data->SetOriginZ(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetOriginZ(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetOriginZ()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetNormalX(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the normalX in the object. - obj->data->SetNormalX(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetNormalX(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetNormalX()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetNormalY(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the normalY in the object. - obj->data->SetNormalY(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetNormalY(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetNormalY()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetNormalZ(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the normalZ in the object. - obj->data->SetNormalZ(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetNormalZ(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetNormalZ()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetWidth(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the width in the object. - obj->data->SetWidth(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetWidth(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetWidth()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetHeight(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the height in the object. - obj->data->SetHeight(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetHeight(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetHeight()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetDepth(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the depth in the object. - obj->data->SetDepth(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetDepth(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetDepth()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetStructured(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - int ival; - if(!PyArg_ParseTuple(args, "i", &ival)) - return NULL; - - // Set the structured in the object. - obj->data->SetStructured(ival != 0); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetStructured(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyInt_FromLong(obj->data->GetStructured()?1L:0L); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetXDimensionXML(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - char *str; - if(!PyArg_ParseTuple(args, "s", &str)) - return NULL; - - // Set the xDimensionXML in the object. - obj->data->SetXDimensionXML(std::string(str)); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetXDimensionXML(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyString_FromString(obj->data->GetXDimensionXML().c_str()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetYDimensionXML(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - int ival; - if(!PyArg_ParseTuple(args, "i", &ival)) - return NULL; - - // Set the yDimensionXML in the object. - obj->data->SetYDimensionXML((int)ival); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetYDimensionXML(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyInt_FromLong(long(obj->data->GetYDimensionXML())); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetZDimensionXML(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - int ival; - if(!PyArg_ParseTuple(args, "i", &ival)) - return NULL; - - // Set the zDimensionXML in the object. - obj->data->SetZDimensionXML((int)ival); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetZDimensionXML(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyInt_FromLong(long(obj->data->GetZDimensionXML())); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetTDimensionXML(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - int ival; - if(!PyArg_ParseTuple(args, "i", &ival)) - return NULL; - - // Set the tDimensionXML in the object. - obj->data->SetTDimensionXML((int)ival); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetTDimensionXML(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyInt_FromLong(long(obj->data->GetTDimensionXML())); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetIsSetUp(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - int ival; - if(!PyArg_ParseTuple(args, "i", &ival)) - return NULL; - - // Set the isSetUp in the object. - obj->data->SetIsSetUp(ival != 0); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetIsSetUp(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyInt_FromLong(obj->data->GetIsSetUp()?1L:0L); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetDimensionXML(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - stringVector &vec = obj->data->GetDimensionXML(); - PyObject *tuple; - if(!PyArg_ParseTuple(args, "O", &tuple)) - return NULL; - - if(PyTuple_Check(tuple)) - { - vec.resize(PyTuple_Size(tuple)); - for(int i = 0; i < PyTuple_Size(tuple); ++i) - { - PyObject *item = PyTuple_GET_ITEM(tuple, i); - if(PyString_Check(item)) - vec[i] = std::string(PyString_AS_STRING(item)); - else - vec[i] = std::string(""); - } - } - else if(PyString_Check(tuple)) - { - vec.resize(1); - vec[0] = std::string(PyString_AS_STRING(tuple)); - } - else - return NULL; - - // Mark the dimensionXML in the object as modified. - obj->data->SelectDimensionXML(); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetDimensionXML(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - // Allocate a tuple the with enough entries to hold the dimensionXML. - const stringVector &dimensionXML = obj->data->GetDimensionXML(); - PyObject *retval = PyTuple_New(dimensionXML.size()); - for(size_t i = 0; i < dimensionXML.size(); ++i) - PyTuple_SET_ITEM(retval, i, PyString_FromString(dimensionXML[i].c_str())); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetUpX(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the upX in the object. - obj->data->SetUpX(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetUpX(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetUpX()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetUpY(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the upY in the object. - obj->data->SetUpY(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetUpY(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetUpY()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetUpZ(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - double dval; - if(!PyArg_ParseTuple(args, "d", &dval)) - return NULL; - - // Set the upZ in the object. - obj->data->SetUpZ(dval); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetUpZ(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyFloat_FromDouble(obj->data->GetUpZ()); - return retval; -} - -/*static*/ PyObject * -RebinningCutterAttributes_SetIsDirty(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - - int ival; - if(!PyArg_ParseTuple(args, "i", &ival)) - return NULL; - - // Set the isDirty in the object. - obj->data->SetIsDirty(ival != 0); - - Py_INCREF(Py_None); - return Py_None; -} - -/*static*/ PyObject * -RebinningCutterAttributes_GetIsDirty(PyObject *self, PyObject *args) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)self; - PyObject *retval = PyInt_FromLong(obj->data->GetIsDirty()?1L:0L); - return retval; -} - - - -PyMethodDef PyRebinningCutterAttributes_methods[REBINNINGCUTTERATTRIBUTES_NMETH] = { - {"Notify", RebinningCutterAttributes_Notify, METH_VARARGS}, - {"SetOriginX", RebinningCutterAttributes_SetOriginX, METH_VARARGS}, - {"GetOriginX", RebinningCutterAttributes_GetOriginX, METH_VARARGS}, - {"SetOriginY", RebinningCutterAttributes_SetOriginY, METH_VARARGS}, - {"GetOriginY", RebinningCutterAttributes_GetOriginY, METH_VARARGS}, - {"SetOriginZ", RebinningCutterAttributes_SetOriginZ, METH_VARARGS}, - {"GetOriginZ", RebinningCutterAttributes_GetOriginZ, METH_VARARGS}, - {"SetNormalX", RebinningCutterAttributes_SetNormalX, METH_VARARGS}, - {"GetNormalX", RebinningCutterAttributes_GetNormalX, METH_VARARGS}, - {"SetNormalY", RebinningCutterAttributes_SetNormalY, METH_VARARGS}, - {"GetNormalY", RebinningCutterAttributes_GetNormalY, METH_VARARGS}, - {"SetNormalZ", RebinningCutterAttributes_SetNormalZ, METH_VARARGS}, - {"GetNormalZ", RebinningCutterAttributes_GetNormalZ, METH_VARARGS}, - {"SetWidth", RebinningCutterAttributes_SetWidth, METH_VARARGS}, - {"GetWidth", RebinningCutterAttributes_GetWidth, METH_VARARGS}, - {"SetHeight", RebinningCutterAttributes_SetHeight, METH_VARARGS}, - {"GetHeight", RebinningCutterAttributes_GetHeight, METH_VARARGS}, - {"SetDepth", RebinningCutterAttributes_SetDepth, METH_VARARGS}, - {"GetDepth", RebinningCutterAttributes_GetDepth, METH_VARARGS}, - {"SetStructured", RebinningCutterAttributes_SetStructured, METH_VARARGS}, - {"GetStructured", RebinningCutterAttributes_GetStructured, METH_VARARGS}, - {"SetXDimensionXML", RebinningCutterAttributes_SetXDimensionXML, METH_VARARGS}, - {"GetXDimensionXML", RebinningCutterAttributes_GetXDimensionXML, METH_VARARGS}, - {"SetYDimensionXML", RebinningCutterAttributes_SetYDimensionXML, METH_VARARGS}, - {"GetYDimensionXML", RebinningCutterAttributes_GetYDimensionXML, METH_VARARGS}, - {"SetZDimensionXML", RebinningCutterAttributes_SetZDimensionXML, METH_VARARGS}, - {"GetZDimensionXML", RebinningCutterAttributes_GetZDimensionXML, METH_VARARGS}, - {"SetTDimensionXML", RebinningCutterAttributes_SetTDimensionXML, METH_VARARGS}, - {"GetTDimensionXML", RebinningCutterAttributes_GetTDimensionXML, METH_VARARGS}, - {"SetIsSetUp", RebinningCutterAttributes_SetIsSetUp, METH_VARARGS}, - {"GetIsSetUp", RebinningCutterAttributes_GetIsSetUp, METH_VARARGS}, - {"SetDimensionXML", RebinningCutterAttributes_SetDimensionXML, METH_VARARGS}, - {"GetDimensionXML", RebinningCutterAttributes_GetDimensionXML, METH_VARARGS}, - {"SetUpX", RebinningCutterAttributes_SetUpX, METH_VARARGS}, - {"GetUpX", RebinningCutterAttributes_GetUpX, METH_VARARGS}, - {"SetUpY", RebinningCutterAttributes_SetUpY, METH_VARARGS}, - {"GetUpY", RebinningCutterAttributes_GetUpY, METH_VARARGS}, - {"SetUpZ", RebinningCutterAttributes_SetUpZ, METH_VARARGS}, - {"GetUpZ", RebinningCutterAttributes_GetUpZ, METH_VARARGS}, - {"SetIsDirty", RebinningCutterAttributes_SetIsDirty, METH_VARARGS}, - {"GetIsDirty", RebinningCutterAttributes_GetIsDirty, METH_VARARGS}, - {NULL, NULL} -}; - -// -// Type functions -// - -static void -RebinningCutterAttributes_dealloc(PyObject *v) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)v; - if(obj->parent != 0) - Py_DECREF(obj->parent); - if(obj->owns) - delete obj->data; -} - -static int -RebinningCutterAttributes_compare(PyObject *v, PyObject *w) -{ - RebinningCutterAttributes *a = ((RebinningCutterAttributesObject *)v)->data; - RebinningCutterAttributes *b = ((RebinningCutterAttributesObject *)w)->data; - return (*a == *b) ? 0 : -1; -} - -PyObject * -PyRebinningCutterAttributes_getattr(PyObject *self, char *name) -{ - if(strcmp(name, "originX") == 0) - return RebinningCutterAttributes_GetOriginX(self, NULL); - if(strcmp(name, "originY") == 0) - return RebinningCutterAttributes_GetOriginY(self, NULL); - if(strcmp(name, "originZ") == 0) - return RebinningCutterAttributes_GetOriginZ(self, NULL); - if(strcmp(name, "normalX") == 0) - return RebinningCutterAttributes_GetNormalX(self, NULL); - if(strcmp(name, "normalY") == 0) - return RebinningCutterAttributes_GetNormalY(self, NULL); - if(strcmp(name, "normalZ") == 0) - return RebinningCutterAttributes_GetNormalZ(self, NULL); - if(strcmp(name, "width") == 0) - return RebinningCutterAttributes_GetWidth(self, NULL); - if(strcmp(name, "height") == 0) - return RebinningCutterAttributes_GetHeight(self, NULL); - if(strcmp(name, "depth") == 0) - return RebinningCutterAttributes_GetDepth(self, NULL); - if(strcmp(name, "structured") == 0) - return RebinningCutterAttributes_GetStructured(self, NULL); - if(strcmp(name, "xDimensionXML") == 0) - return RebinningCutterAttributes_GetXDimensionXML(self, NULL); - if(strcmp(name, "yDimensionXML") == 0) - return RebinningCutterAttributes_GetYDimensionXML(self, NULL); - if(strcmp(name, "zDimensionXML") == 0) - return RebinningCutterAttributes_GetZDimensionXML(self, NULL); - if(strcmp(name, "tDimensionXML") == 0) - return RebinningCutterAttributes_GetTDimensionXML(self, NULL); - if(strcmp(name, "isSetUp") == 0) - return RebinningCutterAttributes_GetIsSetUp(self, NULL); - if(strcmp(name, "dimensionXML") == 0) - return RebinningCutterAttributes_GetDimensionXML(self, NULL); - if(strcmp(name, "upX") == 0) - return RebinningCutterAttributes_GetUpX(self, NULL); - if(strcmp(name, "upY") == 0) - return RebinningCutterAttributes_GetUpY(self, NULL); - if(strcmp(name, "upZ") == 0) - return RebinningCutterAttributes_GetUpZ(self, NULL); - if(strcmp(name, "isDirty") == 0) - return RebinningCutterAttributes_GetIsDirty(self, NULL); - - return Py_FindMethod(PyRebinningCutterAttributes_methods, self, name); -} - -int -PyRebinningCutterAttributes_setattr(PyObject *self, char *name, PyObject *args) -{ - // Create a tuple to contain the arguments since all of the Set - // functions expect a tuple. - PyObject *tuple = PyTuple_New(1); - PyTuple_SET_ITEM(tuple, 0, args); - Py_INCREF(args); - PyObject *obj = NULL; - - if(strcmp(name, "originX") == 0) - obj = RebinningCutterAttributes_SetOriginX(self, tuple); - else if(strcmp(name, "originY") == 0) - obj = RebinningCutterAttributes_SetOriginY(self, tuple); - else if(strcmp(name, "originZ") == 0) - obj = RebinningCutterAttributes_SetOriginZ(self, tuple); - else if(strcmp(name, "normalX") == 0) - obj = RebinningCutterAttributes_SetNormalX(self, tuple); - else if(strcmp(name, "normalY") == 0) - obj = RebinningCutterAttributes_SetNormalY(self, tuple); - else if(strcmp(name, "normalZ") == 0) - obj = RebinningCutterAttributes_SetNormalZ(self, tuple); - else if(strcmp(name, "width") == 0) - obj = RebinningCutterAttributes_SetWidth(self, tuple); - else if(strcmp(name, "height") == 0) - obj = RebinningCutterAttributes_SetHeight(self, tuple); - else if(strcmp(name, "depth") == 0) - obj = RebinningCutterAttributes_SetDepth(self, tuple); - else if(strcmp(name, "structured") == 0) - obj = RebinningCutterAttributes_SetStructured(self, tuple); - else if(strcmp(name, "xDimensionXML") == 0) - obj = RebinningCutterAttributes_SetXDimensionXML(self, tuple); - else if(strcmp(name, "yDimensionXML") == 0) - obj = RebinningCutterAttributes_SetYDimensionXML(self, tuple); - else if(strcmp(name, "zDimensionXML") == 0) - obj = RebinningCutterAttributes_SetZDimensionXML(self, tuple); - else if(strcmp(name, "tDimensionXML") == 0) - obj = RebinningCutterAttributes_SetTDimensionXML(self, tuple); - else if(strcmp(name, "isSetUp") == 0) - obj = RebinningCutterAttributes_SetIsSetUp(self, tuple); - else if(strcmp(name, "dimensionXML") == 0) - obj = RebinningCutterAttributes_SetDimensionXML(self, tuple); - else if(strcmp(name, "upX") == 0) - obj = RebinningCutterAttributes_SetUpX(self, tuple); - else if(strcmp(name, "upY") == 0) - obj = RebinningCutterAttributes_SetUpY(self, tuple); - else if(strcmp(name, "upZ") == 0) - obj = RebinningCutterAttributes_SetUpZ(self, tuple); - else if(strcmp(name, "isDirty") == 0) - obj = RebinningCutterAttributes_SetIsDirty(self, tuple); - - if(obj != NULL) - Py_DECREF(obj); - - Py_DECREF(tuple); - if( obj == NULL) - PyErr_Format(PyExc_RuntimeError, "Unable to set unknown attribute: '%s'", name); - return (obj != NULL) ? 0 : -1; -} - -static int -RebinningCutterAttributes_print(PyObject *v, FILE *fp, int flags) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)v; - fprintf(fp, "%s", PyRebinningCutterAttributes_ToString(obj->data, "").c_str()); - return 0; -} - -PyObject * -RebinningCutterAttributes_str(PyObject *v) -{ - RebinningCutterAttributesObject *obj = (RebinningCutterAttributesObject *)v; - return PyString_FromString(PyRebinningCutterAttributes_ToString(obj->data,"").c_str()); -} - -// -// The doc string for the class. -// -#if PY_MAJOR_VERSION > 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 5) -static const char *RebinningCutterAttributes_Purpose = "Attributes for the Rebinning Cutter"; -#else -static char *RebinningCutterAttributes_Purpose = "Attributes for the Rebinning Cutter"; -#endif - -// -// The type description structure -// -static PyTypeObject RebinningCutterAttributesType = -{ - // - // Type header - // - PyObject_HEAD_INIT(&PyType_Type) - 0, // ob_size - "RebinningCutterAttributes", // tp_name - sizeof(RebinningCutterAttributesObject), // tp_basicsize - 0, // tp_itemsize - // - // Standard methods - // - (destructor)RebinningCutterAttributes_dealloc, // tp_dealloc - (printfunc)RebinningCutterAttributes_print, // tp_print - (getattrfunc)PyRebinningCutterAttributes_getattr, // tp_getattr - (setattrfunc)PyRebinningCutterAttributes_setattr, // tp_setattr - (cmpfunc)RebinningCutterAttributes_compare, // tp_compare - (reprfunc)0, // tp_repr - // - // Type categories - // - 0, // tp_as_number - 0, // tp_as_sequence - 0, // tp_as_mapping - // - // More methods - // - 0, // tp_hash - 0, // tp_call - (reprfunc)RebinningCutterAttributes_str, // tp_str - 0, // tp_getattro - 0, // tp_setattro - 0, // tp_as_buffer - Py_TPFLAGS_CHECKTYPES, // tp_flags - RebinningCutterAttributes_Purpose, // tp_doc - 0, // tp_traverse - 0, // tp_clear - 0, // tp_richcompare - 0 // tp_weaklistoffset -}; - -// -// Helper functions for object allocation. -// - -static RebinningCutterAttributes *defaultAtts = 0; -static RebinningCutterAttributes *currentAtts = 0; - -static PyObject * -NewRebinningCutterAttributes(int useCurrent) -{ - RebinningCutterAttributesObject *newObject; - newObject = PyObject_NEW(RebinningCutterAttributesObject, &RebinningCutterAttributesType); - if(newObject == NULL) - return NULL; - if(useCurrent && currentAtts != 0) - newObject->data = new RebinningCutterAttributes(*currentAtts); - else if(defaultAtts != 0) - newObject->data = new RebinningCutterAttributes(*defaultAtts); - else - newObject->data = new RebinningCutterAttributes; - newObject->owns = true; - newObject->parent = 0; - return (PyObject *)newObject; -} - -static PyObject * -WrapRebinningCutterAttributes(const RebinningCutterAttributes *attr) -{ - RebinningCutterAttributesObject *newObject; - newObject = PyObject_NEW(RebinningCutterAttributesObject, &RebinningCutterAttributesType); - if(newObject == NULL) - return NULL; - newObject->data = (RebinningCutterAttributes *)attr; - newObject->owns = false; - newObject->parent = 0; - return (PyObject *)newObject; -} - -/////////////////////////////////////////////////////////////////////////////// -// -// Interface that is exposed to the VisIt module. -// -/////////////////////////////////////////////////////////////////////////////// - -PyObject * -RebinningCutterAttributes_new(PyObject *self, PyObject *args) -{ - int useCurrent = 0; - if (!PyArg_ParseTuple(args, "i", &useCurrent)) - { - if (!PyArg_ParseTuple(args, "")) - return NULL; - else - PyErr_Clear(); - } - - return (PyObject *)NewRebinningCutterAttributes(useCurrent); -} - -// -// Plugin method table. These methods are added to the visitmodule's methods. -// -static PyMethodDef RebinningCutterAttributesMethods[] = { - {"RebinningCutterAttributes", RebinningCutterAttributes_new, METH_VARARGS}, - {NULL, NULL} /* Sentinel */ -}; - -static Observer *RebinningCutterAttributesObserver = 0; - -std::string -PyRebinningCutterAttributes_GetLogString() -{ - std::string s("RebinningCutterAtts = RebinningCutterAttributes()\n"); - if(currentAtts != 0) - s += PyRebinningCutterAttributes_ToString(currentAtts, "RebinningCutterAtts."); - return s; -} - -static void -PyRebinningCutterAttributes_CallLogRoutine(Subject *subj, void *data) -{ - RebinningCutterAttributes *atts = (RebinningCutterAttributes *)subj; - typedef void (*logCallback)(const std::string &); - logCallback cb = (logCallback)data; - - if(cb != 0) - { - std::string s("RebinningCutterAtts = RebinningCutterAttributes()\n"); - s += PyRebinningCutterAttributes_ToString(currentAtts, "RebinningCutterAtts."); - cb(s); - } -} - -void -PyRebinningCutterAttributes_StartUp(RebinningCutterAttributes *subj, void *data) -{ - if(subj == 0) - return; - - currentAtts = subj; - PyRebinningCutterAttributes_SetDefaults(subj); - - // - // Create the observer that will be notified when the attributes change. - // - if(RebinningCutterAttributesObserver == 0) - { - RebinningCutterAttributesObserver = new ObserverToCallback(subj, - PyRebinningCutterAttributes_CallLogRoutine, (void *)data); - } - -} - -void -PyRebinningCutterAttributes_CloseDown() -{ - delete defaultAtts; - defaultAtts = 0; - delete RebinningCutterAttributesObserver; - RebinningCutterAttributesObserver = 0; -} - -PyMethodDef * -PyRebinningCutterAttributes_GetMethodTable(int *nMethods) -{ - *nMethods = 1; - return RebinningCutterAttributesMethods; -} - -bool -PyRebinningCutterAttributes_Check(PyObject *obj) -{ - return (obj->ob_type == &RebinningCutterAttributesType); -} - -RebinningCutterAttributes * -PyRebinningCutterAttributes_FromPyObject(PyObject *obj) -{ - RebinningCutterAttributesObject *obj2 = (RebinningCutterAttributesObject *)obj; - return obj2->data; -} - -PyObject * -PyRebinningCutterAttributes_New() -{ - return NewRebinningCutterAttributes(0); -} - -PyObject * -PyRebinningCutterAttributes_Wrap(const RebinningCutterAttributes *attr) -{ - return WrapRebinningCutterAttributes(attr); -} - -void -PyRebinningCutterAttributes_SetParent(PyObject *obj, PyObject *parent) -{ - RebinningCutterAttributesObject *obj2 = (RebinningCutterAttributesObject *)obj; - obj2->parent = parent; -} - -void -PyRebinningCutterAttributes_SetDefaults(const RebinningCutterAttributes *atts) -{ - if(defaultAtts) - delete defaultAtts; - - defaultAtts = new RebinningCutterAttributes(*atts); -} - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/QvisRebinningCutterWindow.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/QvisRebinningCutterWindow.C deleted file mode 100644 index 78512762dde..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/QvisRebinningCutterWindow.C +++ /dev/null @@ -1,691 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#include "QvisRebinningCutterWindow.h" - -#include <RebinningCutterAttributes.h> -#include <ViewerProxy.h> - -#include <QCheckBox> -#include <QLabel> -#include <QLayout> -#include <QLineEdit> -#include <QSpinBox> -#include <QButtonGroup> -#include <QRadioButton> -#include <qgridlayout.h> -#include <QvisColorTableButton.h> -#include <QvisOpacitySlider.h> -#include <QvisColorButton.h> -#include <QvisLineStyleWidget.h> -#include <QvisLineWidthWidget.h> -#include <QvisVariableButton.h> -#include <qcombobox.h> -#include <qmessagebox.h> -#include <stdio.h> -#include <string> -#include "MantidGeometry/MDGeometry/IMDDimension.h" -#include "MantidGeometry/MDGeometry/MDGeometry.h" -#include "DimensionWidget.h" -#include "GeometryWidget.h" -#include "IntegratedDimensionWidget.h" -#include <boost/shared_ptr.hpp> -#include "PlotList.h" -#include "Plot.h" -#include "PlotInfoAttributes.h" -#include "MantidVatesAPI/RebinningCutterXMLDefinitions.h" -#include "MantidVatesAPI/RebinningCutterPresenter.h" - -using std::string; - -// **************************************************************************** -// Method: QvisRebinningCutterWindow::QvisRebinningCutterWindow -// -// Purpose: -// Constructor -// -// Note: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -QvisRebinningCutterWindow::QvisRebinningCutterWindow(const int type, - RebinningCutterAttributes *subj, - const QString &caption, - const QString &shortName, - QvisNotepadArea *notepad) - : QvisOperatorWindow(type,subj, caption, shortName, notepad), m_geomWidget(NULL) -{ - atts = subj; -} - - -// **************************************************************************** -// Method: QvisRebinningCutterWindow::~QvisRebinningCutterWindow -// -// Purpose: -// Destructor -// -// Note: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -QvisRebinningCutterWindow::~QvisRebinningCutterWindow() -{ -} - - -// **************************************************************************** -// Method: QvisRebinningCutterWindow::CreateWindowContents -// -// Purpose: -// Creates the widgets for the window. -// -// Note: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** -void QvisRebinningCutterWindow::CreateWindowContents() -{ - mainLayout = new QGridLayout(); - topLayout->addLayout(mainLayout); - - m_setupMessageLabel = new QLabel(); - m_setupMessageLabel->setText("Properties for this operator cannot be displayed until it is first executed.\nClick apply after executing to view properties."); - mainLayout->addWidget(m_setupMessageLabel, 0, 0, 1, 3); - - QGridLayout* originLayout = new QGridLayout(); - originXYZLabel = new QLabel(tr("Origin xyz"), central); - originLayout->addWidget(originXYZLabel, 0, 0, 1, 3); - originX = new QLineEdit(central); - connect(originX, SIGNAL(returnPressed()), this, SLOT(originXProcessText())); - originLayout->addWidget(originX, 1, 1); - originY = new QLineEdit(central); - connect(originY, SIGNAL(returnPressed()), this, SLOT(originYProcessText())); - originLayout->addWidget(originY, 1, 2); - originZ = new QLineEdit(central); - connect(originZ, SIGNAL(returnPressed()), this, SLOT(originZProcessText())); - originLayout->addWidget(originZ, 1, 3); - mainLayout->addLayout(originLayout, 1, 0, 1, 2, Qt::AlignLeft); - - QGridLayout* normalLayout = new QGridLayout(); - normalXYZLabel = new QLabel(tr("Normal xyz"), central); - normalLayout->addWidget(normalXYZLabel, 0, 0, 1, 3); - normalX = new QLineEdit(central); - connect(normalX, SIGNAL(returnPressed()), this, SLOT(normalXProcessText())); - normalLayout->addWidget(normalX, 1, 1); - normalY = new QLineEdit(central); - connect(normalY, SIGNAL(returnPressed()), this, SLOT(normalYProcessText())); - normalLayout->addWidget(normalY, 1, 2); - normalZ = new QLineEdit(central); - connect(normalZ, SIGNAL(returnPressed()), this, SLOT(normalZProcessText())); - normalLayout->addWidget(normalZ, 1, 3); - mainLayout->addLayout(normalLayout, 2, 0, 1, 2, Qt::AlignLeft); - - widthLabel = new QLabel(tr("Width"), central); - mainLayout->addWidget(widthLabel, 3, 0); - width = new QLineEdit(central); - connect(width, SIGNAL(returnPressed()), this, SLOT(widthProcessText())); - mainLayout->addWidget(width, 3, 1); - - heightLabel = new QLabel(tr("Height"), central); - mainLayout->addWidget(heightLabel, 4, 0); - height = new QLineEdit(central); - connect(height, SIGNAL(returnPressed()), this, SLOT(heightProcessText())); - mainLayout->addWidget(height, 4, 1); - - depthLabel = new QLabel(tr("Depth"), central); - mainLayout->addWidget(depthLabel, 5, 0); - depth = new QLineEdit(central); - connect(depth, SIGNAL(returnPressed()), this, SLOT(depthProcessText())); - mainLayout->addWidget(depth, 5, 1); - - structured = new QCheckBox(tr("Structured Grid"), central); - connect(structured, SIGNAL(toggled(bool)), this, SLOT(structuredChanged(bool))); - mainLayout->addWidget(structured, 6, 0); - - m_geomWidget = new GeometryWidget(); - connect(m_geomWidget, SIGNAL(valueChanged()), this, SLOT(geometryChangedlistener())); - mainLayout->addWidget(m_geomWidget, 7, 0, 1, 2, Qt::AlignLeft); - -} - -PlotInfoAttributes* QvisRebinningCutterWindow::findRebinningInfo() const -{ - PlotInfoAttributes* info = NULL; - PlotList* plotList = GetViewerState()->GetPlotList(); - - //Loop through available plots searching for plot information. - for (int plotIndex = 0; plotIndex < plotList->GetNumPlots(); plotIndex++) - { - const Plot& plot = plotList->GetPlots(plotIndex); - int type = plot.GetPlotType(); - PlotInfoAttributes* tempInfo = GetViewerState()->GetPlotInformation(type); - - if (tempInfo->GetData().HasEntry(Mantid::VATES::XMLDefinitions::geometryOperatorInfo())) - { - //Found plot information so break. - info = tempInfo; - break; - } - } - return info; -} - -void QvisRebinningCutterWindow::setControlsVisibility(Visibility vis) const -{ - bool visible = (Show == vis) ? true : false; - normalXYZLabel->setVisible(visible); - normalX->setVisible(visible); - normalY->setVisible(visible); - normalZ->setVisible(visible); - originXYZLabel->setVisible(visible); - originX->setVisible(visible); - originY->setVisible(visible); - originZ->setVisible(visible); - widthLabel->setVisible(visible); - heightLabel->setVisible(visible); - depthLabel->setVisible(visible); - width->setVisible(visible); - height->setVisible(visible); - depth->setVisible(visible); - structured->setVisible(visible); - m_geomWidget->setVisible(visible); - m_setupMessageLabel->setVisible(!visible); -} - - -void QvisRebinningCutterWindow::createGeometryWidget() -{ - std::vector<boost::shared_ptr<Mantid::Geometry::IMDDimension> > dimensions; - PlotInfoAttributes *info = findRebinningInfo(); - - bool infopresent = info != NULL; - - if(info!= NULL && !atts->GetIsSetUp()) - { - MapNode *geomNode = info->GetData().GetEntry(Mantid::VATES::XMLDefinitions::geometryOperatorInfo()); - MapNode *funcNode = info->GetData().GetEntry(Mantid::VATES::XMLDefinitions::functionOperatorInfo()); - - MapNode &geometryXMLNode = *geomNode; - const std::string& geometryXMLString = - geometryXMLNode[Mantid::VATES::XMLDefinitions::geometryNodeName()].AsString(); - - MapNode &functionXMLNode = *funcNode; - const std::string& functionXMLString = - functionXMLNode[Mantid::VATES::XMLDefinitions::functionNodeName()].AsString(); - - //Only provide non-integrated dimensions. TODO: handle integrated dimensions. - dimensions = Mantid::VATES::getDimensions(geometryXMLString, false); - m_geomWidget->constructWidget(dimensions); - - //Set dimensions for future reference. - stringVector dimensionXMLStrings; - dimensionXMLStrings.push_back(m_geomWidget->getXDimensionXML()); - dimensionXMLStrings.push_back(m_geomWidget->getYDimensionXML()); - dimensionXMLStrings.push_back(m_geomWidget->getZDimensionXML()); - atts->SetDimensionXML(dimensionXMLStrings); - - //Get the bounding box and use it to configure box boundaries. - std::vector<double> box = Mantid::VATES::getBoundingBox(functionXMLString); - - double originX = (box[1] + box[0]) / 2; - double originY = (box[3] + box[2]) / 2; - double originZ = (box[5] + box[4]) / 2; - double width = box[1] - box[0]; - double height = box[3] - box[2]; - double depth = box[5] - box[4]; - atts->SetOriginX(originX); - atts->SetOriginY(originY); - atts->SetOriginZ(originZ); - atts->SetWidth(width); - atts->SetHeight(height); - atts->SetDepth(depth); - - //Now all attributes are known to be setup from inputs. - atts->SetIsSetUp(true); - - } -} - -// **************************************************************************** -// Method: QvisRebinningCutterWindow::UpdateWindow -// -// Purpose: -// Updates the widgets in the window when the subject changes. -// -// Note: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -QvisRebinningCutterWindow::UpdateWindow(bool doAll) -{ - createGeometryWidget(); - - //After seeing to geometry widget, determine whether the controls can be shown. - if(atts->GetIsSetUp()) - { - setControlsVisibility(Show); - } - else - { - setControlsVisibility(Hide); - } - - for(int i = 0; i < atts->NumAttributes(); ++i) - { - if(!doAll) - { - if(!atts->IsSelected(i)) - { - continue; - } - } - - switch(i) - { - case RebinningCutterAttributes::ID_originX: - originX->setText(DoubleToQString(atts->GetOriginX())); - break; - case RebinningCutterAttributes::ID_originY: - originY->setText(DoubleToQString(atts->GetOriginY())); - break; - case RebinningCutterAttributes::ID_originZ: - originZ->setText(DoubleToQString(atts->GetOriginZ())); - break; - case RebinningCutterAttributes::ID_normalX: - normalX->setText(DoubleToQString(atts->GetNormalX())); - break; - case RebinningCutterAttributes::ID_normalY: - normalY->setText(DoubleToQString(atts->GetNormalY())); - break; - case RebinningCutterAttributes::ID_normalZ: - normalZ->setText(DoubleToQString(atts->GetNormalZ())); - break; - case RebinningCutterAttributes::ID_width: - width->setText(DoubleToQString(atts->GetWidth())); - break; - case RebinningCutterAttributes::ID_height: - height->setText(DoubleToQString(atts->GetHeight())); - break; - case RebinningCutterAttributes::ID_depth: - depth->setText(DoubleToQString(atts->GetDepth())); - break; - case RebinningCutterAttributes::ID_structured: - structured->blockSignals(true); - structured->setChecked(atts->GetStructured()); - structured->blockSignals(false); - break; - case RebinningCutterAttributes::ID_xDimensionXML: - //TODO: rebuild from xml. - break; - case RebinningCutterAttributes::ID_yDimensionXML: - //TODO: rebuild from xml. - break; - case RebinningCutterAttributes::ID_zDimensionXML: - //TODO: rebuild from xml. - break; - case RebinningCutterAttributes::ID_tDimensionXML: - //TODO: rebuild from xml. - break; - case RebinningCutterAttributes::ID_isSetUp: - //Do nothing. - break; - case RebinningCutterAttributes::ID_dimensionXML: - //writeSourceUpdate unknown for stringVector (variable dimensionXML) - break; - } - } -} - - -// **************************************************************************** -// Method: QvisRebinningCutterWindow::GetCurrentValues -// -// Purpose: -// Gets values from certain widgets and stores them in the subject. -// -// Note: Autogenerated by xml2window. -// -// Programmer: xml2window -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -QvisRebinningCutterWindow::GetCurrentValues(int which_widget) -{ - bool doAll = (which_widget == -1); - - // Do originX - if(which_widget == RebinningCutterAttributes::ID_originX || doAll) - { - double val; - if(LineEditGetDouble(originX, val)) - atts->SetOriginX(val); - else - { - ResettingError(tr("Origin X"), - DoubleToQString(atts->GetOriginX())); - atts->SetOriginX(atts->GetOriginX()); - } - } - - // Do originY - if(which_widget == RebinningCutterAttributes::ID_originY || doAll) - { - double val; - if(LineEditGetDouble(originY, val)) - atts->SetOriginY(val); - else - { - ResettingError(tr("Origin Y"), - DoubleToQString(atts->GetOriginY())); - atts->SetOriginY(atts->GetOriginY()); - } - } - - // Do originZ - if(which_widget == RebinningCutterAttributes::ID_originZ || doAll) - { - double val; - if(LineEditGetDouble(originZ, val)) - atts->SetOriginZ(val); - else - { - ResettingError(tr("Origin Z"), - DoubleToQString(atts->GetOriginZ())); - atts->SetOriginZ(atts->GetOriginZ()); - } - } - - // Do normalX - if(which_widget == RebinningCutterAttributes::ID_normalX || doAll) - { - double val; - if(LineEditGetDouble(normalX, val)) - atts->SetNormalX(val); - else - { - ResettingError(tr("Normal X"), - DoubleToQString(atts->GetNormalX())); - atts->SetNormalX(atts->GetNormalX()); - } - } - - // Do normalY - if(which_widget == RebinningCutterAttributes::ID_normalY || doAll) - { - double val; - if(LineEditGetDouble(normalY, val)) - atts->SetNormalY(val); - else - { - ResettingError(tr("Normal Y"), - DoubleToQString(atts->GetNormalY())); - atts->SetNormalY(atts->GetNormalY()); - } - } - - // Do normalZ - if(which_widget == RebinningCutterAttributes::ID_normalZ || doAll) - { - double val; - if(LineEditGetDouble(normalZ, val)) - atts->SetNormalZ(val); - else - { - ResettingError(tr("Normal Z"), - DoubleToQString(atts->GetNormalZ())); - atts->SetNormalZ(atts->GetNormalZ()); - } - } - - // Do width - if(which_widget == RebinningCutterAttributes::ID_width || doAll) - { - double val; - if(LineEditGetDouble(width, val)) - atts->SetWidth(val); - else - { - ResettingError(tr("Width"), - DoubleToQString(atts->GetWidth())); - atts->SetWidth(atts->GetWidth()); - } - } - - // Do height - if(which_widget == RebinningCutterAttributes::ID_height || doAll) - { - double val; - if(LineEditGetDouble(height, val)) - atts->SetHeight(val); - else - { - ResettingError(tr("Height"), - DoubleToQString(atts->GetHeight())); - atts->SetHeight(atts->GetHeight()); - } - } - - // Do depth - if(which_widget == RebinningCutterAttributes::ID_depth || doAll) - { - double val; - if(LineEditGetDouble(depth, val)) - atts->SetDepth(val); - else - { - ResettingError(tr("Depth"), - DoubleToQString(atts->GetDepth())); - atts->SetDepth(atts->GetDepth()); - } - } - - //Do not apply this behaviour until the geometry has been setup (by running the operator) - if (m_geomWidget->isSetup()) - { - atts->SetIsSetUp(true); - stringVector dimensionXMLStrings; - dimensionXMLStrings.push_back(m_geomWidget->getXDimensionXML()); - dimensionXMLStrings.push_back(m_geomWidget->getYDimensionXML()); - dimensionXMLStrings.push_back(m_geomWidget->getZDimensionXML()); - atts->SetDimensionXML(dimensionXMLStrings); - } -} - - -// -// Qt Slot functions -// - - -void -QvisRebinningCutterWindow::originXProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_originX); - Apply(); -} - - -void -QvisRebinningCutterWindow::originYProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_originY); - Apply(); -} - - -void -QvisRebinningCutterWindow::originZProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_originZ); - Apply(); -} - - -void -QvisRebinningCutterWindow::normalXProcessText() -{ - atts->SetIsDirty(true); - GetCurrentValues(RebinningCutterAttributes::ID_normalX); - Apply(); -} - - -void -QvisRebinningCutterWindow::normalYProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_normalY); - Apply(); -} - - -void -QvisRebinningCutterWindow::normalZProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_normalZ); - Apply(); -} - - -void -QvisRebinningCutterWindow::widthProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_width); - Apply(); -} - - -void -QvisRebinningCutterWindow::heightProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_height); - Apply(); -} - - -void -QvisRebinningCutterWindow::depthProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_depth); - Apply(); -} - - -void -QvisRebinningCutterWindow::structuredChanged(bool val) -{ - atts->SetStructured(val); - SetUpdate(false); - Apply(); -} - - -void -QvisRebinningCutterWindow::xDimensionXMLProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_xDimensionXML); - Apply(); -} - - -void -QvisRebinningCutterWindow::yDimensionXMLProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_yDimensionXML); - Apply(); -} - - -void -QvisRebinningCutterWindow::zDimensionXMLProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_zDimensionXML); - Apply(); -} - - -void -QvisRebinningCutterWindow::tDimensionXMLProcessText() -{ - GetCurrentValues(RebinningCutterAttributes::ID_tDimensionXML); - Apply(); -} - -void QvisRebinningCutterWindow::geometryChangedlistener() -{ - GetCurrentValues(RebinningCutterAttributes::ID_dimensionXML); - Apply(); -} - - - -//writeSourceCallback unknown for stringVector (variable dimensionXML) - -void QvisRebinningCutterWindow::upYProcessText() -{ - -} - -void QvisRebinningCutterWindow::upZProcessText() -{ - -} diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutter.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutter.C deleted file mode 100644 index 5c59f58764f..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutter.C +++ /dev/null @@ -1,573 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#include <RebinningCutter.h> -#include <DataNode.h> - -// **************************************************************************** -// Method: RebinningCutter::RebinningCutter -// -// Purpose: -// Init utility for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void RebinningCutter::Init() -{ - - RebinningCutter::SelectAll(); -} - -// **************************************************************************** -// Method: RebinningCutter::RebinningCutter -// -// Purpose: -// Copy utility for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void RebinningCutter::Copy(const RebinningCutter &obj) -{ - origin = obj.origin; - normal = obj.normal; - - RebinningCutter::SelectAll(); -} - -// Type map format string -const char *RebinningCutter::TypeMapFormatString = REBINNINGCUTTER_TMFS; -const AttributeGroup::private_tmfs_t RebinningCutter::TmfsStruct = {REBINNINGCUTTER_TMFS}; - - -// **************************************************************************** -// Method: RebinningCutter::RebinningCutter -// -// Purpose: -// Default constructor for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutter::RebinningCutter() : - AttributeSubject(RebinningCutter::TypeMapFormatString) -{ - RebinningCutter::Init(); -} - -// **************************************************************************** -// Method: RebinningCutter::RebinningCutter -// -// Purpose: -// Constructor for the derived classes of RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutter::RebinningCutter(private_tmfs_t tmfs) : - AttributeSubject(tmfs.tmfs) -{ - RebinningCutter::Init(); -} - -// **************************************************************************** -// Method: RebinningCutter::RebinningCutter -// -// Purpose: -// Copy constructor for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutter::RebinningCutter(const RebinningCutter &obj) : - AttributeSubject(RebinningCutter::TypeMapFormatString) -{ - RebinningCutter::Copy(obj); -} - -// **************************************************************************** -// Method: RebinningCutter::RebinningCutter -// -// Purpose: -// Copy constructor for derived classes of the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutter::RebinningCutter(const RebinningCutter &obj, private_tmfs_t tmfs) : - AttributeSubject(tmfs.tmfs) -{ - RebinningCutter::Copy(obj); -} - -// **************************************************************************** -// Method: RebinningCutter::~RebinningCutter -// -// Purpose: -// Destructor for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutter::~RebinningCutter() -{ - // nothing here -} - -// **************************************************************************** -// Method: RebinningCutter::operator = -// -// Purpose: -// Assignment operator for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutter& -RebinningCutter::operator = (const RebinningCutter &obj) -{ - if (this == &obj) return *this; - - RebinningCutter::Copy(obj); - - return *this; -} - -// **************************************************************************** -// Method: RebinningCutter::operator == -// -// Purpose: -// Comparison operator == for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -RebinningCutter::operator == (const RebinningCutter &obj) const -{ - // Create the return value - return ((origin == obj.origin) && - (normal == obj.normal)); -} - -// **************************************************************************** -// Method: RebinningCutter::operator != -// -// Purpose: -// Comparison operator != for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -RebinningCutter::operator != (const RebinningCutter &obj) const -{ - return !(this->operator == (obj)); -} - -// **************************************************************************** -// Method: RebinningCutter::TypeName -// -// Purpose: -// Type name method for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -const std::string -RebinningCutter::TypeName() const -{ - return "RebinningCutter"; -} - -// **************************************************************************** -// Method: RebinningCutter::CopyAttributes -// -// Purpose: -// CopyAttributes method for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -RebinningCutter::CopyAttributes(const AttributeGroup *atts) -{ - if(TypeName() != atts->TypeName()) - return false; - - // Call assignment operator. - const RebinningCutter *tmp = (const RebinningCutter *)atts; - *this = *tmp; - - return true; -} - -// **************************************************************************** -// Method: RebinningCutter::CreateCompatible -// -// Purpose: -// CreateCompatible method for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -AttributeSubject * -RebinningCutter::CreateCompatible(const std::string &tname) const -{ - AttributeSubject *retval = 0; - if(TypeName() == tname) - retval = new RebinningCutter(*this); - // Other cases could go here too. - - return retval; -} - -// **************************************************************************** -// Method: RebinningCutter::NewInstance -// -// Purpose: -// NewInstance method for the RebinningCutter class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -AttributeSubject * -RebinningCutter::NewInstance(bool copy) const -{ - AttributeSubject *retval = 0; - if(copy) - retval = new RebinningCutter(*this); - else - retval = new RebinningCutter; - - return retval; -} - -// **************************************************************************** -// Method: RebinningCutter::SelectAll -// -// Purpose: -// Selects all attributes. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -RebinningCutter::SelectAll() -{ - Select(ID_origin, (void *)&origin); - Select(ID_normal, (void *)&normal); -} - -/////////////////////////////////////////////////////////////////////////////// -// Set property methods -/////////////////////////////////////////////////////////////////////////////// - -void -RebinningCutter::SetOrigin(const doubleVector &origin_) -{ - origin = origin_; - Select(ID_origin, (void *)&origin); -} - -void -RebinningCutter::SetNormal(const doubleVector &normal_) -{ - normal = normal_; - Select(ID_normal, (void *)&normal); -} - -/////////////////////////////////////////////////////////////////////////////// -// Get property methods -/////////////////////////////////////////////////////////////////////////////// - -const doubleVector & -RebinningCutter::GetOrigin() const -{ - return origin; -} - -doubleVector & -RebinningCutter::GetOrigin() -{ - return origin; -} - -const doubleVector & -RebinningCutter::GetNormal() const -{ - return normal; -} - -doubleVector & -RebinningCutter::GetNormal() -{ - return normal; -} - -/////////////////////////////////////////////////////////////////////////////// -// Select property methods -/////////////////////////////////////////////////////////////////////////////// - -void -RebinningCutter::SelectOrigin() -{ - Select(ID_origin, (void *)&origin); -} - -void -RebinningCutter::SelectNormal() -{ - Select(ID_normal, (void *)&normal); -} - -/////////////////////////////////////////////////////////////////////////////// -// Keyframing methods -/////////////////////////////////////////////////////////////////////////////// - -// **************************************************************************** -// Method: RebinningCutter::GetFieldName -// -// Purpose: -// This method returns the name of a field given its index. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -std::string -RebinningCutter::GetFieldName(int index) const -{ - switch (index) - { - case ID_origin: return "origin"; - case ID_normal: return "normal"; - default: return "invalid index"; - } -} - -// **************************************************************************** -// Method: RebinningCutter::GetFieldType -// -// Purpose: -// This method returns the type of a field given its index. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -AttributeGroup::FieldType -RebinningCutter::GetFieldType(int index) const -{ - switch (index) - { - case ID_origin: return FieldType_doubleVector; - case ID_normal: return FieldType_doubleVector; - default: return FieldType_unknown; - } -} - -// **************************************************************************** -// Method: RebinningCutter::GetFieldTypeName -// -// Purpose: -// This method returns the name of a field type given its index. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -std::string -RebinningCutter::GetFieldTypeName(int index) const -{ - switch (index) - { - case ID_origin: return "doubleVector"; - case ID_normal: return "doubleVector"; - default: return "invalid index"; - } -} - -// **************************************************************************** -// Method: RebinningCutter::FieldsEqual -// -// Purpose: -// This method compares two fields and return true if they are equal. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -RebinningCutter::FieldsEqual(int index_, const AttributeGroup *rhs) const -{ - const RebinningCutter &obj = *((const RebinningCutter*)rhs); - bool retval = false; - switch (index_) - { - case ID_origin: - { // new scope - retval = (origin == obj.origin); - } - break; - case ID_normal: - { // new scope - retval = (normal == obj.normal); - } - break; - default: retval = false; - } - - return retval; -} - -/////////////////////////////////////////////////////////////////////////////// -// User-defined methods. -/////////////////////////////////////////////////////////////////////////////// - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterAttributes.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterAttributes.C deleted file mode 100644 index e0a3d730943..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterAttributes.C +++ /dev/null @@ -1,1093 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -#include <RebinningCutterAttributes.h> -#include <DataNode.h> -#include <PlaneAttributes.h> -#include <BoxExtents.h> -#include <DebugStream.h> -// **************************************************************************** -// Method: RebinningCutterAttributes::RebinningCutterAttributes -// -// Purpose: -// Init utility for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void RebinningCutterAttributes::Init() -{ - this->isSetUp = false; - this->structured = true; - this->normalX = 0; - this->normalY = 0; - this->normalZ = 0; - RebinningCutterAttributes::SelectAll(); -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::RebinningCutterAttributes -// -// Purpose: -// Copy utility for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void RebinningCutterAttributes::Copy(const RebinningCutterAttributes &obj) -{ - originX = obj.originX; - originY = obj.originY; - originZ = obj.originZ; - normalX = obj.normalX; - normalY = obj.normalY; - normalZ = obj.normalZ; - width = obj.width; - height = obj.height; - depth = obj.depth; - structured = obj.structured; - xDimensionXML = obj.xDimensionXML; - yDimensionXML = obj.yDimensionXML; - zDimensionXML = obj.zDimensionXML; - tDimensionXML = obj.tDimensionXML; - isSetUp = obj.isSetUp; - dimensionXML = obj.dimensionXML; - upX = obj.upX; - upY = obj.upY; - upZ = obj.upZ; - isDirty = obj.isDirty; - - RebinningCutterAttributes::SelectAll(); -} - -// Type map format string -const char *RebinningCutterAttributes::TypeMapFormatString = REBINNINGCUTTERATTRIBUTES_TMFS; -const AttributeGroup::private_tmfs_t RebinningCutterAttributes::TmfsStruct = {REBINNINGCUTTERATTRIBUTES_TMFS}; - - -// **************************************************************************** -// Method: RebinningCutterAttributes::RebinningCutterAttributes -// -// Purpose: -// Default constructor for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutterAttributes::RebinningCutterAttributes() : - AttributeSubject(RebinningCutterAttributes::TypeMapFormatString) -{ - RebinningCutterAttributes::Init(); -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::RebinningCutterAttributes -// -// Purpose: -// Constructor for the derived classes of RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutterAttributes::RebinningCutterAttributes(private_tmfs_t tmfs) : - AttributeSubject(tmfs.tmfs) -{ - RebinningCutterAttributes::Init(); -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::RebinningCutterAttributes -// -// Purpose: -// Copy constructor for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutterAttributes::RebinningCutterAttributes(const RebinningCutterAttributes &obj) : - AttributeSubject(RebinningCutterAttributes::TypeMapFormatString) -{ - RebinningCutterAttributes::Copy(obj); -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::RebinningCutterAttributes -// -// Purpose: -// Copy constructor for derived classes of the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutterAttributes::RebinningCutterAttributes(const RebinningCutterAttributes &obj, private_tmfs_t tmfs) : - AttributeSubject(tmfs.tmfs) -{ - RebinningCutterAttributes::Copy(obj); -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::~RebinningCutterAttributes -// -// Purpose: -// Destructor for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutterAttributes::~RebinningCutterAttributes() -{ - // nothing here -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::operator = -// -// Purpose: -// Assignment operator for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -RebinningCutterAttributes& -RebinningCutterAttributes::operator = (const RebinningCutterAttributes &obj) -{ - if (this == &obj) return *this; - - RebinningCutterAttributes::Copy(obj); - - return *this; -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::operator == -// -// Purpose: -// Comparison operator == for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -RebinningCutterAttributes::operator == (const RebinningCutterAttributes &obj) const -{ - // Create the return value - return ((originX == obj.originX) && - (originY == obj.originY) && - (originZ == obj.originZ) && - (normalX == obj.normalX) && - (normalY == obj.normalY) && - (normalZ == obj.normalZ) && - (width == obj.width) && - (height == obj.height) && - (depth == obj.depth) && - (structured == obj.structured) && - (xDimensionXML == obj.xDimensionXML) && - (yDimensionXML == obj.yDimensionXML) && - (zDimensionXML == obj.zDimensionXML) && - (tDimensionXML == obj.tDimensionXML) && - (isSetUp == obj.isSetUp) && - (dimensionXML == obj.dimensionXML) && - (upX == obj.upX) && - (upY == obj.upY) && - (upZ == obj.upZ) && - (isDirty == obj.isDirty)); -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::operator != -// -// Purpose: -// Comparison operator != for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -RebinningCutterAttributes::operator != (const RebinningCutterAttributes &obj) const -{ - return !(this->operator == (obj)); -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::TypeName -// -// Purpose: -// Type name method for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -const std::string -RebinningCutterAttributes::TypeName() const -{ - return "RebinningCutterAttributes"; -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::CopyAttributes -// -// Purpose: -// CopyAttributes method for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool RebinningCutterAttributes::CopyAttributes(const AttributeGroup *atts) -{ - bool retval = false; - - if (TypeName() == atts->TypeName()) - { - // Call assignment operator. - const RebinningCutterAttributes *tmp = (const RebinningCutterAttributes *) atts; - *this = *tmp; - retval = true; - } - else if (atts->TypeName() == "PlaneAttributes") - { - - const PlaneAttributes *tmp = (const PlaneAttributes *) atts; - - using namespace std; - - SetOriginX(tmp->GetOrigin()[0]); - SetOriginY(tmp->GetOrigin()[1]); - SetOriginZ(tmp->GetOrigin()[2]); - SetNormalX(tmp->GetNormal()[0]); - SetNormalY(tmp->GetNormal()[1]); - SetNormalZ(tmp->GetNormal()[2]); - SetUpX(tmp->GetUpAxis()[0]); - SetUpY(tmp->GetUpAxis()[1]); - SetUpZ(tmp->GetUpAxis()[2]); - - retval = true; - } - else if (atts->TypeName() == "BoxExtents") - { - const BoxExtents *tmp = (const BoxExtents *) atts; - const double *extents = tmp->GetExtents(); - - SetWidth(extents[1] - extents[0]); - SetHeight(extents[3] - extents[2]); - SetDepth(extents[5] - extents[4]); - - SetOriginX((extents[1] + extents[0]) / 2); - SetOriginY((extents[3] + extents[2]) / 2); - SetOriginZ((extents[5] + extents[4]) / 2); - - retval = true; - } - - return retval; -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::CreateCompatible -// -// Purpose: -// CreateCompatible method for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -AttributeSubject * -RebinningCutterAttributes::CreateCompatible(const std::string &tname) const -{ - AttributeSubject *retval = 0; - if (TypeName() == tname) - { - retval = new RebinningCutterAttributes(*this); - } -// else if (tname == "PlaneAttributes") -// { -// using namespace std; -// PlaneAttributes *p = new PlaneAttributes; -// double normal[3]; -// double origin[3]; -// double up[3]; -// -// normal[0] = GetNormalX(); -// normal[1] = GetNormalY(); -// normal[2] = GetNormalZ(); -// -// origin[0] = GetOriginX(); -// origin[1] = GetOriginY(); -// origin[2] = GetOriginZ(); -// -// // Compute up vector -// double temp[3] = {0, 0, 1}; -// if (normal[0] == 0 && normal[1] == 0) -// temp[1] = 1; -// up[0] = normal[1]*temp[2] - normal[2]*temp[1]; -// up[1] = normal[2]*temp[0] - normal[0]*temp[2]; -// up[2] = normal[0]*temp[1] - normal[1]*temp[0]; -// -// p->SetNormal(normal); -// p->SetOrigin(origin); -// p->SetUpAxis(up); -// p->SetThreeSpace(true); -// -// retval = p; -// } - else if (tname == "BoxExtents") - { - BoxExtents *b = new BoxExtents; - double extents[6]; - extents[0] = GetOriginX() - GetWidth()/2; - extents[1] = GetOriginX() + GetWidth()/2; - extents[2] = GetOriginY() - GetHeight()/2; - extents[3] = GetHeight()/2 + GetOriginY(); - extents[4] = GetOriginZ() - GetDepth()/2; - extents[5] = GetOriginZ() + GetDepth()/2; - b->SetExtents(extents); - - retval = b; - } - - return retval; -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::NewInstance -// -// Purpose: -// NewInstance method for the RebinningCutterAttributes class. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -AttributeSubject * -RebinningCutterAttributes::NewInstance(bool copy) const -{ - AttributeSubject *retval = 0; - if(copy) - retval = new RebinningCutterAttributes(*this); - else - retval = new RebinningCutterAttributes; - - return retval; -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::SelectAll -// -// Purpose: -// Selects all attributes. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -RebinningCutterAttributes::SelectAll() -{ - Select(ID_originX, (void *)&originX); - Select(ID_originY, (void *)&originY); - Select(ID_originZ, (void *)&originZ); - Select(ID_normalX, (void *)&normalX); - Select(ID_normalY, (void *)&normalY); - Select(ID_normalZ, (void *)&normalZ); - Select(ID_width, (void *)&width); - Select(ID_height, (void *)&height); - Select(ID_depth, (void *)&depth); - Select(ID_structured, (void *)&structured); - Select(ID_xDimensionXML, (void *)&xDimensionXML); - Select(ID_yDimensionXML, (void *)&yDimensionXML); - Select(ID_zDimensionXML, (void *)&zDimensionXML); - Select(ID_tDimensionXML, (void *)&tDimensionXML); - Select(ID_isSetUp, (void *)&isSetUp); - Select(ID_dimensionXML, (void *)&dimensionXML); - Select(ID_upX, (void *)&upX); - Select(ID_upY, (void *)&upY); - Select(ID_upZ, (void *)&upZ); - Select(ID_isDirty, (void *)&isDirty); -} - -/////////////////////////////////////////////////////////////////////////////// -// Set property methods -/////////////////////////////////////////////////////////////////////////////// - -void -RebinningCutterAttributes::SetOriginX(double originX_) -{ - originX = originX_; - Select(ID_originX, (void *)&originX); -} - -void -RebinningCutterAttributes::SetOriginY(double originY_) -{ - originY = originY_; - Select(ID_originY, (void *)&originY); -} - -void -RebinningCutterAttributes::SetOriginZ(double originZ_) -{ - originZ = originZ_; - Select(ID_originZ, (void *)&originZ); -} - -void -RebinningCutterAttributes::SetNormalX(double normalX_) -{ - normalX = normalX_; - Select(ID_normalX, (void *)&normalX); -} - -void -RebinningCutterAttributes::SetNormalY(double normalY_) -{ - normalY = normalY_; - Select(ID_normalY, (void *)&normalY); -} - -void -RebinningCutterAttributes::SetNormalZ(double normalZ_) -{ - normalZ = normalZ_; - Select(ID_normalZ, (void *)&normalZ); -} - -void -RebinningCutterAttributes::SetWidth(double width_) -{ - width = width_; - Select(ID_width, (void *)&width); -} - -void -RebinningCutterAttributes::SetHeight(double height_) -{ - height = height_; - Select(ID_height, (void *)&height); -} - -void -RebinningCutterAttributes::SetDepth(double depth_) -{ - depth = depth_; - Select(ID_depth, (void *)&depth); -} - -void -RebinningCutterAttributes::SetStructured(bool structured_) -{ - structured = structured_; - Select(ID_structured, (void *)&structured); -} - -void -RebinningCutterAttributes::SetXDimensionXML(const std::string &xDimensionXML_) -{ - xDimensionXML = xDimensionXML_; - Select(ID_xDimensionXML, (void *)&xDimensionXML); -} - -void -RebinningCutterAttributes::SetYDimensionXML(int yDimensionXML_) -{ - yDimensionXML = yDimensionXML_; - Select(ID_yDimensionXML, (void *)&yDimensionXML); -} - -void -RebinningCutterAttributes::SetZDimensionXML(int zDimensionXML_) -{ - zDimensionXML = zDimensionXML_; - Select(ID_zDimensionXML, (void *)&zDimensionXML); -} - -void -RebinningCutterAttributes::SetTDimensionXML(int tDimensionXML_) -{ - tDimensionXML = tDimensionXML_; - Select(ID_tDimensionXML, (void *)&tDimensionXML); -} - -void -RebinningCutterAttributes::SetIsSetUp(bool isSetUp_) -{ - isSetUp = isSetUp_; - Select(ID_isSetUp, (void *)&isSetUp); -} - -void -RebinningCutterAttributes::SetDimensionXML(const stringVector &dimensionXML_) -{ - dimensionXML = dimensionXML_; - Select(ID_dimensionXML, (void *)&dimensionXML); -} - -void -RebinningCutterAttributes::SetUpX(double upX_) -{ - upX = upX_; - Select(ID_upX, (void *)&upX); -} - -void -RebinningCutterAttributes::SetUpY(double upY_) -{ - upY = upY_; - Select(ID_upY, (void *)&upY); -} - -void -RebinningCutterAttributes::SetUpZ(double upZ_) -{ - upZ = upZ_; - Select(ID_upZ, (void *)&upZ); -} - -void -RebinningCutterAttributes::SetIsDirty(bool isDirty_) -{ - isDirty = isDirty_; - Select(ID_isDirty, (void *)&isDirty); -} - -/////////////////////////////////////////////////////////////////////////////// -// Get property methods -/////////////////////////////////////////////////////////////////////////////// - -double -RebinningCutterAttributes::GetOriginX() const -{ - return originX; -} - -double -RebinningCutterAttributes::GetOriginY() const -{ - return originY; -} - -double -RebinningCutterAttributes::GetOriginZ() const -{ - return originZ; -} - -double -RebinningCutterAttributes::GetNormalX() const -{ - return normalX; -} - -double -RebinningCutterAttributes::GetNormalY() const -{ - return normalY; -} - -double -RebinningCutterAttributes::GetNormalZ() const -{ - return normalZ; -} - -double -RebinningCutterAttributes::GetWidth() const -{ - return width; -} - -double -RebinningCutterAttributes::GetHeight() const -{ - return height; -} - -double -RebinningCutterAttributes::GetDepth() const -{ - return depth; -} - -bool -RebinningCutterAttributes::GetStructured() const -{ - return structured; -} - -const std::string & -RebinningCutterAttributes::GetXDimensionXML() const -{ - return xDimensionXML; -} - -std::string & -RebinningCutterAttributes::GetXDimensionXML() -{ - return xDimensionXML; -} - -int -RebinningCutterAttributes::GetYDimensionXML() const -{ - return yDimensionXML; -} - -int -RebinningCutterAttributes::GetZDimensionXML() const -{ - return zDimensionXML; -} - -int -RebinningCutterAttributes::GetTDimensionXML() const -{ - return tDimensionXML; -} - -bool -RebinningCutterAttributes::GetIsSetUp() const -{ - return isSetUp; -} - -const stringVector & -RebinningCutterAttributes::GetDimensionXML() const -{ - return dimensionXML; -} - -stringVector & -RebinningCutterAttributes::GetDimensionXML() -{ - return dimensionXML; -} - -double -RebinningCutterAttributes::GetUpX() const -{ - return upX; -} - -double -RebinningCutterAttributes::GetUpY() const -{ - return upY; -} - -double -RebinningCutterAttributes::GetUpZ() const -{ - return upZ; -} - -bool -RebinningCutterAttributes::GetIsDirty() const -{ - return isDirty; -} - -/////////////////////////////////////////////////////////////////////////////// -// Select property methods -/////////////////////////////////////////////////////////////////////////////// - -void -RebinningCutterAttributes::SelectXDimensionXML() -{ - Select(ID_xDimensionXML, (void *)&xDimensionXML); -} - -void -RebinningCutterAttributes::SelectDimensionXML() -{ - Select(ID_dimensionXML, (void *)&dimensionXML); -} - -/////////////////////////////////////////////////////////////////////////////// -// Keyframing methods -/////////////////////////////////////////////////////////////////////////////// - -// **************************************************************************** -// Method: RebinningCutterAttributes::GetFieldName -// -// Purpose: -// This method returns the name of a field given its index. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -std::string -RebinningCutterAttributes::GetFieldName(int index) const -{ - switch (index) - { - case ID_originX: return "originX"; - case ID_originY: return "originY"; - case ID_originZ: return "originZ"; - case ID_normalX: return "normalX"; - case ID_normalY: return "normalY"; - case ID_normalZ: return "normalZ"; - case ID_width: return "width"; - case ID_height: return "height"; - case ID_depth: return "depth"; - case ID_structured: return "structured"; - case ID_xDimensionXML: return "xDimensionXML"; - case ID_yDimensionXML: return "yDimensionXML"; - case ID_zDimensionXML: return "zDimensionXML"; - case ID_tDimensionXML: return "tDimensionXML"; - case ID_isSetUp: return "isSetUp"; - case ID_dimensionXML: return "dimensionXML"; - case ID_upX: return "upX"; - case ID_upY: return "upY"; - case ID_upZ: return "upZ"; - case ID_isDirty: return "isDirty"; - default: return "invalid index"; - } -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::GetFieldType -// -// Purpose: -// This method returns the type of a field given its index. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -AttributeGroup::FieldType -RebinningCutterAttributes::GetFieldType(int index) const -{ - switch (index) - { - case ID_originX: return FieldType_double; - case ID_originY: return FieldType_double; - case ID_originZ: return FieldType_double; - case ID_normalX: return FieldType_double; - case ID_normalY: return FieldType_double; - case ID_normalZ: return FieldType_double; - case ID_width: return FieldType_double; - case ID_height: return FieldType_double; - case ID_depth: return FieldType_double; - case ID_structured: return FieldType_bool; - case ID_xDimensionXML: return FieldType_string; - case ID_yDimensionXML: return FieldType_int; - case ID_zDimensionXML: return FieldType_int; - case ID_tDimensionXML: return FieldType_int; - case ID_isSetUp: return FieldType_bool; - case ID_dimensionXML: return FieldType_stringVector; - case ID_upX: return FieldType_double; - case ID_upY: return FieldType_double; - case ID_upZ: return FieldType_double; - case ID_isDirty: return FieldType_bool; - default: return FieldType_unknown; - } -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::GetFieldTypeName -// -// Purpose: -// This method returns the name of a field type given its index. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -std::string -RebinningCutterAttributes::GetFieldTypeName(int index) const -{ - switch (index) - { - case ID_originX: return "double"; - case ID_originY: return "double"; - case ID_originZ: return "double"; - case ID_normalX: return "double"; - case ID_normalY: return "double"; - case ID_normalZ: return "double"; - case ID_width: return "double"; - case ID_height: return "double"; - case ID_depth: return "double"; - case ID_structured: return "bool"; - case ID_xDimensionXML: return "string"; - case ID_yDimensionXML: return "int"; - case ID_zDimensionXML: return "int"; - case ID_tDimensionXML: return "int"; - case ID_isSetUp: return "bool"; - case ID_dimensionXML: return "stringVector"; - case ID_upX: return "double"; - case ID_upY: return "double"; - case ID_upZ: return "double"; - case ID_isDirty: return "bool"; - default: return "invalid index"; - } -} - -// **************************************************************************** -// Method: RebinningCutterAttributes::FieldsEqual -// -// Purpose: -// This method compares two fields and return true if they are equal. -// -// Note: Autogenerated by xml2atts. -// -// Programmer: xml2atts -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -RebinningCutterAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const -{ - const RebinningCutterAttributes &obj = *((const RebinningCutterAttributes*)rhs); - bool retval = false; - switch (index_) - { - case ID_originX: - { // new scope - retval = (originX == obj.originX); - } - break; - case ID_originY: - { // new scope - retval = (originY == obj.originY); - } - break; - case ID_originZ: - { // new scope - retval = (originZ == obj.originZ); - } - break; - case ID_normalX: - { // new scope - retval = (normalX == obj.normalX); - } - break; - case ID_normalY: - { // new scope - retval = (normalY == obj.normalY); - } - break; - case ID_normalZ: - { // new scope - retval = (normalZ == obj.normalZ); - } - break; - case ID_width: - { // new scope - retval = (width == obj.width); - } - break; - case ID_height: - { // new scope - retval = (height == obj.height); - } - break; - case ID_depth: - { // new scope - retval = (depth == obj.depth); - } - break; - case ID_structured: - { // new scope - retval = (structured == obj.structured); - } - break; - case ID_xDimensionXML: - { // new scope - retval = (xDimensionXML == obj.xDimensionXML); - } - break; - case ID_yDimensionXML: - { // new scope - retval = (yDimensionXML == obj.yDimensionXML); - } - break; - case ID_zDimensionXML: - { // new scope - retval = (zDimensionXML == obj.zDimensionXML); - } - break; - case ID_tDimensionXML: - { // new scope - retval = (tDimensionXML == obj.tDimensionXML); - } - break; - case ID_isSetUp: - { // new scope - retval = (isSetUp == obj.isSetUp); - } - break; - case ID_dimensionXML: - { // new scope - retval = (dimensionXML == obj.dimensionXML); - } - break; - case ID_upX: - { // new scope - retval = (upX == obj.upX); - } - break; - case ID_upY: - { // new scope - retval = (upY == obj.upY); - } - break; - case ID_upZ: - { // new scope - retval = (upZ == obj.upZ); - } - break; - case ID_isDirty: - { // new scope - retval = (isDirty == obj.isDirty); - } - break; - default: retval = false; - } - - return retval; -} - -/////////////////////////////////////////////////////////////////////////////// -// User-defined methods. -/////////////////////////////////////////////////////////////////////////////// - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterCommonPluginInfo.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterCommonPluginInfo.C deleted file mode 100644 index 5acfdf70139..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterCommonPluginInfo.C +++ /dev/null @@ -1,85 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: RebinningCutterCommonPluginInfo.C -// ************************************************************************* // - -#include <RebinningCutterPluginInfo.h> -#include <RebinningCutterAttributes.h> - -// **************************************************************************** -// Method: RebinningCutterCommonPluginInfo::AllocAttributes -// -// Purpose: -// Return a pointer to a newly allocated attribute subject. -// -// Returns: A pointer to the newly allocated attribute subject. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -AttributeSubject * -RebinningCutterCommonPluginInfo::AllocAttributes() -{ - return new RebinningCutterAttributes; -} - -// **************************************************************************** -// Method: RebinningCutterCommonPluginInfo::CopyAttributes -// -// Purpose: -// Copy a RebinningCutter attribute subject. -// -// Arguments: -// to The destination attribute subject. -// from The source attribute subject. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -void -RebinningCutterCommonPluginInfo::CopyAttributes(AttributeSubject *to, - AttributeSubject *from) -{ - *((RebinningCutterAttributes *) to) = *((RebinningCutterAttributes *) from); -} diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterEnginePluginInfo.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterEnginePluginInfo.C deleted file mode 100644 index 6d5356fa158..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterEnginePluginInfo.C +++ /dev/null @@ -1,78 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: RebinningCutterEnginePluginInfo.C -// ************************************************************************* // - -#include <RebinningCutterPluginInfo.h> -#include <avtRebinningCutterFilter.h> - -// **************************************************************************** -// Function: GetEngineInfo -// -// Purpose: -// Return a new EnginePluginInfo for the RebinningCutter operator. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" OP_EXPORT EngineOperatorPluginInfo* RebinningCutter_GetEngineInfo() -{ - return new RebinningCutterEnginePluginInfo; -} - -// **************************************************************************** -// Method: RebinningCutterEnginePluginInfo::AllocAvtPluginFilter -// -// Purpose: -// Return a pointer to a newly allocated avtPluginFilter. -// -// Returns: A pointer to the newly allocated avtPluginFilter. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -avtPluginFilter * -RebinningCutterEnginePluginInfo::AllocAvtPluginFilter() -{ - return new avtRebinningCutterFilter; -} diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterGUIPluginInfo.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterGUIPluginInfo.C deleted file mode 100644 index fbc8991d42a..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterGUIPluginInfo.C +++ /dev/null @@ -1,128 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: RebinningCutterGUIPluginInfo.C -// ************************************************************************* // - -#include <RebinningCutterPluginInfo.h> -#include <RebinningCutterAttributes.h> -#include <QApplication> -#include <QvisRebinningCutterWindow.h> - -// **************************************************************************** -// Function: GetGUIInfo -// -// Purpose: -// Return a new GUIPluginInfo for the RebinningCutter operator. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" OP_EXPORT GUIOperatorPluginInfo* RebinningCutter_GetGUIInfo() -{ - return new RebinningCutterGUIPluginInfo; -} - -// **************************************************************************** -// Method: RebinningCutterGUIPluginInfo::GetMenuName -// -// Purpose: -// Return a pointer to the name to use in the GUI menu. -// -// Returns: A pointer to the name to use in the GUI menu. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -QString * -RebinningCutterGUIPluginInfo::GetMenuName() const -{ - return new QString(qApp->translate("OperatorNames", "Rebinning Cutter")); -} - - -// **************************************************************************** -// Method: RebinningCutterGUIPluginInfo::CreatePluginWindow -// -// Purpose: -// Return a pointer to an operator's attribute window. -// -// Arguments: -// type The type of the operator. -// attr The attribute subject for the operator. -// notepad The notepad to use for posting the window. -// -// Returns: A pointer to the operator's attribute window. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -QvisPostableWindowObserver * -RebinningCutterGUIPluginInfo::CreatePluginWindow(int type, AttributeSubject *attr, - const QString &caption, const QString &shortName, QvisNotepadArea *notepad) -{ - return new QvisRebinningCutterWindow(type, (RebinningCutterAttributes *)attr, - caption, shortName, notepad); -} - -// **************************************************************************** -// Method: RebinningCutterGUIPluginInfo::XPMIconData -// -// Purpose: -// Return a pointer to the icon data. -// -// Returns: A pointer to the icon data. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -#include <RebinningCutter.xpm> -const char ** -RebinningCutterGUIPluginInfo::XPMIconData() const -{ - return RebinningCutter_xpm; -} - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterPluginInfo.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterPluginInfo.C deleted file mode 100644 index 0bda69ce208..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterPluginInfo.C +++ /dev/null @@ -1,137 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: RebinningCutterPluginInfo.C -// ************************************************************************* // - -#include <RebinningCutterPluginInfo.h> -#include <RebinningCutterAttributes.h> - -#include <visit-config.h> -extern "C" OP_EXPORT const char *RebinningCutterVisItPluginVersion = VISIT_VERSION; - -// **************************************************************************** -// Function: GetGeneralInfo -// -// Purpose: -// Return a new GeneralPluginInfo for the RebinningCutter operator. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" OP_EXPORT GeneralOperatorPluginInfo* RebinningCutter_GetGeneralInfo() -{ - return new RebinningCutterGeneralPluginInfo; -} - -// **************************************************************************** -// Method: RebinningCutterGeneralPluginInfo::GetName -// -// Purpose: -// Return the name of the operator plugin. -// -// Returns: A pointer to the name of the operator plugin. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -const char * -RebinningCutterGeneralPluginInfo::GetName() const -{ - return "RebinningCutter"; -} - -// **************************************************************************** -// Method: RebinningCutterGeneralPluginInfo::GetVersion -// -// Purpose: -// Return the version of the operator plugin. -// -// Returns: A pointer to the version of the operator plugin. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -const char * -RebinningCutterGeneralPluginInfo::GetVersion() const -{ - return "1.0"; -} - -// **************************************************************************** -// Method: RebinningCutterGeneralPluginInfo::GetID -// -// Purpose: -// Return the id of the operator plugin. -// -// Returns: A pointer to the id of the operator plugin. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -const char * -RebinningCutterGeneralPluginInfo::GetID() const -{ - return "RebinningCutter_1.0"; -} -// **************************************************************************** -// Method: RebinningCutterGeneralPluginInfo::EnabledByDefault -// -// Purpose: -// Return true if this plugin should be enabled by default; false otherwise. -// -// Returns: true/false -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -bool -RebinningCutterGeneralPluginInfo::EnabledByDefault() const -{ - return true; -} diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterScriptingPluginInfo.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterScriptingPluginInfo.C deleted file mode 100644 index 5e22229855b..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterScriptingPluginInfo.C +++ /dev/null @@ -1,176 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// RebinningCutterScriptingPluginInfo.C -// ************************************************************************* // -#include <PyRebinningCutterAttributes.h> -#include <RebinningCutterPluginInfo.h> - -// **************************************************************************** -// Function: GetScriptingInfo -// -// Purpose: -// Return a new ScriptingPluginInfo for the RebinningCutter plot. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" OP_EXPORT ScriptingOperatorPluginInfo* RebinningCutter_GetScriptingInfo() -{ - return new RebinningCutterScriptingPluginInfo; -} - -// **************************************************************************** -// Method: RebinningCutterScriptingPluginInfo::InitializePlugin -// -// Purpose: -// Calls the initialization function for the plugin. -// -// Arguments: -// subj : A pointer to the plugin's state object. -// data : A pointer to data to be used by the observer function. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -RebinningCutterScriptingPluginInfo::InitializePlugin(AttributeSubject *subj, - void *data) -{ - PyRebinningCutterAttributes_StartUp((RebinningCutterAttributes *)subj, data); -} - -// **************************************************************************** -// Method: RebinningCutterScriptingPluginInfo::GetMethodTable -// -// Purpose: -// Returns a pointer to the plugin's Python method table. These methods are -// added to the top-level visit module's methods. -// -// Arguments: -// nMethods : Returns the number of methods in the method table. -// -// Returns: A pointer to the method table. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void * -RebinningCutterScriptingPluginInfo::GetMethodTable(int *nMethods) -{ - return PyRebinningCutterAttributes_GetMethodTable(nMethods); -} - -// **************************************************************************** -// Method: RebinningCutterScriptingPluginInfo::TypesMatch -// -// Purpose: -// Returns whether or not the input PyObject is RebinningCutter plot attributes. -// -// Arguments: -// pyobject : A PyObject cast to void*. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -bool -RebinningCutterScriptingPluginInfo::TypesMatch(void *pyobject) -{ - return PyRebinningCutterAttributes_Check((PyObject *)pyobject); -} - -// **************************************************************************** -// Method: RebinningCutterScriptingPluginInfo::GetLogString -// -// Purpose: -// Gets a string representation of the current attributes. -// -// Arguments: -// val : Whether or not to log state information. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -char * -RebinningCutterScriptingPluginInfo::GetLogString() -{ - std::string s(PyRebinningCutterAttributes_GetLogString()); - char *v = new char[s.size() + 1]; - strcpy(v, s.c_str()); - return v; -} - -// **************************************************************************** -// Method: RebinningCutterScriptingPluginInfo::SetDefaults -// -// Purpose: -// Used to set the default values for a plugin's state object. -// -// Arguments: -// atts : The new state. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// Modifications: -// -// **************************************************************************** - -void -RebinningCutterScriptingPluginInfo::SetDefaults(const AttributeSubject *atts) -{ - PyRebinningCutterAttributes_SetDefaults((const RebinningCutterAttributes *)atts); -} diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterViewerPluginInfo.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterViewerPluginInfo.C deleted file mode 100644 index de84a32af88..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/RebinningCutterViewerPluginInfo.C +++ /dev/null @@ -1,230 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC -* Produced at the Lawrence Livermore National Laboratory -* LLNL-CODE-442911 -* All rights reserved. -* -* This file is part of VisIt. For details, see https://visit.llnl.gov/. The -* full copyright notice is contained in the file COPYRIGHT located at the root -* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* - Redistributions of source code must retain the above copyright notice, -* this list of conditions and the disclaimer below. -* - Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the disclaimer (as noted below) in the -* documentation and/or other materials provided with the distribution. -* - Neither the name of the LLNS/LLNL nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, -* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGE. -* -*****************************************************************************/ - -// ************************************************************************* // -// File: RebinningCutterViewerPluginInfo.C -// ************************************************************************* // - -#include <RebinningCutterPluginInfo.h> -#include <QApplication> -#include <RebinningCutterAttributes.h> - -// **************************************************************************** -// Function: GetViewerInfo -// -// Purpose: -// Return a new ViewerPluginInfo for the RebinningCutter operator. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -extern "C" OP_EXPORT ViewerOperatorPluginInfo* RebinningCutter_GetViewerInfo() -{ - RebinningCutterViewerPluginInfo::InitializeGlobalObjects(); - return new RebinningCutterViewerPluginInfo; -} - -// -// Storage for static data elements. -// -RebinningCutterAttributes *RebinningCutterViewerPluginInfo::clientAtts = NULL; -RebinningCutterAttributes *RebinningCutterViewerPluginInfo::defaultAtts = NULL; - -// **************************************************************************** -// Method: RebinningCutterViewerPluginInfo::InitializeGlobalObjects -// -// Purpose: -// Initialize the operator atts. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** -void -RebinningCutterViewerPluginInfo::InitializeGlobalObjects() -{ - RebinningCutterViewerPluginInfo::clientAtts = new RebinningCutterAttributes; - RebinningCutterViewerPluginInfo::defaultAtts = new RebinningCutterAttributes; -} - -// **************************************************************************** -// Method: RebinningCutterViewerPluginInfo::GetClientAtts -// -// Purpose: -// Return a pointer to the viewer client attributes. -// -// Returns: A pointer to the viewer client attributes. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -AttributeSubject * -RebinningCutterViewerPluginInfo::GetClientAtts() -{ - return clientAtts; -} - -// **************************************************************************** -// Method: RebinningCutterViewerPluginInfo::GetDefaultAtts -// -// Purpose: -// Return a pointer to the viewer default attributes. -// -// Returns: A pointer to the viewer default attributes. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -AttributeSubject * -RebinningCutterViewerPluginInfo::GetDefaultAtts() -{ - return defaultAtts; -} - -// **************************************************************************** -// Method: RebinningCutterViewerPluginInfo::SetClientAtts -// -// Purpose: -// Set the viewer client attributes. -// -// Arguments: -// atts A pointer to the new client attributes. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -void -RebinningCutterViewerPluginInfo::SetClientAtts(AttributeSubject *atts) -{ - *clientAtts = *(RebinningCutterAttributes *)atts; - clientAtts->Notify(); -} - -// **************************************************************************** -// Method: RebinningCutterViewerPluginInfo::GetClientAtts -// -// Purpose: -// Get the viewer client attributes. -// -// Arguments: -// atts A pointer to return the client default attributes in. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -void -RebinningCutterViewerPluginInfo::GetClientAtts(AttributeSubject *atts) -{ - *(RebinningCutterAttributes *)atts = *clientAtts; -} - -// **************************************************************************** -// Method: RebinningCutterViewerPluginInfo::InitializeOperatorAtts -// -// Purpose: -// Initialize the operator attributes to the default attributes. -// -// Arguments: -// atts The attribute subject to initialize. -// plot The viewer plot that owns the operator. -// fromDefault True to initialize the attributes from the defaults. False -// to initialize from the current attributes. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -void -RebinningCutterViewerPluginInfo::InitializeOperatorAtts(AttributeSubject *atts, - const ViewerPlot *plot, - const bool fromDefault) -{ - if (fromDefault) - *(RebinningCutterAttributes*)atts = *defaultAtts; - else - *(RebinningCutterAttributes*)atts = *clientAtts; -} -// **************************************************************************** -// Method: RebinningCutterViewerPluginInfo::GetMenuName -// -// Purpose: -// Return a pointer to the name to use in the viewer menus. -// -// Returns: A pointer to the name to use in the viewer menus. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -QString * -RebinningCutterViewerPluginInfo::GetMenuName() const -{ - return new QString(qApp->translate("OperatorNames", "Rebinning Cutter")); -} - -// **************************************************************************** -// Method: RebinningCutterViewerPluginInfo::XPMIconData -// -// Purpose: -// Return a pointer to the icon data. -// -// Returns: A pointer to the icon data. -// -// Programmer: generated by xml2info -// Creation: omitted -// -// **************************************************************************** - -#include <RebinningCutter.xpm> -const char ** -RebinningCutterViewerPluginInfo::XPMIconData() const -{ - return RebinningCutter_xpm; -} - diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/VisITProgressAction.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/VisITProgressAction.C deleted file mode 100644 index 5ed66e0be00..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/VisITProgressAction.C +++ /dev/null @@ -1,20 +0,0 @@ - -#include "VisITProgressAction.h" -#include "avtRebinningCutterFilter.h" - -namespace Mantid -{ -namespace VATES -{ - -VisITProgressAction::VisITProgressAction(avtRebinningCutterFilter* filter) : m_filter(filter) -{ -} - -void VisITProgressAction::eventRaised(int progressPercent) -{ - m_filter->UpdateAlgorithmProgress(progressPercent); -} - -} -} diff --git a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/avtRebinningCutterFilter.C b/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/avtRebinningCutterFilter.C deleted file mode 100644 index 2ccd1d009ae..00000000000 --- a/Code/Mantid/Vates/VisitPlugins/RebinningCutterOperator/src/avtRebinningCutterFilter.C +++ /dev/null @@ -1,445 +0,0 @@ -/***************************************************************************** - * - * Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC - * Produced at the Lawrence Livermore National Laboratory - * LLNL-CODE-442911 - * All rights reserved. - * - * This file is part of VisIt. For details, see https://visit.llnl.gov/. The - * full copyright notice is contained in the file COPYRIGHT located at the root - * of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer below. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the disclaimer (as noted below) in the - * documentation and/or other materials provided with the distribution. - * - Neither the name of the LLNS/LLNL nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, - * LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - *****************************************************************************/ - -// ************************************************************************* // -// File: avtRebinningCutterFilter.C -// ************************************************************************* // - -#include <avtRebinningCutterFilter.h> -#include <DebugStream.h> -#include <vtkVisItClipper.h> -#include <vtkCharArray.h> -#include <vtkFieldData.h> -#include <vtkDataSet.h> -#include <vtkCellData.h> -#include <avtExtents.h> -#include <avtDatasetVerifier.h> -#include "MantidMDAlgorithms/PlaneImplicitFunction.h" -#include "MantidMDAlgorithms/BoxImplicitFunction.h" -#include "MantidMDAlgorithms/NullImplicitFunction.h" -#include "MantidVatesAPI/RebinningCutterXMLDefinitions.h" -#include "MantidVatesAPI/vtkStructuredGridFactory.h" -#include "MantidVatesAPI/vtkThresholdingUnstructuredGridFactory.h" -#include "MantidVatesAPI/vtkProxyFactory.h" -#include "MantidVatesAPI/TimeStepToTimeStep.h" -#include <boost/functional/hash.hpp> -#include <sstream> -#include "VisITProgressAction.h" - -using namespace Mantid::VATES; - -// **************************************************************************** -// Method: avtRebinningCutterFilter constructor -// -// Programmer: spu92482 -- generated by xml2avt -// Creation: Fri Sep 24 18:04:29 PST 2010 -// -// **************************************************************************** - -avtRebinningCutterFilter::avtRebinningCutterFilter() : - m_presenter() -{ -} - -// **************************************************************************** -// Method: avtRebinningCutterFilter destructor -// -// Programmer: spu92482 -- generated by xml2avt -// Creation: Fri Sep 24 18:04:29 PST 2010 -// -// Modifications: -// -// **************************************************************************** - -avtRebinningCutterFilter::~avtRebinningCutterFilter() -{ - -} - -// **************************************************************************** -// Method: avtRebinningCutterFilter::Create -// -// Programmer: spu92482 -- generated by xml2avt -// Creation: Fri Sep 24 18:04:29 PST 2010 -// -// **************************************************************************** - -avtFilter * -avtRebinningCutterFilter::Create() -{ - avtRebinningCutterFilter* filter = new avtRebinningCutterFilter(); - return filter; -} - -// **************************************************************************** -// Method: avtRebinningCutterFilter::SetAtts -// -// Purpose: -// Sets the state of the filter based on the attribute object. -// -// Arguments: -// a The attributes to use. -// -// Programmer: spu92482 -- generated by xml2avt -// Creation: Fri Sep 24 18:04:29 PST 2010 -// -// **************************************************************************** - -void avtRebinningCutterFilter::SetAtts(const AttributeGroup *a) -{ - atts = *(const RebinningCutterAttributes*) a; -} - -// **************************************************************************** -// Method: avtRebinningCutterFilter::Equivalent -// -// Purpose: -// Returns true if creating a new avtRebinningCutterFilter with the given -// parameters would result in an equivalent avtRebinningCutterFilter. -// -// Programmer: spu92482 -- generated by xml2avt -// Creation: Fri Sep 24 18:04:29 PST 2010 -// -// **************************************************************************** - -bool avtRebinningCutterFilter::Equivalent(const AttributeGroup *a) -{ - return (atts == *(RebinningCutterAttributes*) a); -} - -Mantid::VATES::Dimension_sptr avtRebinningCutterFilter::getDimensionX(vtkDataSet* in_ds) const -{ - - if (atts.GetIsSetUp()) - { - return Mantid::VATES::createDimension(atts.GetDimensionXML()[0]); - } - else - { - return m_presenter.getXDimensionFromDS(in_ds); - } - -} - -Mantid::VATES::Dimension_sptr avtRebinningCutterFilter::getDimensionY(vtkDataSet* in_ds) const -{ - if (atts.GetIsSetUp()) - { - return Mantid::VATES::createDimension(atts.GetDimensionXML()[1]); - } - else - { - return m_presenter.getYDimensionFromDS(in_ds); - } -} - -Mantid::VATES::Dimension_sptr avtRebinningCutterFilter::getDimensionZ(vtkDataSet* in_ds) const -{ - if (atts.GetIsSetUp()) - { - return Mantid::VATES::createDimension(atts.GetDimensionXML()[2]); - } - else - { - return m_presenter.getZDimensionFromDS(in_ds); - } -} - -Mantid::VATES::Dimension_sptr avtRebinningCutterFilter::getDimensiont(vtkDataSet* in_ds) const -{ - return m_presenter.getTDimensionFromDS(in_ds); -} - -std::string avtRebinningCutterFilter::createHash() const -{ - size_t seed = 1; - boost::hash_combine(seed, atts.GetOriginX()); - boost::hash_combine(seed, atts.GetOriginY()); - boost::hash_combine(seed, atts.GetOriginZ()); - boost::hash_combine(seed, atts.GetNormalX()); - boost::hash_combine(seed, atts.GetNormalY()); - boost::hash_combine(seed, atts.GetNormalZ()); - boost::hash_combine(seed, atts.GetWidth()); - boost::hash_combine(seed, atts.GetHeight()); - boost::hash_combine(seed, atts.GetDepth()); - boost::hash_combine(seed, atts.GetStructured()); - boost::hash_combine(seed, atts.GetDimensionXML()); - std::stringstream sstream; - sstream << seed; - return sstream.str(); -} - -bool avtRebinningCutterFilter::anyPlaneApplied() const -{ - return ((atts.GetNormalX() != 0) || (atts.GetNormalY() != 0) || (atts.GetNormalZ() != 0)); -} - -boost::shared_ptr<Mantid::API::ImplicitFunction> avtRebinningCutterFilter::constructPlane() const -{ - using namespace Mantid::MDAlgorithms; - Mantid::API::ImplicitFunction* appliedFunction; - if (atts.GetIsSetUp() && anyPlaneApplied()) - { - NormalParameter normal(atts.GetNormalX(), atts.GetNormalY(), atts.GetNormalZ()); - OriginParameter origin(atts.GetOriginX(), atts.GetOriginY(), atts.GetOriginZ()); - UpParameter up(atts.GetUpX(), atts.GetUpY(), atts.GetUpZ()); - WidthParameter width(atts.GetWidth()); - appliedFunction = new PlaneImplicitFunction(normal, origin, up, width); - } - else - { - appliedFunction = new NullImplicitFunction; - } - return boost::shared_ptr<Mantid::API::ImplicitFunction>(appliedFunction); -} - -boost::shared_ptr<Mantid::API::ImplicitFunction> avtRebinningCutterFilter::constructBox( - Dimension_sptr spDimX, Dimension_sptr spDimY, Dimension_sptr spDimZ) const -{ - using namespace Mantid::MDAlgorithms; - BoxImplicitFunction* boxFunction; - if (atts.GetIsSetUp()) - { - //Create domain parameters. - OriginParameter originParam = OriginParameter(atts.GetOriginX(), atts.GetOriginY(), - atts.GetOriginZ()); - WidthParameter widthParam = WidthParameter(atts.GetWidth()); - HeightParameter heightParam = HeightParameter(atts.GetHeight()); - DepthParameter depthParam = DepthParameter(atts.GetDepth()); - - //Create the box. This is specific to this type of presenter and this type of filter. Other rebinning filters may use planes etc. - boxFunction = new BoxImplicitFunction(widthParam, heightParam, depthParam, originParam); - } - else - { - //Have to use dimension knowledge to construct box. - double originX = (spDimX->getMaximum() + spDimX->getMinimum()) / 2; - double originY = (spDimY->getMaximum() + spDimY->getMinimum()) / 2; - double originZ = (spDimZ->getMaximum() + spDimZ->getMinimum()) / 2; - double width = spDimX->getMaximum() - spDimX->getMinimum(); - double height = spDimY->getMaximum() - spDimY->getMinimum(); - double depth = spDimZ->getMaximum() - spDimZ->getMinimum(); - - //Create domain parameters. - OriginParameter originParam = OriginParameter(originX, originY, originZ); - WidthParameter widthParam = WidthParameter(width); - HeightParameter heightParam = HeightParameter(height); - DepthParameter depthParam = DepthParameter(depth); - - //Create the box. This is specific to this type of presenter and this type of filter. Other rebinning filters may use planes etc. - boxFunction = new BoxImplicitFunction(widthParam, heightParam, depthParam, originParam); - } - return boost::shared_ptr<Mantid::API::ImplicitFunction>(boxFunction); -} - -vtkDataSetFactory_sptr avtRebinningCutterFilter::createDataSetFactory( - Mantid::MDDataObjects::MDWorkspace_sptr spRebinnedWs) const -{ - //Interogate attributes to determine user selection. - using Mantid::MDDataObjects::MDImage; - vtkDataSetFactory* pvtkDataSetFactory; - TimeStepToTimeStep timeMapper; - if (atts.GetStructured()) - { - pvtkDataSetFactory = new vtkStructuredGridFactory<MDImage, TimeStepToTimeStep> (spRebinnedWs->get_spMDImage(), - XMLDefinitions::signalName(), m_timestep, timeMapper); - } - else - { - pvtkDataSetFactory = new vtkThresholdingUnstructuredGridFactory<MDImage, TimeStepToTimeStep> ( - spRebinnedWs->get_spMDImage(), XMLDefinitions::signalName(), m_timestep, timeMapper); - } - return vtkDataSetFactory_sptr(pvtkDataSetFactory); -} - -avtContract_p avtRebinningCutterFilter::ModifyContract(avtContract_p incontract) -{ - this->m_timestep = incontract->GetDataRequest()->GetTimestep(); - return incontract; -} - -RebinningIterationAction avtRebinningCutterFilter::decideIterationAction() -{ - vtkDataSet* cachedOutput = static_cast<vtkDataSet*> (FetchArbitraryVTKObject(DATA_DEPENDENCE, - this->createHash().c_str(), 0, 1, "VTK_DATASET")); - - void_ref_ptr ptr = FetchArbitraryRefPtr(DATA_DEPENDENCE,"timestep",0, 1, "INT" ); - - RebinningIterationAction action; - if(cachedOutput == NULL) - { - action = RecalculateAll; - } - else - { - int* oldtime = (int*)(*ptr); - if(*oldtime == m_timestep) - { - action = UseCache; // Use cache since there has been no change. - } - else - { - action = RecalculateVisualDataSetOnly; //Use original MDImage, but determine a new slice. - } - } - return action; -} - -void deleteTimeMarker(void* timeMarkerVoid) -{ - int* cachedmarker = (int*)timeMarkerVoid; - delete cachedmarker; -} - -void avtRebinningCutterFilter::Execute() -{ - using namespace Mantid::VATES; - using namespace Mantid::Geometry; - using namespace Mantid::MDDataObjects; - using namespace Mantid::MDAlgorithms; - - using Mantid::VATES::DimensionVec; - using Mantid::VATES::Dimension_sptr; - - avtDataTree_p tree = GetInputDataTree(); - int nLeaves; - vtkDataSet **leaves = tree->GetAllLeaves(nLeaves); - vtkDataSet *in_ds = leaves[0]; - - Dimension_sptr spDimX = getDimensionX(in_ds); - Dimension_sptr spDimY = getDimensionY(in_ds); - Dimension_sptr spDimZ = getDimensionZ(in_ds); - Dimension_sptr spDimt = getDimensiont(in_ds); - - DimensionVec dimensionsVec(4); - dimensionsVec[0]=spDimX; - dimensionsVec[1]=spDimY; - dimensionsVec[2]=spDimZ; - dimensionsVec[3]=spDimt; - - //Create the composite holder. - CompositeImplicitFunction* compFunction = new CompositeImplicitFunction; - compFunction->addFunction(constructBox(spDimX, spDimY, spDimZ)); - compFunction->addFunction(constructPlane()); - - // Construct reduction knowledge. - m_presenter.constructReductionKnowledge(dimensionsVec, spDimX, spDimY, spDimZ, spDimt, - compFunction, in_ds); - - //The action determines the level of caching available for optimisations. - RebinningIterationAction action = decideIterationAction(); - - - VisITProgressAction updatehandler(this); - - //Acutally perform rebinning or specified action. - MDWorkspace_sptr spRebinnedWs = m_presenter.applyRebinningAction(action, updatehandler); - - /// Create the dataset factory from the user selection. - vtkDataSet *output_ds; - if (UseCache == action) - { - vtkDataSet* cachedOutput = static_cast<vtkDataSet*> (FetchArbitraryVTKObject(DATA_DEPENDENCE, - this->createHash().c_str(), 0, 1, "VTK_DATASET")); - //Use existing visualisation image. - vtkDataSetFactory_sptr spvtkDataSetFactory(new vtkProxyFactory(cachedOutput)); - output_ds = m_presenter.createVisualDataSet(spvtkDataSetFactory); - output_ds->Register(NULL); - } - else - { - /// Use the dataset factory to draw an image and to persist metadata. - StoreArbitraryRefPtr(DATA_DEPENDENCE, "timestep", 0, 1, "INT", void_ref_ptr(new int(m_timestep), deleteTimeMarker)); - - vtkDataSetFactory_sptr spvtkDataSetFactory = createDataSetFactory(spRebinnedWs); - output_ds = m_presenter.createVisualDataSet(spvtkDataSetFactory); - - StoreArbitraryVTKObject(DATA_DEPENDENCE, this->createHash().c_str(), 0, 1, "VTK_DATASET", - output_ds); - } - - - output_ds->GetCellData()->SetActiveScalars(XMLDefinitions::signalName().c_str()); - avtDataTree* newTree = new avtDataTree(output_ds, 0); - SetOutputDataTree(newTree); - double newrange[2] = - { FLT_MAX, -FLT_MAX }; - double oldrange[2] = - { FLT_MAX, -FLT_MAX }; - GetDataRange(output_ds, newrange, XMLDefinitions::signalName().c_str(), false); - GetDataRange(in_ds, oldrange, XMLDefinitions::signalName().c_str(), false); - avtDataAttributes &dataAtts = GetOutput()->GetInfo().GetAttributes(); - dataAtts.GetThisProcsOriginalDataExtents(XMLDefinitions::signalName().c_str())->Set(oldrange); - dataAtts.GetThisProcsActualDataExtents(XMLDefinitions::signalName().c_str())->Set(newrange); - - //Persist the execution output geometry so that it can be dermined later in VisIT gui. - MapNode geometryXMLNode; - geometryXMLNode[XMLDefinitions::geometryNodeName()] = m_presenter.getWorkspaceGeometry(); - MapNode functionXMLNode; - functionXMLNode[XMLDefinitions::functionNodeName()] = m_presenter.getFunction()->toXMLString(); - - dataAtts.AddPlotInformation(XMLDefinitions::geometryOperatorInfo(), geometryXMLNode); - dataAtts.AddPlotInformation(XMLDefinitions::functionOperatorInfo(), functionXMLNode); - - dataAtts.SetXLabel(spDimX->getDimensionId()); - dataAtts.SetYLabel(spDimY->getDimensionId()); - dataAtts.SetZLabel(spDimZ->getDimensionId()); - - avtDatasetVerifier v; - vector<int> domains; - domains.push_back(0); - v.VerifyDatasets(1, &output_ds, domains); - -} - -void avtRebinningCutterFilter::UpdateDataObjectInfo(void) -{ - avtDataAttributes &dataAtts = GetOutput()->GetInfo().GetAttributes(); - int dim = 3; - dataAtts.SetTopologicalDimension(dim); - dataAtts.SetSpatialDimension(dim); -} - -void avtRebinningCutterFilter::UpdateAlgorithmProgress(int progressPercent) -{ - this->UpdateProgress(1, progressPercent); -} - - - - -- GitLab