// ================================================================================================ // // This file is part of the CAMPVis Software Framework. // // If not explicitly stated otherwise: Copyright (C) 2012-2015, all rights reserved, // Christian Schulte zu Berge // 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 DEVILIMAGEREADER_H__ #define DEVILIMAGEREADER_H__ #include #include "core/properties/datanameproperty.h" #include "core/properties/genericproperty.h" #include "core/properties/optionproperty.h" #include "core/properties/stringproperty.h" #include "core/properties/numericproperty.h" #include "modules/modulesapi.h" #include "modules/io/processors/abstractimagereader.h" namespace cgt { class Shader; } namespace campvis { /** * Reads an image file into the pipeline using the DevIL library. * DevIL supports most common 2D image formats. * * \note Full list of supported formats: http://openil.sourceforge.net/features.php */ class CAMPVIS_MODULES_API DevilImageReader : public AbstractImageReader { public: enum class DevILFilterType { NONE, BLUR_AVG, BLUR_GAUSSIAN, EDGEDETECT_P, EDGEDETECT_S, EMBOSS, GAMMACORRECT, NEGATIVE, NOISE, PIXELIZE, SHARPEN, EQUALIZE }; /** * Constructs a new DevilImageReader Processor **/ DevilImageReader(); /** * Destructor **/ virtual ~DevilImageReader(); /// \see AbstractProcessor::init virtual void init(); /// \see AbstractProcessor::deinit virtual void deinit(); /** * To be used in ProcessorFactory static methods */ static const std::string getId() { return "DevILImageReader"; }; /// \see AbstractProcessor::getName() virtual const std::string getName() const override { return "DevilImageReader"; }; /// \see AbstractProcessor::getDescription() virtual const std::string getDescription() const override { return "Reads an image file into the pipeline using the DevIL library."; }; /// \see AbstractProcessor::getAuthor() virtual const std::string getAuthor() const override { return "Christian Schulte zu Berge "; }; /// \see AbstractProcessor::getProcessorState() virtual ProcessorState getProcessorState() const override { return AbstractProcessor::EXPERIMENTAL; }; GenericOptionProperty p_importType; BoolProperty p_importSimilar; Vec3Property p_voxelSpacing; GenericOptionProperty p_imageFilter; IntProperty p_iterations; FloatProperty p_gamma; IntProperty p_pixelizationSize; FloatProperty p_sharpeningFactor; protected: /// \see AbstractProcessor::updateResult virtual void updateResult(DataContainer& dataContainer) override; void applyFilter(DevILFilterType filterType); /// \see AbstractProcessor::updateProperties virtual void updateProperties(DataContainer& dataContainer) override; static const std::string loggerCat_; }; } #endif // DEVILIMAGEREADER_H__