Medical Imaging Interaction Toolkit  2018.04.99-74b4982f
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 namespace mitk
23 {
30  {
31  public:
32  TubeGraphIO();
33 
34  // -------------- AbstractFileReader -------------
35 
37 
39 
40  // -------------- AbstractFileWriter -------------
41 
42  void Write() override;
44 
46  {
48  mimeType.AddExtension("tsf");
49  mimeType.SetCategory("Graphs");
50  mimeType.SetComment("MITK Tube Graph Structure File");
51  return mimeType;
52  }
53  static std::string TUBEGRAPH_MIMETYPE_NAME()
54  {
55  static std::string name = mitk::IOMimeTypes::DEFAULT_BASE_NAME() + ".graphs.tubular-sructure";
56  return name;
57  }
58 
59  protected:
60  std::vector<itk::SmartPointer<BaseData>> DoRead() override;
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_
std::vector< itk::SmartPointer< BaseData > > DoRead() override
static std::string TUBEGRAPH_MIMETYPE_NAME()
reader and writer for xml representations of mitk::TubeGraph
DataCollection - Class to facilitate loading/accessing structured data.
void SetComment(const std::string &comment)
The CustomMimeType class represents a custom mime-type which may be registered as a service object...
ConfidenceLevel GetReaderConfidenceLevel() const override
ConfidenceLevel
A confidence level describing the confidence of the reader or writer in handling the given data...
Definition: mitkIFileIO.h:45
void Write() override
Write the base data to the specified location or output stream.
void AddExtension(const std::string &extension)
std::vector< itk::SmartPointer< BaseData > > Read() override
Reads a path or stream and creates a list of BaseData objects.
static std::string DEFAULT_BASE_NAME()
void SetCategory(const std::string &category)
static CustomMimeType TUBEGRAPH_MIMETYPE()
Abstract class for implementing a reader and writer.
ConfidenceLevel GetWriterConfidenceLevel() const override