diff --git a/Modules/Annotation/include/mitkAnnotationConstants.h b/Modules/Annotation/include/mitkAnnotationConstants.h index 8ae13bac11..4ad099641f 100644 --- a/Modules/Annotation/include/mitkAnnotationConstants.h +++ b/Modules/Annotation/include/mitkAnnotationConstants.h @@ -1,39 +1,41 @@ /*=================================================================== 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 MITKANNOTATIONCONSTANTS_H #define MITKANNOTATIONCONSTANTS_H +#include "MitkAnnotationExports.h" #include +#include namespace mitk { - namespace AnnotationConstants + struct MITKANNOTATION_EXPORT AnnotationConstants { - const std::string &NAME(); // = "name"; - const std::string &DEFAULT(); // = "defaultValue"; - const std::string &PREFIX(); // = "prefix"; - const std::string &SUFFIX(); // = "suffix"; - const std::string &LAYOUT(); // = "layout"; - const std::string &TYPE(); // = "type"; - const std::string &PROVIDER(); // = "provider"; - const std::string &EVENT(); // = "event"; - const std::string &ACTION(); // = "action"; - const std::string &WINDOW(); // = "window"; - const std::string &SLICENAVIGATIONCONTROLLER(); // = "SliceNavigationController"; - const std::string &PATH(); // = "path"; - } // namespace AnnotationConstants + static const std::string &NAME(); // = "name"; + static const std::string &DEFAULT(); // = "defaultValue"; + static const std::string &PREFIX(); // = "prefix"; + static const std::string &SUFFIX(); // = "suffix"; + static const std::string &LAYOUT(); // = "layout"; + static const std::string &TYPE(); // = "type"; + static const std::string &PROVIDER(); // = "provider"; + static const std::string &EVENT(); // = "event"; + static const std::string &ACTION(); // = "action"; + static const std::string &WINDOW(); // = "window"; + + static const std::unordered_map &DEFAULT_VALUES(); + }; } // namespace mitk #endif // MITKANNOTATIONCONSTANTS_H diff --git a/Modules/Annotation/include/mitkAnnotationFactory.h b/Modules/Annotation/include/mitkAnnotationFactory.h index 8b90ae470c..965c44f95d 100644 --- a/Modules/Annotation/include/mitkAnnotationFactory.h +++ b/Modules/Annotation/include/mitkAnnotationFactory.h @@ -1,50 +1,48 @@ /*=================================================================== 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 MITKANNOTATIONFACTORY_H #define MITKANNOTATIONFACTORY_H // mitk #include "MitkAnnotationExports.h" #include "mitkAnnotation.h" #include "mitkDataProvider.h" #include "mitkLayoutAnnotationRenderer.h" // stl #include namespace mitk { class MITKANNOTATION_EXPORT AnnotationFactory { public: using AnnotationConfigVector = std::vector>; - using AnnotationProviderMap = std::map; + using AnnotationProviderMap = std::vector>; static AnnotationProviderMap CreateAnnotationsFromConfiguration(const AnnotationConfigVector &configurations); static void RegisterAnnotation(Annotation::Pointer annotation, const std::string &rendererId, const std::string &layout); private: static LayoutAnnotationRenderer::Alignment GetAlignment(const std::string &alignmentName); static std::string GetValueOrDefault(const std::unordered_map &config, const std::string &key); - - static const std::unordered_map defaults; }; } // namespace mitk #endif // MITKANNOTATIONFACTORY_H diff --git a/Modules/Annotation/src/mitkAnnotationConstants.cpp b/Modules/Annotation/src/mitkAnnotationConstants.cpp index 0db6fbd804..f7d46d40b4 100644 --- a/Modules/Annotation/src/mitkAnnotationConstants.cpp +++ b/Modules/Annotation/src/mitkAnnotationConstants.cpp @@ -1,89 +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 "mitkAnnotationConstants.h" -const std::string& mitk::AnnotationConstants::NAME() +const std::string &mitk::AnnotationConstants::NAME() { static const std::string s{"name"}; return s; } -const std::string& mitk::AnnotationConstants::DEFAULT() +const std::string &mitk::AnnotationConstants::DEFAULT() { static const std::string s{"default"}; return s; } -const std::string& mitk::AnnotationConstants::PREFIX() +const std::string &mitk::AnnotationConstants::PREFIX() { static const std::string s{"prefix"}; return s; } -const std::string& mitk::AnnotationConstants::SUFFIX() +const std::string &mitk::AnnotationConstants::SUFFIX() { static const std::string s{"suffix"}; return s; } -const std::string& mitk::AnnotationConstants::LAYOUT() +const std::string &mitk::AnnotationConstants::LAYOUT() { static const std::string s{"layout"}; return s; } -const std::string& mitk::AnnotationConstants::TYPE() +const std::string &mitk::AnnotationConstants::TYPE() { static const std::string s{"type"}; return s; } -const std::string& mitk::AnnotationConstants::PROVIDER() +const std::string &mitk::AnnotationConstants::PROVIDER() { static const std::string s{"provider"}; return s; } -const std::string& mitk::AnnotationConstants::EVENT() +const std::string &mitk::AnnotationConstants::EVENT() { static const std::string s{"event"}; return s; } -const std::string& mitk::AnnotationConstants::ACTION() +const std::string &mitk::AnnotationConstants::ACTION() { static const std::string s{"action"}; return s; } -const std::string& mitk::AnnotationConstants::WINDOW() +const std::string &mitk::AnnotationConstants::WINDOW() { static const std::string s{"window"}; return s; } -const std::string& mitk::AnnotationConstants::SLICENAVIGATIONCONTROLLER() +const std::unordered_map &mitk::AnnotationConstants::DEFAULT_VALUES() { - static const std::string s{"SliceNavigationController"}; - return s; -} - -const std::string& mitk::AnnotationConstants::PATH() -{ - static const std::string s{"path"}; - return s; + static const std::unordered_map defaultValues = { + {NAME(), "Unnamed Annotation"}, + {DEFAULT(), ""}, + {PREFIX(), ""}, + {SUFFIX(), ""}, + {TYPE(), "invalidType"}, + {PROVIDER(), ""}, + {EVENT(), ""}, + {ACTION(), ""}, + {WINDOW(), "stdmulti.widget1"}, + {LAYOUT(), "TopLeft"}, + }; + return defaultValues; } diff --git a/Modules/Annotation/src/mitkAnnotationFactory.cpp b/Modules/Annotation/src/mitkAnnotationFactory.cpp index 0eb4407723..38eb14ba88 100644 --- a/Modules/Annotation/src/mitkAnnotationFactory.cpp +++ b/Modules/Annotation/src/mitkAnnotationFactory.cpp @@ -1,133 +1,122 @@ /*=================================================================== 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. ===================================================================*/ // mitk #include "mitkAnnotationFactory.h" #include "mitkAnnotationConstants.h" #include "mitkAnnotationPropertyProvider.h" #include "mitkAnnotationTemporoSpatialPropertyProvider.h" #include "mitkLayoutAnnotationRenderer.h" #include "mitkTextAnnotation2D.h" // stl #include -const std::unordered_map mitk::AnnotationFactory::defaults = { - {AnnotationConstants::NAME(), "Unnamed Annotation"}, - {AnnotationConstants::DEFAULT(), "NA"}, - {AnnotationConstants::PREFIX(), ""}, - {AnnotationConstants::SUFFIX(), ""}, - {AnnotationConstants::TYPE(), "text"}, - {AnnotationConstants::PROVIDER(), ""}, - {AnnotationConstants::EVENT(), ""}, - {AnnotationConstants::ACTION(), ""}, - {AnnotationConstants::WINDOW(), "stdmulti.widget1"}, - {AnnotationConstants::LAYOUT(), "TopLeft"}, -}; - 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); return alignment != std::end(alignmentMap) ? alignment->second : LayoutAnnotationRenderer::TopLeft; } std::string mitk::AnnotationFactory::GetValueOrDefault(const std::unordered_map &config, const std::string &key) { const auto pair = config.find(key); if (pair == config.end()) { - const auto defaultPair = defaults.find(key); - if (defaultPair == defaults.end()) + const auto defaultPair = AnnotationConstants::DEFAULT_VALUES().find(key); + if (defaultPair == AnnotationConstants::DEFAULT_VALUES().end()) { return ""; } return defaultPair->second; } return pair->second; } mitk::AnnotationFactory::AnnotationProviderMap mitk::AnnotationFactory::CreateAnnotationsFromConfiguration( const AnnotationConfigVector &configurations) { auto result = AnnotationProviderMap{}; for (auto &config : configurations) { const auto &type = GetValueOrDefault(config, AnnotationConstants::TYPE()); Annotation::Pointer annotation; DataProvider::Pointer dataProvider; if (type == "text") { annotation = TextAnnotation2D::New(); annotation->SetText(GetValueOrDefault(config, AnnotationConstants::NAME())); } else if (type == "property") { auto propName = GetValueOrDefault(config, AnnotationConstants::PROVIDER()); dataProvider = AnnotationPropertyProvider::New(propName, GetValueOrDefault(config, AnnotationConstants::PREFIX()), GetValueOrDefault(config, AnnotationConstants::SUFFIX())); annotation = TextAnnotation2D::New(); + annotation->SetText(GetValueOrDefault(config, AnnotationConstants::DEFAULT())); dataProvider->SetAnnotation(annotation); } else if (type == "dicomProperty") { auto propName = GetValueOrDefault(config, AnnotationConstants::PROVIDER()); dataProvider = AnnotationTemporoSpatialPropertyProvider::New(propName, GetValueOrDefault(config, AnnotationConstants::PREFIX()), GetValueOrDefault(config, AnnotationConstants::SUFFIX())); annotation = TextAnnotation2D::New(); + annotation->SetText(GetValueOrDefault(config, AnnotationConstants::DEFAULT())); dataProvider->SetAnnotation(annotation); } else { - throw std::logic_error("Unknown or missing annotation type"); + mitkThrow() << "Unknown or missing annotation type"; } - annotation->SetText(GetValueOrDefault(config, AnnotationConstants::DEFAULT())); + annotation->SetName(GetValueOrDefault(config, AnnotationConstants::NAME())); RegisterAnnotation(annotation, GetValueOrDefault(config, AnnotationConstants::WINDOW()), GetValueOrDefault(config, AnnotationConstants::LAYOUT())); - result.emplace(annotation, dataProvider); + result.push_back({annotation, dataProvider}); } return result; } void mitk::AnnotationFactory::RegisterAnnotation(Annotation::Pointer annotation, const std::string &rendererId, const std::string &layout) { const auto alignment = GetAlignment(layout); const auto renderer = BaseRenderer::GetByName(rendererId); if (renderer) { LayoutAnnotationRenderer::AddAnnotation(annotation.GetPointer(), renderer, alignment); } } diff --git a/Modules/Annotation/test/files.cmake b/Modules/Annotation/test/files.cmake index a9aa36c649..34f4ee88fb 100644 --- a/Modules/Annotation/test/files.cmake +++ b/Modules/Annotation/test/files.cmake @@ -1,20 +1,21 @@ set(MODULE_TESTS mitkAnnotationTest.cpp - mitkAnnotationFactoryTest.cpp + mitkAnnotationFactoryTest.cpp + mitkAnnotationJsonReaderTest.cpp mitkAnnotationDataProviderTest.cpp ) if(MITK_ENABLE_RENDERING_TESTING) set(MODULE_TESTS ${MODULE_TESTS} mitkManualPlacementAnnotationRendererTest.cpp mitkColorBarAnnotationTest.cpp mitkLabelAnnotation3DTest.cpp mitkLogoAnnotationTest.cpp mitkLayoutAnnotationRendererTest.cpp mitkScaleLegendAnnotationTest.cpp mitkTextAnnotation2DTest.cpp mitkTextAnnotation3DTest.cpp ) endif() diff --git a/Modules/Annotation/test/mitkAnnotationFactoryTest.cpp b/Modules/Annotation/test/mitkAnnotationFactoryTest.cpp index 1b6cf2e0eb..6c1b4919a2 100644 --- a/Modules/Annotation/test/mitkAnnotationFactoryTest.cpp +++ b/Modules/Annotation/test/mitkAnnotationFactoryTest.cpp @@ -1,137 +1,112 @@ /*=================================================================== 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 "mitkAnnotationConstants.h" #include "mitkAnnotationFactory.h" -#include "mitkAnnotationJsonReaderWriter.h" -#include "mitkDynamicAnnotation.h" +#include "mitkAnnotationJsonReader.h" +#include "mitkAnnotationPropertyProvider.h" +#include "mitkAnnotationTemporoSpatialPropertyProvider.h" #include "mitkTestFixture.h" #include "mitkTestingMacros.h" #include "mitkTextAnnotation2D.h" -#include "mitkStdAnnotationDataProviders.h" + +using namespace std::string_literals; class mitkAnnotationFactoryTestSuite : public mitk::TestFixture { CPPUNIT_TEST_SUITE(mitkAnnotationFactoryTestSuite); - MITK_TEST(ReadJsonConfiguration); - MITK_TEST(SaveJsonConfiguration); - MITK_TEST(ReactToPropertyChangedEvent); + MITK_TEST(HandleValidInput); + MITK_TEST(HandleInvalidInput); CPPUNIT_TEST_SUITE_END(); - // TODO get rid of absolute path - std::string m_AnnotationTestDataDir = R"(D:\Arbeit\Programming\mitk_m\Plugins\org.mitk.annotations\resources\)"; - std::string m_ValidJsonFile = "annotationsTest.json"; - std::string m_SaveFile = "annotationsTestSaved.json"; - mitk::AnnotationFactory::Pointer m_Factory; + mitk::AnnotationFactory::AnnotationConfigVector m_ValidConfigurations; + mitk::AnnotationFactory::AnnotationConfigVector m_InvalidConfigurations; public: - void setUp() override{}; - void tearDown() override{}; - - void ReadJsonConfiguration() + void setUp() override { - auto configurations = - mitk::AnnotationJsonReaderWriter::ReadAnnotationsFromJsonFile(m_AnnotationTestDataDir + m_ValidJsonFile); - CPPUNIT_ASSERT_EQUAL_MESSAGE( - "The amount of created annotations seems incorrect", static_cast(26), configurations.size()); + m_ValidConfigurations = { + {{mitk::AnnotationConstants::NAME(), "name1"}, {mitk::AnnotationConstants::TYPE(), "text"}}, + {{mitk::AnnotationConstants::NAME(), "name2"}, + {mitk::AnnotationConstants::TYPE(), "property"}, + {mitk::AnnotationConstants::PROVIDER(), "DICOM.0010.0010"}}, + {{mitk::AnnotationConstants::NAME(), "name3"}, + {mitk::AnnotationConstants::DEFAULT(), "default"}, + {mitk::AnnotationConstants::TYPE(), "dicomProperty"}, + {mitk::AnnotationConstants::PROVIDER(), "DICOM.0020.0013"}}}; + + m_InvalidConfigurations = { + {{mitk::AnnotationConstants::NAME(), "name1"}}, + {{mitk::AnnotationConstants::TYPE(), "property"}, {mitk::AnnotationConstants::PROVIDER(), "DICOM.0010.0010"}}, + {{mitk::AnnotationConstants::NAME(), "name3"}, + {mitk::AnnotationConstants::TYPE(), "unknownType"}, + {mitk::AnnotationConstants::PROVIDER(), "DICOM.0020.0013"}}}; }; + void tearDown() override{}; - void SaveJsonConfiguration() + void HandleValidInput() { - // read the json file and store the amount of annotations contained - auto configurations = - mitk::AnnotationJsonReaderWriter::ReadAnnotationsFromJsonFile(m_AnnotationTestDataDir + m_ValidJsonFile); - - // save the actual configuration to json - mitk::AnnotationJsonReaderWriter::WriteAnnotationsToJsonFile(m_AnnotationTestDataDir + m_SaveFile, configurations); - - // read the file that was just written to disk - auto configurationsReloaded = - mitk::AnnotationJsonReaderWriter::ReadAnnotationsFromJsonFile(m_AnnotationTestDataDir + m_SaveFile); - - // check that the same amount of configurations were produced - CPPUNIT_ASSERT_EQUAL_MESSAGE("Saving and reloading didn't produce equal amounts of configuration maps", - configurations.size(), - configurationsReloaded.size()); - - // check whether at least all of the information was saved (and reloaded), doesn't check for additional information - for (auto i = 0; i < configurations.size(); ++i) - { - const auto &config = configurations[i]; - const auto &configReloaded = configurationsReloaded[i]; - for (const auto &pair : config) - { - // check that key exists - auto reloadedIter = configReloaded.find(pair.first); - CPPUNIT_ASSERT(reloadedIter != std::end(configReloaded)); - - // check for value equality - CPPUNIT_ASSERT_EQUAL_MESSAGE( - "Config values don't match after saving and reloading", pair.second, reloadedIter->second); - } - } + mitk::AnnotationFactory::AnnotationProviderMap result; + CPPUNIT_ASSERT_NO_THROW(result = + mitk::AnnotationFactory::CreateAnnotationsFromConfiguration(m_ValidConfigurations)); + CPPUNIT_ASSERT_EQUAL(m_ValidConfigurations.size(), result.size()); + + auto annotationAndDataProviderPairs = result.begin(); + CPPUNIT_ASSERT_EQUAL("name1"s, annotationAndDataProviderPairs->first->GetName()); + // for simple text annotations the name will be the shown text as well + CPPUNIT_ASSERT_EQUAL("name1"s, annotationAndDataProviderPairs->first->GetText()); + CPPUNIT_ASSERT(nullptr == annotationAndDataProviderPairs->second); + + ++annotationAndDataProviderPairs; + + CPPUNIT_ASSERT_EQUAL("name2"s, annotationAndDataProviderPairs->first->GetName()); + // no default value provided so text will be empty + CPPUNIT_ASSERT_EQUAL(""s, annotationAndDataProviderPairs->first->GetText()); + CPPUNIT_ASSERT(nullptr != annotationAndDataProviderPairs->second); + // the right subclass should have been used + CPPUNIT_ASSERT( + nullptr != dynamic_cast(annotationAndDataProviderPairs->second.GetPointer())); + + ++annotationAndDataProviderPairs; + + CPPUNIT_ASSERT_EQUAL("name3"s, annotationAndDataProviderPairs->first->GetName()); + // check that default value was set + CPPUNIT_ASSERT_EQUAL("default"s, annotationAndDataProviderPairs->first->GetText()); + CPPUNIT_ASSERT(nullptr != annotationAndDataProviderPairs->second); + // the right subclass should have been used + CPPUNIT_ASSERT(nullptr != dynamic_cast( + annotationAndDataProviderPairs->second.GetPointer())); } - - void ReactToPropertyChangedEvent() + void HandleInvalidInput() { - // create annotation wrapper - auto annotation = mitk::DynamicAnnotation{}; - - // create specific annotation - annotation.ptr = mitk::TextAnnotation2D::New(); - - // configure the dynamic annotation - auto customProviderName = "customPropertyProvider"; - annotation.config = {{mitk::AnnotationConstants::PROVIDER, customProviderName}, - {mitk::AnnotationConstants::TYPE, "property"}}; - - // specify the necessary provider information - annotation.providerInfo.dataChangedEvent = itk::ModifiedEvent().MakeObject(); - annotation.providerInfo.dataRetrievalAction = - [](const itk::Object *caller, const itk::EventObject &, unsigned, unsigned) { - auto prop = dynamic_cast(caller); - return prop ? prop->GetValueAsString() : "ERROR"; - }; - - // register annotation with the system - mitk::LayoutAnnotationRenderer::AddAnnotation(annotation.ptr, "stdmulti.widget1"); - - // let the factory take over the management - m_Factory->AddSingleAnnotation(annotation); - - // create the actual data provider - auto prop = mitk::StringProperty::New(); - prop->SetValue("first"); - - // set the provider for the key specified in the annotation's config - // this should retrieve the dynamic data for the first time - m_Factory->SetProvider(customProviderName, prop.GetPointer()); - CPPUNIT_ASSERT_EQUAL(std::string("first"), annotation.ptr->GetText()); - - // change the provider's data - // this should trigger the specified OnEventAction and update the annotation's text accordingly - prop->SetValue("second"); - CPPUNIT_ASSERT_EQUAL(std::string("second"), annotation.ptr->GetText()); - }; - - void ReactToSliceNumberChangedEvent( - // TODO implement test - auto provider = mitk::AnnotationDataProviderFactory::DefaultSliceNumberProvider(); - ); + // no type given + CPPUNIT_ASSERT_THROW(mitk::AnnotationFactory::CreateAnnotationsFromConfiguration({m_InvalidConfigurations[0]}), + mitk::Exception); + + // no name given + auto result = mitk::AnnotationFactory::CreateAnnotationsFromConfiguration({m_InvalidConfigurations[1]}); + CPPUNIT_ASSERT_EQUAL(mitk::AnnotationConstants::DEFAULT_VALUES().at(mitk::AnnotationConstants::NAME()), result[0].first->GetName()); + CPPUNIT_ASSERT(nullptr != result[0].second); + + // invalid type given + CPPUNIT_ASSERT_THROW(mitk::AnnotationFactory::CreateAnnotationsFromConfiguration({m_InvalidConfigurations[2]}), + mitk::Exception); + } }; MITK_TEST_SUITE_REGISTRATION(mitkAnnotationFactory) \ No newline at end of file diff --git a/Modules/Annotation/test/mitkAnnotationJsonReaderTest.cpp b/Modules/Annotation/test/mitkAnnotationJsonReaderTest.cpp new file mode 100644 index 0000000000..892e551638 --- /dev/null +++ b/Modules/Annotation/test/mitkAnnotationJsonReaderTest.cpp @@ -0,0 +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. + +===================================================================*/ + +#include "mitkAnnotationPropertyProvider.h" +#include "mitkDataNode.h" +#include "mitkDataProvider.h" +#include "mitkStringProperty.h" +#include "mitkTestFixture.h" +#include "mitkTestingMacros.h" +#include "mitkTextAnnotation2D.h" + +class mitkAnnotationJsonReaderTestSuite : public mitk::TestFixture +{ + CPPUNIT_TEST_SUITE(mitkAnnotationJsonReaderTestSuite); + + //TODO place test layout somewhere they can be used for reader tests + + CPPUNIT_TEST_SUITE_END(); + +public: + void setUp() override{}; + void tearDown() override{}; +}; + +MITK_TEST_SUITE_REGISTRATION(mitkAnnotationJsonReader) \ No newline at end of file