Medical Imaging Interaction Toolkit  2022.04.99-3f7a773b
Medical Imaging Interaction Toolkit
mitkDICOMSegmentationIO.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 __mitkDICOMSegmentationIO_h
14 #define __mitkDICOMSegmentationIO_h
15 
16 #include <mitkAbstractFileIO.h>
17 #include <mitkLabelSetImage.h>
18 
20 
21 #include <dcmqi/JSONSegmentationMetaInformationHandler.h>
22 
23 #include <memory>
24 
25 namespace mitk
26 {
32  {
33  public:
35  typedef itk::Image<unsigned short, 3> itkInputImageType;
36  typedef itk::Image<short, 3> itkInternalImageType;
37 
39 
40  // -------------- AbstractFileReader -------------
41 
43 
45 
46  // -------------- AbstractFileWriter -------------
47 
48  void Write() override;
50 
51  static std::vector<mitk::DICOMTagPath> GetDICOMTagsOfInterest();
52 
53  protected:
59  std::vector<itk::SmartPointer<BaseData>> DoRead() override;
60 
61  private:
62  DICOMSegmentationIO *IOClone() const override;
63 
64  // -------------- DICOMSegmentationIO specific functions -------------
65  const std::string CreateMetaDataJsonFile(int layer);
66  void SetLabelProperties(Label *label, dcmqi::SegmentAttributes *segmentAttribute);
67  };
68 } // end of namespace mitk
69 
70 #endif // __mitkDICOMSegmentationIO_h
ConfidenceLevel GetReaderConfidenceLevel() const override
DataCollection - Class to facilitate loading/accessing structured data.
A data structure describing a label.
Definition: mitkLabel.h:28
static std::vector< mitk::DICOMTagPath > GetDICOMTagsOfInterest()
ConfidenceLevel GetWriterConfidenceLevel() const override
std::vector< itk::SmartPointer< BaseData > > DoRead() override
Reads a number of DICOM segmentation from the file system.
ConfidenceLevel
A confidence level describing the confidence of the reader or writer in handling the given data...
Definition: mitkIFileIO.h:45
itk::Image< unsigned short, 3 > itkInputImageType
std::vector< itk::SmartPointer< BaseData > > 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.
LabelSetImage class for handling labels and layers in a segmentation session.
Abstract class for implementing a reader and writer.
itk::Image< short, 3 > itkInternalImageType