Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkTubeGraphIO.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 _MITK_TUBE_GRAPH_IO_H_
14 #define _MITK_TUBE_GRAPH_IO_H_
15 
16 #include <mitkAbstractFileIO.h>
17 #include <mitkCustomMimeType.h>
18 #include <mitkIOMimeTypes.h>
19 
20 #include "mitkTubeGraph.h"
21 
22 class TiXmlElement;
23 
24 namespace mitk
25 {
32  {
33  public:
34  TubeGraphIO();
35 
36  // -------------- AbstractFileReader -------------
37 
39  std::vector<BaseData::Pointer> Read() override;
40 
42 
43  // -------------- AbstractFileWriter -------------
44 
45  void Write() override;
47 
49  {
51  mimeType.AddExtension("tsf");
52  mimeType.SetCategory("Graphs");
53  mimeType.SetComment("MITK Tube Graph Structure File");
54  return mimeType;
55  }
56  static std::string TUBEGRAPH_MIMETYPE_NAME()
57  {
58  static std::string name = mitk::IOMimeTypes::DEFAULT_BASE_NAME() + ".graphs.tubular-sructure";
59  return name;
60  }
61 
62  private:
63  TubeGraphIO *IOClone() const override;
64  TubeGraphIO(const TubeGraphIO &other);
65  const BoundingBox::Pointer ComputeBoundingBox(TubeGraph::Pointer graph) const;
66  };
67 }
68 
69 #endif //_MITK_SURFACE_VTK_IO_H_
ConfidenceLevel GetWriterConfidenceLevel() const override
static std::string TUBEGRAPH_MIMETYPE_NAME()
ConfidenceLevel GetReaderConfidenceLevel() const override
reader and writer for xml representations of mitk::TubeGraph
DataCollection - Class to facilitate loading/accessing structured data.
std::vector< itk::SmartPointer< BaseData > > Read() override=0
Reads a path or stream and creates a list of BaseData objects.
void SetComment(const std::string &comment)
The CustomMimeType class represents a custom mime-type which may be registered as a service object...
static std::string DEFAULT_BASE_NAME()
ConfidenceLevel
A confidence level describing the confidence of the reader or writer in handling the given data...
Definition: mitkIFileIO.h:45
std::vector< BaseData::Pointer > Read() override
Reads a path or stream and creates a list of BaseData objects.
void Write() override
Write the base data to the specified location or output stream.
void AddExtension(const std::string &extension)
void SetCategory(const std::string &category)
static CustomMimeType TUBEGRAPH_MIMETYPE()
Abstract class for implementing a reader and writer.