Medical Imaging Interaction Toolkit  2023.04.00
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 mitkTubeGraphIO_h
14 #define mitkTubeGraphIO_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
mitkTubeGraph.h
mitk::CustomMimeType::SetCategory
void SetCategory(const std::string &category)
mitk::TubeGraphIO
reader and writer for xml representations of mitk::TubeGraph
Definition: mitkTubeGraphIO.h:29
mitk::CustomMimeType
The CustomMimeType class represents a custom mime-type which may be registered as a service object....
Definition: mitkCustomMimeType.h:44
mitkCustomMimeType.h
mitk::TubeGraphIO::DoRead
std::vector< itk::SmartPointer< BaseData > > DoRead() override
itk::SmartPointer< Self >
mitkIOMimeTypes.h
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::CustomMimeType::SetComment
void SetComment(const std::string &comment)
mitkAbstractFileIO.h
mitk::TubeGraphIO::TUBEGRAPH_MIMETYPE_NAME
static std::string TUBEGRAPH_MIMETYPE_NAME()
Definition: mitkTubeGraphIO.h:53
mitk::TubeGraphIO::TUBEGRAPH_MIMETYPE
static CustomMimeType TUBEGRAPH_MIMETYPE()
Definition: mitkTubeGraphIO.h:45
mitk::TubeGraphIO::GetWriterConfidenceLevel
ConfidenceLevel GetWriterConfidenceLevel() const override
mitk::TubeGraphIO::GetReaderConfidenceLevel
ConfidenceLevel GetReaderConfidenceLevel() const override
mitk::IOMimeTypes::DEFAULT_BASE_NAME
static std::string DEFAULT_BASE_NAME()
mitk::TubeGraphIO::TubeGraphIO
TubeGraphIO()
mitk::TubeGraphIO::Write
void Write() override
Write the base data to the specified location or output stream.
mitk::IFileIO::ConfidenceLevel
ConfidenceLevel
A confidence level describing the confidence of the reader or writer in handling the given data.
Definition: mitkIFileIO.h:45
mitk::AbstractFileIO
Abstract class for implementing a reader and writer.
Definition: mitkAbstractFileIO.h:69
mitk::AbstractFileReader::Read
std::vector< itk::SmartPointer< BaseData > > Read() override
Reads a path or stream and creates a list of BaseData objects.
mitk::CustomMimeType::AddExtension
void AddExtension(const std::string &extension)