Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitkCLResultXMLWriter.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkCLResultXMLWriter_h
14 #define mitkCLResultXMLWriter_h
15 
16 #include "MitkCLUtilitiesExports.h"
17 
18 #include "mitkImage.h"
20 
21 namespace mitk
22 {
23  namespace cl
24  {
26  {
27  public:
28  CLResultXMLWriter() = default;
29  ~CLResultXMLWriter() = default;
30 
31  void SetImage(const Image* image);
32  void SetMask(const Image* mask);
33  void SetFeatures(const mitk::AbstractGlobalImageFeature::FeatureListType& features);
34 
35  void SetMethodName(const std::string& name);
36  void SetMethodVersion(const std::string& version);
37  void SetOrganisation(const std::string& orga);
38  void SetPipelineUID(const std::string& pipelineUID);
39  void SetCLIArgs(const std::map<std::string, us::Any>& args);
40 
41  void write(const std::string& filePath) const;
42  void write(std::ostream& stream) const;
43 
44  private:
45  CLResultXMLWriter(const CLResultXMLWriter&) = delete;
46  CLResultXMLWriter& operator = (const CLResultXMLWriter&) = delete;
47 
48  Image::ConstPointer m_Image;
49  Image::ConstPointer m_Mask;
51  std::string m_MethodName = "unknown";
52  std::string m_MethodVersion = "unknown";
53  std::string m_Organisation = "unknown";
54  std::string m_PipelineUID = "unknown";
55  std::map<std::string, us::Any> m_CLIArgs;
56  };
57  }
58 }
59 
60 #endif
mitkAbstractGlobalImageFeature.h
MITKCLUTILITIES_EXPORT
#define MITKCLUTILITIES_EXPORT
Definition: MitkCLUtilitiesExports.h:15
mitkImage.h
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
itk::SmartPointer< const Self >
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::cl::CLResultXMLWriter
Definition: mitkCLResultXMLWriter.h:25
mitk::AbstractGlobalImageFeature::FeatureListType
std::vector< std::pair< FeatureID, double > > FeatureListType
Definition: mitkAbstractGlobalImageFeature.h:156
MitkCLUtilitiesExports.h