Loading modules/devil/devil.cmake +2 −1 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ IF(${ModuleEnabled}) # Source files: FILE(GLOB ThisModSources RELATIVE ${ModulesDir} modules/devil/devil.cpp modules/devil/processors/*.cpp ) Loading modules/devil/devil.cpp 0 → 100644 +35 −0 Original line number Diff line number Diff line // ================================================================================================ // // 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 <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 "core/pipeline/processorfactory.h" #include "modules/devil/processors/devilimagereader.h" #include "modules/devil/processors/devilimagewriter.h" namespace campvis { template class SmartProcessorRegistrar<DevilImageReader>; template class SmartProcessorRegistrar<DevilImageWriter>; } No newline at end of file modules/devil/processors/devilimagereader.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ namespace campvis { : AbstractImageReader() , p_importType("ImportType", "Import Type", importOptions, 3) , p_importSimilar("ImportSimilar", "Import All Similar Files", false) , p_voxelSpacing("VoxelSpacing", "Pixel/Voxel Spacing", cgt::vec3(1.0f), cgt::vec3(0.0f), cgt::vec3(1e9f)) , _shader(nullptr) { this->_ext.push_back("bmp"); Loading @@ -69,6 +70,7 @@ namespace campvis { addProperty(p_targetImageID); addProperty(p_importType); addProperty(p_importSimilar); addProperty(p_voxelSpacing); } DevilImageReader::~DevilImageReader() { Loading @@ -94,6 +96,8 @@ namespace campvis { size_t suffixPos = base.find_last_not_of("0123456789"); if (suffixPos != std::string::npos) ++suffixPos; else if(!base.empty()) suffixPos = 0; size_t suffixLength = (suffixPos == std::string::npos) ? 0 : base.length() - suffixPos; // assemble the list of files to read Loading Loading @@ -256,6 +260,7 @@ namespace campvis { data.addData(p_targetImageID.getValue(), rd); } else { id->setMappingInformation(ImageMappingInformation(imageSize, cgt::vec3(0.0f), p_voxelSpacing.getValue())); data.addData(p_targetImageID.getValue(), id); } } Loading modules/devil/processors/devilimagereader.h +7 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #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" Loading Loading @@ -65,6 +66,11 @@ namespace campvis { /// \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 { return "DevilImageReader"; }; /// \see AbstractProcessor::getDescription() Loading @@ -76,6 +82,7 @@ namespace campvis { GenericOptionProperty<std::string> p_importType; BoolProperty p_importSimilar; Vec3Property p_voxelSpacing; protected: /// \see AbstractProcessor::updateResult Loading modules/devil/processors/devilimagewriter.h +5 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,11 @@ namespace campvis { **/ virtual ~DevilImageWriter(); /** * To be used in ProcessorFactory static methods */ static const std::string getId() { return "DevILImageWriter"; }; /// \see AbstractProcessor::getName() virtual const std::string getName() const { return "DevilImageWriter"; }; /// \see AbstractProcessor::getDescription() Loading Loading
modules/devil/devil.cmake +2 −1 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ IF(${ModuleEnabled}) # Source files: FILE(GLOB ThisModSources RELATIVE ${ModulesDir} modules/devil/devil.cpp modules/devil/processors/*.cpp ) Loading
modules/devil/devil.cpp 0 → 100644 +35 −0 Original line number Diff line number Diff line // ================================================================================================ // // 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 <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 "core/pipeline/processorfactory.h" #include "modules/devil/processors/devilimagereader.h" #include "modules/devil/processors/devilimagewriter.h" namespace campvis { template class SmartProcessorRegistrar<DevilImageReader>; template class SmartProcessorRegistrar<DevilImageWriter>; } No newline at end of file
modules/devil/processors/devilimagereader.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ namespace campvis { : AbstractImageReader() , p_importType("ImportType", "Import Type", importOptions, 3) , p_importSimilar("ImportSimilar", "Import All Similar Files", false) , p_voxelSpacing("VoxelSpacing", "Pixel/Voxel Spacing", cgt::vec3(1.0f), cgt::vec3(0.0f), cgt::vec3(1e9f)) , _shader(nullptr) { this->_ext.push_back("bmp"); Loading @@ -69,6 +70,7 @@ namespace campvis { addProperty(p_targetImageID); addProperty(p_importType); addProperty(p_importSimilar); addProperty(p_voxelSpacing); } DevilImageReader::~DevilImageReader() { Loading @@ -94,6 +96,8 @@ namespace campvis { size_t suffixPos = base.find_last_not_of("0123456789"); if (suffixPos != std::string::npos) ++suffixPos; else if(!base.empty()) suffixPos = 0; size_t suffixLength = (suffixPos == std::string::npos) ? 0 : base.length() - suffixPos; // assemble the list of files to read Loading Loading @@ -256,6 +260,7 @@ namespace campvis { data.addData(p_targetImageID.getValue(), rd); } else { id->setMappingInformation(ImageMappingInformation(imageSize, cgt::vec3(0.0f), p_voxelSpacing.getValue())); data.addData(p_targetImageID.getValue(), id); } } Loading
modules/devil/processors/devilimagereader.h +7 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #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" Loading Loading @@ -65,6 +66,11 @@ namespace campvis { /// \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 { return "DevilImageReader"; }; /// \see AbstractProcessor::getDescription() Loading @@ -76,6 +82,7 @@ namespace campvis { GenericOptionProperty<std::string> p_importType; BoolProperty p_importSimilar; Vec3Property p_voxelSpacing; protected: /// \see AbstractProcessor::updateResult Loading
modules/devil/processors/devilimagewriter.h +5 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,11 @@ namespace campvis { **/ virtual ~DevilImageWriter(); /** * To be used in ProcessorFactory static methods */ static const std::string getId() { return "DevILImageWriter"; }; /// \see AbstractProcessor::getName() virtual const std::string getName() const { return "DevilImageWriter"; }; /// \see AbstractProcessor::getDescription() Loading