diff --git a/Modules/Annotation/files.cmake b/Modules/Annotation/files.cmake index 7758a2a5a0..f8518740e5 100644 --- a/Modules/Annotation/files.cmake +++ b/Modules/Annotation/files.cmake @@ -1,21 +1,23 @@ file(GLOB_RECURSE H_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/include/*") set(CPP_FILES mitkManualPlacementAnnotationRenderer.cpp mitkColorBarAnnotation.cpp mitkLabelAnnotation3D.cpp mitkLogoAnnotation.cpp mitkLayoutAnnotationRenderer.cpp mitkScaleLegendAnnotation.cpp mitkTextAnnotation2D.cpp mitkTextAnnotation3D.cpp mitkVtkLogoRepresentation.cxx mitkVtkAnnotation.cpp mitkVtkAnnotation2D.cpp mitkVtkAnnotation3D.cpp mitkAnnotationFactory.cpp + mitkAnnotationJsonReaderWriter.cpp + mitkStdAnnotationDataProviders.cpp mitkDynamicAnnotation.cpp mitkDataProvider.cpp mitkProviderRegistry.cpp ) diff --git a/Modules/Annotation/include/mitkAnnotationJsonReaderWriter.h b/Modules/Annotation/include/mitkAnnotationJsonReaderWriter.h index 92ebb4bdfd..3f28727663 100644 --- a/Modules/Annotation/include/mitkAnnotationJsonReaderWriter.h +++ b/Modules/Annotation/include/mitkAnnotationJsonReaderWriter.h @@ -1,119 +1,47 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKANNOTATIONJSONREADERWRITER_H #define MITKANNOTATIONJSONREADERWRITER_H #include "mitkDynamicAnnotation.h" #include #include #include namespace mitk { // TODO simplify ReaderWriter to only take and produce configurations instead of full objects - class AnnotationJsonReaderWriter + class MITKANNOTATION_EXPORT AnnotationJsonReaderWriter { public: - static std::vector ReadAnnotationsFromJsonFile(const std::string &fileName); + using AnnotationConfig = std::unordered_map; + static std::vector ReadAnnotationsFromJsonFile(const std::string &fileName); static void WriteAnnotationsToJsonFile(const std::string &fileName, std::vector annotations); + static void WriteAnnotationsToJsonFile(const std::string &fileName, + std::vector configurations); private: - static void AddAnnotationsToRootJsonElement(boost::property_tree::ptree &tree, + static void AddAnnotationsToRootJsonElement(boost::property_tree::ptree &root, const std::vector &annotations); + static void AddConfigToRootJsonElement(boost::property_tree::ptree &root, + const AnnotationConfig& config); }; - - inline std::vector AnnotationJsonReaderWriter::ReadAnnotationsFromJsonFile( - const std::string &fileName) - { - boost::property_tree::ptree root; - read_json(fileName, root); - - std::vector annotations; - - auto elements = root.begin(); - if (elements->first == "annotations") - { - for (const auto &window : elements->second) - { - for (const auto &layout : window.second) - { - for (const auto &object : layout.second) - { - auto config = std::unordered_map{}; - config[AnnotationConstants::WINDOW] = window.first; - config[AnnotationConstants::LAYOUT] = layout.first; - for (const auto &property : object.second) - { - config[property.first] = property.second.get_value(); - } - if (config[AnnotationConstants::DEFAULT].empty()) - { - config[AnnotationConstants::DEFAULT] = config[AnnotationConstants::NAME]; - } - annotations.push_back(DynamicAnnotation::New(config)); - } - } - } - } - return annotations; - } - - inline void AnnotationJsonReaderWriter::WriteAnnotationsToJsonFile( - const std::string &fileName, std::vector annotations) - { - using boost::property_tree::ptree; - ptree root; - AddAnnotationsToRootJsonElement(root, annotations); - - ofstream out; - out.open(fileName); - if (out.is_open()) - { - boost::property_tree::write_json(out, root); - } - else - { - MITK_ERROR << "Error opening file"; - } - } - - inline void AnnotationJsonReaderWriter::AddAnnotationsToRootJsonElement( - boost::property_tree::ptree &root, const std::vector &annotations) - { - using boost::property_tree::ptree; - for (const auto &annotation : annotations) - { - const auto &window = annotation->ConfigEntry(AnnotationConstants::WINDOW); - const auto &layout = annotation->ConfigEntry(AnnotationConstants::LAYOUT); - const ptree::path_type path{"annotations:" + window + ":" + layout, ':'}; - ptree object; - for (const auto &pair : annotation->GetConfiguration()) - { - if (pair.first == AnnotationConstants::WINDOW || pair.first == AnnotationConstants::LAYOUT) - continue; - object.put(pair.first, pair.second); - } - ptree layoutNode = root.get_child_optional(path).has_value() ? root.get_child(path) : ptree{}; - layoutNode.push_back(std::make_pair("", object)); - root.put_child(path, layoutNode); - } - } } // namespace mitk #endif // MITKANNOTATIONJSONREADERWRITER_H diff --git a/Modules/Annotation/include/mitkStdAnnotationDataProviders.h b/Modules/Annotation/include/mitkStdAnnotationDataProviders.h index 0c428933f7..956c896cf1 100644 --- a/Modules/Annotation/include/mitkStdAnnotationDataProviders.h +++ b/Modules/Annotation/include/mitkStdAnnotationDataProviders.h @@ -1,21 +1,39 @@ -#pragma once +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#ifndef MITKSTDANNOTATIONDATAPROVIDERS_H +#define MITKSTDANNOTATIONDATAPROVIDERS_H #include "mitkDataProvider.h" namespace mitk { - class AnnotationDataProviderFactory + class MITKANNOTATION_EXPORT AnnotationDataProviderFactory { public: static DataProvider::OnEventAction StdSliceAction(); static DataProvider::OnEventAction StdTimeAction(); static mitk::DataProvider::Pointer DefaultSliceNumberProvider(std::string providerName = "SliceNumberProviderAxial", const std::string &rendererId = "stdmulti.widget1"); static mitk::DataProvider::Pointer DefaultTimeStepProvider(std::string providerName = "TimeStepProviderAxial", const std::string &rendererId = "stdmulti.widget1"); static mitk::DataProvider::Pointer DefaultDataNodeProvider(std::string providerName, itk::Object::Pointer selectionListener, const itk::EventObject *event, DataProvider::OnEventAction selectionChangedAction); }; } // namespace mitk +#endif // MITKSTDANNOTATIONDATAPROVIDERS_H diff --git a/Modules/Annotation/src/mitkAnnotationFactory.cpp b/Modules/Annotation/src/mitkAnnotationFactory.cpp index 6c84bc60ff..0ed2ca1d4d 100644 --- a/Modules/Annotation/src/mitkAnnotationFactory.cpp +++ b/Modules/Annotation/src/mitkAnnotationFactory.cpp @@ -1,183 +1,187 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkAnnotationFactory.h" #include "mitkColorBarAnnotation.h" #include "mitkLayoutAnnotationRenderer.h" #include "mitkLogoAnnotation.h" #include "mitkScaleLegendAnnotation.h" #include "mitkTemporoSpatialStringProperty.h" #include "mitkTextAnnotation2D.h" #include mitk::LayoutAnnotationRenderer::Alignment mitk::AnnotationFactory::GetAlignment(const std::string &alignmentName) { static const auto alignmentMap = std::unordered_map{ {"TopLeft", LayoutAnnotationRenderer::TopLeft}, {"Top", LayoutAnnotationRenderer::Top}, {"TopRight", LayoutAnnotationRenderer::TopRight}, {"Left", LayoutAnnotationRenderer::Left}, {"Right", LayoutAnnotationRenderer::Right}, {"BottomLeft", LayoutAnnotationRenderer::BottomLeft}, {"Bottom", LayoutAnnotationRenderer::Bottom}, {"BottomRight", LayoutAnnotationRenderer::BottomRight}}; const auto alignment = alignmentMap.find(alignmentName); const auto &defaultFallback = "TopLeft"; return alignment != std::end(alignmentMap) ? alignment->second : alignmentMap.at(defaultFallback); } auto PropertyChangeAction() { return [](const itk::Object *caller, // needed to listen to modified events on the property itself const itk::EventObject &event, std::unordered_map dependencyValues) { // stored as additional information on provider creation auto propName = boost::any_cast(dependencyValues["PropName"]); // stored as part of provider dependency if (dependencyValues["DataNodeProvider"].type() == typeid(mitk::DataNode::Pointer)) { auto node = boost::any_cast(dependencyValues["DataNodeProvider"]); auto prop = node->GetProperty(propName.c_str()); if (prop) { // in case the data node changed update it on "yourself" auto provider = boost::any_cast(dependencyValues["Self"]); provider->SetProviderObject(prop); return prop->GetValueAsString(); } } return std::string{}; }; } auto TemporoSpatialPropertyChangeAction() { return [](const itk::Object *caller, // needed to listen to modified events on the property itself const itk::EventObject &event, std::unordered_map dependencyValues) { // stored as additional information on provider creation auto propName = boost::any_cast(dependencyValues["PropName"]); // stored as part of provider dependency if (dependencyValues["DataNodeProvider"].type() == typeid(mitk::DataNode::Pointer)) { auto node = boost::any_cast(dependencyValues["DataNodeProvider"]); auto prop = dynamic_cast(node->GetProperty(propName.c_str())); if (prop) { // in case the data node changed update it on "yourself" auto provider = boost::any_cast(dependencyValues["Self"]); provider->SetProviderObject(prop); // get slice data from provider dependency auto slice = 0; if (dependencyValues.find("SliceNumberProviderAxial") != std::end(dependencyValues)) { if (dependencyValues["SliceNumberProviderAxial"].type() == typeid(unsigned int)) { slice = boost::any_cast(dependencyValues["SliceNumberProviderAxial"]); } } return prop->GetValueBySlice(slice); } + return std::string{"Property " + propName + " not found"}; } return std::string{"No data node selected"}; }; } mitk::AnnotationFactory::AnnotationPtrVector mitk::AnnotationFactory::CreateAnnotationsFromConfiguration( const AnnotationConfigVector &configurations) { auto result = AnnotationPtrVector{}; for (auto &config : configurations) { auto annotation = DynamicAnnotation::New(config); result.push_back(annotation); const auto &type = annotation->ConfigEntry(AnnotationConstants::TYPE); if (type == "text") { annotation->SetManagedAnnotation(mitk::TextAnnotation2D::New().GetPointer()); + annotation->SetText(annotation->ConfigEntry(AnnotationConstants::DEFAULT)); } else if (type == "property") { annotation->SetManagedAnnotation(mitk::TextAnnotation2D::New().GetPointer()); + annotation->SetText(annotation->ConfigEntry(AnnotationConstants::DEFAULT)); auto propertyProvider = DataProvider::New("PropertyProvider", nullptr, itk::ModifiedEvent().MakeObject(), PropertyChangeAction(), {"DataNodeProvider"}, {{"PropName", annotation->ConfigEntry(AnnotationConstants::PROVIDER)}}); annotation->SetDataProvider(propertyProvider); } else if (type == "dicomProperty") { annotation->SetManagedAnnotation(mitk::TextAnnotation2D::New().GetPointer()); + annotation->SetText(annotation->ConfigEntry(AnnotationConstants::DEFAULT)); auto propertyProvider = DataProvider::New("PropertyProvider", nullptr, itk::ModifiedEvent().MakeObject(), TemporoSpatialPropertyChangeAction(), {"DataNodeProvider", "SliceNumberProviderAxial", "TimeStepProvider"}, {{"PropName", annotation->ConfigEntry(AnnotationConstants::PROVIDER)}}); annotation->SetDataProvider(propertyProvider); } else if (type == "colorBar") { annotation->SetManagedAnnotation(ColorBarAnnotation::New().GetPointer()); } else if (type == "scaleLegend") { annotation->SetManagedAnnotation(ScaleLegendAnnotation::New().GetPointer()); } else if (type == "logo") { auto logoAnnotation = LogoAnnotation::New(); auto path = annotation->ConfigEntry(AnnotationConstants::PATH); logoAnnotation->SetLogoImagePath(path); logoAnnotation->LoadLogoImageFromPath(); annotation->SetManagedAnnotation(logoAnnotation.GetPointer()); } else { throw std::logic_error("Unknown or missing annotation type"); } } return result; } void mitk::AnnotationFactory::RegisterAnnotations(const AnnotationPtrVector &annotations) { for (const auto &annotation : annotations) { const auto alignment = GetAlignment(annotation->ConfigEntry(AnnotationConstants::LAYOUT)); const auto renderer = BaseRenderer::GetByName(annotation->ConfigEntry(AnnotationConstants::WINDOW)); if (renderer) { LayoutAnnotationRenderer::AddAnnotation(annotation->GetManagedAnnotation(), renderer, alignment); // TODO wait so each annotation gets a unique id see T25927 std::this_thread::sleep_for(std::chrono::seconds(2)); } } } diff --git a/Modules/Annotation/src/mitkAnnotationJsonReaderWriter.cpp b/Modules/Annotation/src/mitkAnnotationJsonReaderWriter.cpp new file mode 100644 index 0000000000..95b90173ff --- /dev/null +++ b/Modules/Annotation/src/mitkAnnotationJsonReaderWriter.cpp @@ -0,0 +1,94 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "mitkAnnotationJsonReaderWriter.h" + +std::vector + mitk::AnnotationJsonReaderWriter::ReadAnnotationsFromJsonFile(const std::string &fileName) +{ + boost::property_tree::ptree root; + read_json(fileName, root); + + std::vector configurations; + + auto elements = root.begin(); + if (elements->first == "annotations") + { + for (const auto &window : elements->second) + { + for (const auto &layout : window.second) + { + for (const auto &object : layout.second) + { + auto config = AnnotationConfig{}; + config[AnnotationConstants::WINDOW] = window.first; + config[AnnotationConstants::LAYOUT] = layout.first; + for (const auto &property : object.second) + { + config[property.first] = property.second.get_value(); + } + if (config[AnnotationConstants::DEFAULT].empty()) + { + config[AnnotationConstants::DEFAULT] = config[AnnotationConstants::NAME]; + } + configurations.push_back(config); + } + } + } + } + return configurations; +} + +void mitk::AnnotationJsonReaderWriter::WriteAnnotationsToJsonFile(const std::string &fileName, + std::vector annotations) +{ + using boost::property_tree::ptree; + ptree root; + AddAnnotationsToRootJsonElement(root, annotations); + + ofstream out; + out.open(fileName); + if (out.is_open()) + { + boost::property_tree::write_json(out, root); + } + else + { + MITK_ERROR << "Error opening file"; + } +} + +void mitk::AnnotationJsonReaderWriter::AddAnnotationsToRootJsonElement( + boost::property_tree::ptree &root, const std::vector &annotations) +{ + using boost::property_tree::ptree; + for (const auto &annotation : annotations) + { + const auto &window = annotation->ConfigEntry(AnnotationConstants::WINDOW); + const auto &layout = annotation->ConfigEntry(AnnotationConstants::LAYOUT); + const ptree::path_type path{"annotations:" + window + ":" + layout, ':'}; + ptree object; + for (const auto &pair : annotation->GetConfiguration()) + { + if (pair.first == AnnotationConstants::WINDOW || pair.first == AnnotationConstants::LAYOUT) + continue; + object.put(pair.first, pair.second); + } + ptree layoutNode = root.get_child_optional(path).has_value() ? root.get_child(path) : ptree{}; + layoutNode.push_back(std::make_pair("", object)); + root.put_child(path, layoutNode); + } +} \ No newline at end of file diff --git a/Modules/Annotation/src/mitkStdAnnotationDataProviders.cpp b/Modules/Annotation/src/mitkStdAnnotationDataProviders.cpp index f04af619f6..dfbcb612c6 100644 --- a/Modules/Annotation/src/mitkStdAnnotationDataProviders.cpp +++ b/Modules/Annotation/src/mitkStdAnnotationDataProviders.cpp @@ -1,52 +1,68 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + #include "mitkStdAnnotationDataProviders.h" mitk::DataProvider::OnEventAction mitk::AnnotationDataProviderFactory::StdSliceAction() { return [](const itk::Object *caller, const itk::EventObject &event) { const auto sliceEvent = dynamic_cast(&event); if (sliceEvent) { return sliceEvent->GetPos(); } return static_cast(0); }; } mitk::DataProvider::OnEventAction mitk::AnnotationDataProviderFactory::StdTimeAction() { return [](const itk::Object *caller, const itk::EventObject &event) { const auto sliceEvent = dynamic_cast(&event); if (sliceEvent) { return sliceEvent->GetPos(); } return static_cast(0); }; } mitk::DataProvider::Pointer mitk::AnnotationDataProviderFactory::DefaultSliceNumberProvider( std::string providerName, const std::string &rendererId) { return DataProvider::New(std::move(providerName), BaseRenderer::GetByName(rendererId)->GetSliceNavigationController(), SliceNavigationController::GeometrySliceEvent(nullptr, 0).MakeObject(), StdSliceAction()); } mitk::DataProvider::Pointer mitk::AnnotationDataProviderFactory::DefaultTimeStepProvider(std::string providerName, const std::string &rendererId) { return DataProvider::New(std::move(providerName), BaseRenderer::GetByName(rendererId)->GetSliceNavigationController(), SliceNavigationController::TimeGeometryEvent(nullptr, 0).MakeObject(), StdTimeAction()); } mitk::DataProvider::Pointer mitk::AnnotationDataProviderFactory::DefaultDataNodeProvider( std::string providerName, itk::Object::Pointer selectionListener, const itk::EventObject *event, DataProvider::OnEventAction selectionChangedAction) { return DataProvider::New(std::move(providerName), selectionListener, event, selectionChangedAction); } \ No newline at end of file diff --git a/Plugins/org.mitk.annotations/files.cmake b/Plugins/org.mitk.annotations/files.cmake index df873bee1e..7a3448f727 100644 --- a/Plugins/org.mitk.annotations/files.cmake +++ b/Plugins/org.mitk.annotations/files.cmake @@ -1,31 +1,35 @@ set(MOC_H_FILES src/internal/mitkAnnotationsActivator.h + src/internal/mitkAnnotationNodeSelectionListener.h + src/internal/mitkAnnotationPresetLoader.h ) set(SRC_CPP_FILES ) set(INTERNAL_CPP_FILES mitkAnnotationsActivator.cpp + mitkAnnotationNodeSelectionListener.cpp + mitkAnnotationPresetLoader.cpp ) set(CACHED_RESOURCE_FILES resources/annotations.json plugin.xml ) set(QRC_FILES resources/resources.qrc ) set(CPP_FILES ) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.annotations/src/mitkAnnotationNodeSelectionListener.cpp b/Plugins/org.mitk.annotations/src/internal/mitkAnnotationNodeSelectionListener.cpp similarity index 100% rename from Plugins/org.mitk.annotations/src/mitkAnnotationNodeSelectionListener.cpp rename to Plugins/org.mitk.annotations/src/internal/mitkAnnotationNodeSelectionListener.cpp diff --git a/Plugins/org.mitk.annotations/src/mitkAnnotationNodeSelectionListener.h b/Plugins/org.mitk.annotations/src/internal/mitkAnnotationNodeSelectionListener.h similarity index 100% rename from Plugins/org.mitk.annotations/src/mitkAnnotationNodeSelectionListener.h rename to Plugins/org.mitk.annotations/src/internal/mitkAnnotationNodeSelectionListener.h diff --git a/Plugins/org.mitk.annotations/src/mitkAnnotationPresetLoader.cpp b/Plugins/org.mitk.annotations/src/internal/mitkAnnotationPresetLoader.cpp similarity index 100% rename from Plugins/org.mitk.annotations/src/mitkAnnotationPresetLoader.cpp rename to Plugins/org.mitk.annotations/src/internal/mitkAnnotationPresetLoader.cpp diff --git a/Plugins/org.mitk.annotations/src/mitkAnnotationPresetLoader.h b/Plugins/org.mitk.annotations/src/internal/mitkAnnotationPresetLoader.h similarity index 99% rename from Plugins/org.mitk.annotations/src/mitkAnnotationPresetLoader.h rename to Plugins/org.mitk.annotations/src/internal/mitkAnnotationPresetLoader.h index 9233c360db..efdc612746 100644 --- a/Plugins/org.mitk.annotations/src/mitkAnnotationPresetLoader.h +++ b/Plugins/org.mitk.annotations/src/internal/mitkAnnotationPresetLoader.h @@ -1,37 +1,38 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ + #ifndef MITKANNOTATIONPRESETLOADER_H #define MITKANNOTATIONPRESETLOADER_H #include "mitkAnnotationNodeSelectionListener.h" #include "mitkDynamicAnnotation.h" #include namespace mitk { class AnnotationPresetLoader { public: static auto SelectionChangeAction(); void SetupDefaultProviders(); void SaveCurrentConfiguration(const std::string &fileName); void LoadPreset(const std::string &fileName); private: std::unique_ptr m_NodeSelectionListener; std::vector m_ManagedAnnotations; }; } // namespace mitk #endif // MITKANNOTATIONPRESETLOADER_H diff --git a/Plugins/org.mitk.annotations/src/internal/mitkAnnotationsActivator.cpp b/Plugins/org.mitk.annotations/src/internal/mitkAnnotationsActivator.cpp index 46ab461420..fef102465a 100644 --- a/Plugins/org.mitk.annotations/src/internal/mitkAnnotationsActivator.cpp +++ b/Plugins/org.mitk.annotations/src/internal/mitkAnnotationsActivator.cpp @@ -1,30 +1,30 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkAnnotationsActivator.h" #include "mitkAnnotationPresetLoader.h" void mitk::AnnotationsActivator::start(ctkPluginContext *context) { // TODO remove hardcoded string auto fileName = - std::string{R"(D:\Arbeit\Programming\mitk_m\Plugins\org.mitk.annotations\resources\annotationsReduced.json)"}; + std::string{R"(D:\Arbeit\Programming\mitk_m\Plugins\org.mitk.annotations\resources\annotations.json)"}; m_AnnotationPresetLoader = std::make_unique(); m_AnnotationPresetLoader->LoadPreset(fileName); } void mitk::AnnotationsActivator::stop(ctkPluginContext * /*context*/) {}