MCPcopy Create free account
hub / github.com/MITK/MITK / Read

Method Read

Modules/RT/src/mitkRTPlanReader.cpp:35–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 RTPlanReader::~RTPlanReader(){}
34
35 std::vector<itk::SmartPointer<BaseData> > RTPlanReader::Read()
36 {
37 std::vector<itk::SmartPointer<mitk::BaseData> > result;
38
39 auto tagsOfInterest = m_DICOMTagsOfInterestService->GetTagsOfInterest();
40 DICOMTagPathList tagsOfInterestList;
41 for (const auto& tag : tagsOfInterest){
42 tagsOfInterestList.push_back(tag.first);
43 }
44
45 std::string location = GetInputLocation();
46 mitk::StringList files = { location };
47 mitk::DICOMDCMTKTagScanner::Pointer scanner = mitk::DICOMDCMTKTagScanner::New();
48 scanner->SetInputFiles(files);
49 scanner->AddTagPaths(tagsOfInterestList);
50 scanner->Scan();
51
52 mitk::DICOMDatasetAccessingImageFrameList frames = scanner->GetFrameInfoList();
53 if (frames.empty()){
54 MITK_ERROR << "Error reading the RTPLAN file" << std::endl;
55 return result;
56 }
57
58 auto findings = ExtractPathsOfInterest(tagsOfInterestList, frames);
59
60 //just create empty image. No image information available in RTPLAN. But properties will be attached.
61 Image::Pointer dummyImage = Image::New();
62 SetProperties(dummyImage, findings);
63
64 result.push_back(dummyImage.GetPointer());
65
66 return result;
67 }
68
69 RTPlanReader* RTPlanReader::Clone() const
70 {

Callers 4

IsPhilips3DDicomMethod · 0.45
ReadPhilips3DDicomMethod · 0.45
setUpMethod · 0.45

Calls 11

GetInputLocationFunction · 0.85
ExtractPathsOfInterestFunction · 0.85
SetPropertiesFunction · 0.85
GetPointerMethod · 0.80
NewFunction · 0.50
GetTagsOfInterestMethod · 0.45
SetInputFilesMethod · 0.45
AddTagPathsMethod · 0.45
ScanMethod · 0.45
GetFrameInfoListMethod · 0.45
emptyMethod · 0.45

Tested by 2

setUpMethod · 0.36