40 std::vector<BaseData::Pointer> result;
48 MITK_INFO <<
"it is a Philips3D US Dicom file" << std::endl;
50 std::locale previousCppLocale(std::cin.getloc());
56 stringvec.push_back(fileName);
61 data->GetPropertyList()->SetProperty(
"name", nameProp);
62 result.push_back(data);
64 std::cin.imbue(previousCppLocale);
71 if (relevantFiles.empty())
73 MITK_INFO <<
"DICOMReader service found no relevant files in specified location. No data is loaded. Location: "<<fileName;
81 MITK_INFO <<
"DICOMReader service found no suitable reader configuration for relevant files.";
87 reader->SetInputFiles(relevantFiles);
90 scanner->AddTagPaths(reader->GetTagsOfInterest());
91 scanner->SetInputFiles(relevantFiles);
94 reader->SetTagCache(scanner->GetScanCache());
95 reader->AnalyzeInputFiles();
98 for (
unsigned int i = 0; i < reader->GetNumberOfOutputs(); ++i)
103 std::string nodeName =
"Unnamed_DICOM";
108 if (!studyDescription.empty())
110 nodeName = studyDescription;
113 if (!seriesDescription.empty())
115 if (!studyDescription.empty())
119 nodeName += seriesDescription;
123 data->SetProperty(
"name", nameProp);
125 result.push_back(data);
139 return relevantFiles;
itk::SmartPointer< Self > Pointer
DICOMTagPathMapType MITKDICOMREADER_EXPORT GetCurrentDICOMTagsOfInterest()
virtual std::vector< itk::SmartPointer< BaseData > > Read() override
DICOMFilePathList GetDICOMFilesInSameDirectory(const std::string &filePath)
mitk::StringList GetRelevantFiles() const
std::vector< std::string > StringContainer
Lists of filenames.
static DataNode::Pointer LoadDicomSeries(const StringContainer &filenames, bool sort=true, bool load4D=true, bool correctGantryTilt=true, UpdateCallBackMethod callback=nullptr, itk::SmartPointer< Image > preLoadedImageBlock=nullptr)
DataCollection - Class to facilitate loading/accessing structured data.
virtual mitk::DICOMFileReader::Pointer GetReader(const mitk::StringList &relevantFiles) const =0
std::string GetLocalFileName() const
Get a local file name for reading.
MITKDICOMREADER_EXPORT mitk::BaseProperty::Pointer GetDICOMPropertyForDICOMValuesFunctor(const DICOMCachedValueLookupTable &cacheLookupTable)
BaseDICOMReaderService(const std::string &description)
The CustomMimeType class represents a custom mime-type which may be registered as a service object...
Convenience class to temporarily change the current locale.
Output descriptor for DICOMFileReader.
static bool IsPhilips3DDicom(const std::string &filename)
Checks if a specific file is a Philips3D ultrasound DICOM file.
std::vector< std::string > StringList
Image::Pointer GetMitkImage() const
the 3D mitk::Image that is loaded from the DICOM files of a DICOMImageFrameList
Base class for creating mitk::BaseData objects from files or streams.
std::string GetPropertyAsString(const std::string &) const
Convenience function around GetProperty()