Starting from 2021-07-01, all LRZ GitLab users will be required to explicitly accept the GitLab Terms of Service. Please see the detailed information at https://doku.lrz.de/display/PUBLIC/GitLab and make sure that your projects conform to the requirements.

Commit a26d11cb authored by Hossain Mahmud's avatar Hossain Mahmud
Browse files

removed extra files related to transfer function

parent 270fd747
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.Lua
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen
// Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#include "abstracttransferfunctionlua.h"
#include "core/classification/abstracttransferfunction.h"
#include "core/properties/transferfunctionproperty.h"
namespace campvis {
AbstractTransferFunctionLua::AbstractTransferFunctionLua(TransferFunctionProperty* prop, AbstractTransferFunction* tf)
: _tfProperty(prop)
, _transferFunction(tf)
{
}
AbstractTransferFunctionLua::~AbstractTransferFunctionLua() {
}
const TransferFunctionProperty::IntensityHistogramType* AbstractTransferFunctionLua::getIntensityHistogram() const {
return _tfProperty->getIntensityHistogram();
}
}
\ No newline at end of file
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen
// Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#ifndef ABSTRACTTRANSFERFUNCTIONLUA_H__
#define ABSTRACTTRANSFERFUNCTIONLUA_H__
#include "core/properties/transferfunctionproperty.h"
namespace campvis {
class AbstractProperty;
class AbstractTransferFunction;
/**
* Abstract base class for transfer function lua generators.
*/
class AbstractTransferFunctionLua {
public:
/**
* Creates a new transfer function lua for the for the AbstractTransferFunction \a tf.
* \param prop TransferFunctionProperty to generate the lua script for.
* \param tf The transfer function the lua script shall handle.
*/
AbstractTransferFunctionLua(TransferFunctionProperty* prop, AbstractTransferFunction* tf);
/**
* Destructor
*/
virtual ~AbstractTransferFunctionLua();
virtual std::string getLuaScript(std::string propNamePrefix, std::string luaProc) = 0;
protected:
const TransferFunctionProperty::IntensityHistogramType* getIntensityHistogram() const;
TransferFunctionProperty* _tfProperty; ///< The parent TransferFunctionProperty of this editor
AbstractTransferFunction* _transferFunction; ///< The transfer function this lua handles
private:
};
}
#endif // ABSTRACTTRANSFERFUNCTIONLUA_H__
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen
// Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#include "geometry1dtransferfunctionlua.h"
#include "cgt/assert.h"
#include "cgt/shadermanager.h"
#include "cgt/glcontextmanager.h"
#include "cgt/qt/qtthreadedcanvas.h"
#include "application/gui/qtcolortools.h"
#include "application/gui/properties/tfgeometrymanipulator.h"
#include "core/classification/geometry1dtransferfunction.h"
#include "core/classification/tfgeometry1d.h"
#include "core/datastructures/imagerepresentationlocal.h"
#include "core/properties/transferfunctionproperty.h"
namespace campvis {
Geometry1DTransferFunctionLua::Geometry1DTransferFunctionLua(TransferFunctionProperty* prop, Geometry1DTransferFunction* tf)
: AbstractTransferFunctionLua(prop, tf)
{
}
Geometry1DTransferFunctionLua::~Geometry1DTransferFunctionLua() {
}
std::string Geometry1DTransferFunctionLua::getLuaScript(std::string propNamePrefix, std::string luaProc) {
return "";
}
}
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen
// Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#ifndef GEOMETRY1DTRANSFERFUNCTIONLUA_H__
#define GEOMETRY1DTRANSFERFUNCTIONLUA_H__
#include "tbb/mutex.h"
#include "cgt/painter.h"
#include "cgt/event/eventlistener.h"
#include "core/classification/tfgeometry1d.h"
#include "abstracttransferfunctionlua.h"
namespace cgt {
class QtThreadedCanvas;
class Shader;
}
namespace campvis {
class ColorPickerWidget;
class Geometry1DTransferFunction;
class AbstractTFGeometryManipulator;
class WholeTFGeometryManipulator;
/**
* Lua generator for a Geometry1DTransferFunction.
*/
class Geometry1DTransferFunctionLua : public AbstractTransferFunctionLua {
public:
/**
* Creates a new lua generator for the TransferFunctionProperty \a property.
* \param prop TransferFunctionProperty to generate the lua for.
* \param tf The transfer function the lua shall handle.
*/
Geometry1DTransferFunctionLua(TransferFunctionProperty* prop, Geometry1DTransferFunction* tf);
/**
* Destructor
*/
virtual ~Geometry1DTransferFunctionLua();
std::string getLuaScript(std::string propNamePrefix, std::string luaProc);
};
}
#endif // GEOMETRY1DTRANSFERFUNCTIONLUA_H__
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen
// Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#include "geometry2dtransferfunctionlua.h"
#include "cgt/assert.h"
#include "cgt/shadermanager.h"
#include "cgt/glcontextmanager.h"
#include "cgt/qt/qtthreadedcanvas.h"
#include "application/gui/qtcolortools.h"
#include "application/gui/properties/tfgeometrymanipulator.h"
#include "core/classification/geometry2dtransferfunction.h"
#include "core/classification/tfgeometry2d.h"
#include "core/datastructures/imagerepresentationlocal.h"
#include "core/properties/transferfunctionproperty.h"
namespace campvis {
Geometry2DTransferFunctionLua::Geometry2DTransferFunctionLua(TransferFunctionProperty* prop, Geometry2DTransferFunction* tf)
: AbstractTransferFunctionLua(prop, tf)
{
}
Geometry2DTransferFunctionLua::~Geometry2DTransferFunctionLua() {
}
std::string Geometry2DTransferFunctionLua::getLuaScript(std::string propNamePrefix, std::string luaProc) {
return "";
}
}
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen
// Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#ifndef GEOMETRY2DTRANSFERFUNCTIONLUA_H__
#define GEOMETRY2DTRANSFERFUNCTIONLUA_H__
#include "tbb/mutex.h"
#include "cgt/painter.h"
#include "cgt/event/eventlistener.h"
#include "core/classification/tfgeometry2d.h"
#include "abstracttransferfunctionlua.h"
class QGridLayout;
class QLabel;
class QPushButton;
namespace tgt {
class QtThreadedCanvas;
class Shader;
}
namespace campvis {
class ColorPickerWidget;
class Geometry2DTransferFunction;
class AbstractTFGeometryManipulator;
class WholeTFGeometryManipulator;
/**
* Lua generator for a Geometry2DTransferFunction.
*/
class Geometry2DTransferFunctionLua : public AbstractTransferFunctionLua {
public:
/**
* Creates a new lua generator for the TransferFunctionProperty \a property.
* \param prop TransferFunctionProperty to generate the lua for.
* \param tf The transfer function the lua shall handle.
* \param parent Parent Qt widget
*/
Geometry2DTransferFunctionLua(TransferFunctionProperty* prop, Geometry2DTransferFunction* tf);
/**
* Destructor
*/
virtual ~Geometry2DTransferFunctionLua();
std::string getLuaScript(std::string propNamePrefix, std::string luaProc);
};
}
#endif // GEOMETRY2DTRANSFERFUNCTIONLUA_H__
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen
// Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#include "simpletransferfunctionlua.h"
#include "application/gui/qtcolortools.h"
#include "core/classification/simpletransferfunction.h"
#include "core/properties/transferfunctionproperty.h"
#include <QGridLayout>
#include <QLabel>
namespace campvis {
SimpleTransferFunctionLua::SimpleTransferFunctionLua(TransferFunctionProperty* prop, SimpleTransferFunction* tf)
: AbstractTransferFunctionLua(prop, tf) {
}
SimpleTransferFunctionLua::~SimpleTransferFunctionLua() {
}
std::string SimpleTransferFunctionLua::getLuaScript(std::string propNamePrefix, std::string luaProc) {
return "";
}
}
\ No newline at end of file
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen
// Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#ifndef SIMPLETRANSFERFUNCTIONLUA_H__
#define SIMPLETRANSFERFUNCTIONLUA_H__
#include "abstracttransferfunctionlua.h"
namespace campvis {
class SimpleTransferFunction;
/**
* Lua generator for a SimpleTransferFunction.
*/
class SimpleTransferFunctionLua : public AbstractTransferFunctionLua {
public:
/**
* Creates a new lua widget for the for the TransferFunctionProperty \a property.
* \param prop TransferFunctionProperty to generate the lua for.
* \param tf The transfer function the lua shall handle.
*/
SimpleTransferFunctionLua(TransferFunctionProperty* prop, SimpleTransferFunction* tf);
/**
* Destructor
*/
virtual ~SimpleTransferFunctionLua();
std::string getLuaScript(std::string propNamePrefix, std::string luaProc);
};
}
#endif // SIMPLETRANSFERFUNCTIONLUA_H__
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen
// Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#include "transferfunctionluafactory.h"
#include "abstracttransferfunctionlua.h"
#include "geometry1dtransferfunctionlua.h"
#include "geometry2dtransferfunctionlua.h"
#include "simpletransferfunctionlua.h"
#include "core/classification/abstracttransferfunction.h"
#include "core/classification/geometry1dtransferfunction.h"
#include "core/classification/geometry2dtransferfunction.h"
#include "core/classification/simpletransferfunction.h"
#include "core/properties/transferfunctionproperty.h"
namespace campvis {
AbstractTransferFunctionLua* TransferFunctionLuaFactory::createTransferFunctionLua(TransferFunctionProperty* prop) {
cgtAssert(prop != 0, "Property must not be 0.");
AbstractTransferFunction* tf = prop->getTF();
cgtAssert(tf != 0, "Transfer function must not be 0.");
if (SimpleTransferFunction* tester = dynamic_cast<SimpleTransferFunction*>(tf)) {
return new SimpleTransferFunctionLua(prop, tester);
}
if (Geometry1DTransferFunction* tester = dynamic_cast<Geometry1DTransferFunction*>(tf)) {
return new Geometry1DTransferFunctionLua(prop, tester);
}
if (Geometry2DTransferFunction* tester = dynamic_cast<Geometry2DTransferFunction*>(tf)) {
return new Geometry2DTransferFunctionLua(prop, tester);
}
return 0;
}
}
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen
// Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#ifndef TRANSFERFUNCTIONLUAFACTORY_H__
#define TRANSFERFUNCTIONLUAFACTORY_H__
namespace campvis {
class AbstractTransferFunction;
class AbstractTransferFunctionLua;
class TransferFunctionProperty;
/**
* Factory class offering the static method createLua to create transfer function editors
* for a given transfer function (depending on its type).
*/
class TransferFunctionLuaFactory {
public:
/**
* Creates the corresponding TransferFunctionLua for the given transfer function \a tf.
* \note The callee has to take the ownership of the returned pointer.
* \param prop TransferFunctionProperty to generate the editor for.
* \return A new transfer function editor for the given transfer function (depending on its type).
*/
static AbstractTransferFunctionLua* createTransferFunctionLua(TransferFunctionProperty* prop);
private:
/// Shall not instantiate
TransferFunctionLuaFactory();
};
}
#endif // TRANSFERFUNCTIONLUAFACTORY_H__
......@@ -24,7 +24,7 @@
#include "transferfunctionpropertylua.h"
#include "transferfunctionluafactory.h"
//#include "transferfunctionluafactory.h"
#include "core/tools/stringutils.h"
#include "core/classification/simpletransferfunction.h"
#include "core/classification/geometry1dtransferfunction.h"
......@@ -35,13 +35,13 @@
namespace campvis {
TransferFunctionPropertyLua::TransferFunctionPropertyLua(TransferFunctionProperty* property, DataContainer* dataContainer /*= nullptr*/)
: AbstractPropertyLua(property, dataContainer)
, _editor(0)
//, _editor(0)
{