Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _MITK_TUBE_GRAPH_IO_H_
18 #define _MITK_TUBE_GRAPH_IO_H_
19 
20 #include <mitkAbstractFileIO.h>
21 #include <mitkCustomMimeType.h>
22 #include <mitkIOMimeTypes.h>
23 
24 #include "mitkTubeGraph.h"
25 
26 class TiXmlElement;
27 
28 namespace mitk
29 {
36  {
37  public:
38  TubeGraphIO();
39 
40  // -------------- AbstractFileReader -------------
41 
43  virtual std::vector<BaseData::Pointer> Read() override;
44 
45  virtual ConfidenceLevel GetReaderConfidenceLevel() const override;
46 
47  // -------------- AbstractFileWriter -------------
48 
49  virtual void Write() override;
50  virtual ConfidenceLevel GetWriterConfidenceLevel() const override;
51 
53  {
55  mimeType.AddExtension("tsf");
56  mimeType.SetCategory("Graphs");
57  mimeType.SetComment("MITK Tube Graph Structure File");
58  return mimeType;
59  }
60  static std::string TUBEGRAPH_MIMETYPE_NAME()
61  {
62  static std::string name = mitk::IOMimeTypes::DEFAULT_BASE_NAME() + ".graphs.tubular-sructure";
63  return name;
64  }
65 
66  private:
67  TubeGraphIO *IOClone() const override;
68  TubeGraphIO(const TubeGraphIO &other);
69  const BoundingBox::Pointer ComputeBoundingBox(TubeGraph::Pointer graph) const;
70  };
71 }
72 
73 #endif //_MITK_SURFACE_VTK_IO_H_
itk::SmartPointer< Self > Pointer
virtual ConfidenceLevel GetWriterConfidenceLevel() const override
static std::string TUBEGRAPH_MIMETYPE_NAME()
virtual ConfidenceLevel GetReaderConfidenceLevel() const override
reader and writer for xml representations of mitk::TubeGraph
DataCollection - Class to facilitate loading/accessing structured data.
virtual 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()
virtual std::vector< BaseData::Pointer > Read() override
Reads a path or stream and creates a list of BaseData objects.
virtual 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()
ConfidenceLevel
A confidence level describing the confidence of the reader or writer in handling the given data...
Definition: mitkIFileIO.h:49
Abstract class for implementing a reader and writer.