39 std::vector<BaseData::Pointer> result;
42 std::locale previousCppLocale(std::cin.getloc());
49 MITK_INFO <<
"it is a Philips3D US Dicom file" << std::endl;
52 stringvec.push_back(fileName);
57 data->GetPropertyList()->SetProperty(
"name", nameProp);
58 result.push_back(data);
60 std::cin.imbue(previousCppLocale);
67 const unsigned int size = imageBlocks.size();
72 unsigned int outputIndex = 0u;
73 const DicomSeriesReader::FileNamesGrouping::const_iterator n_end = imageBlocks.end();
75 for (DicomSeriesReader::FileNamesGrouping::const_iterator n_it = imageBlocks.begin(); n_it != n_end; ++n_it)
77 const std::string &uid = n_it->first;
82 MITK_INFO <<
"--------------------------------------------------------------------------------";
83 MITK_INFO <<
"DicomSeriesReader: Loading DICOM series " << outputIndex <<
": Series UID "
94 MITK_INFO <<
"--------------------------------------------------------------------------------";
101 std::string nodeName(uid);
102 std::string studyDescription;
105 0x0008, 0x1030,
"dicom.study.StudyDescription", dataProps, studyDescription))
107 nodeName = studyDescription;
108 std::string seriesDescription;
111 0x0008, 0x103e,
"dicom.study.SeriesDescription", dataProps, seriesDescription))
113 nodeName +=
"/" + seriesDescription;
118 data->SetProperty(
"name", nameProp);
120 result.push_back(data);
125 MITK_ERROR <<
"DicomSeriesReader: Skipping series " << outputIndex <<
" due to some unspecified error..."
132 std::cin.imbue(previousCppLocale);
void Progress(unsigned int steps=1)
Sets the current amount of progress to current progress + steps.
StringContainer GetFilenames() const
List of files in this group.
Return type of GetSeries, describes a logical group of files.
bool HasGantryTiltCorrected() const
Whether or not the block contains a gantry tilt which will be "corrected" during loading.
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.
std::string GetModality() const
Series Modality (CT, MR, etc.)
std::string GetLocalFileName() const
Get a local file name for reading.
static std::string ReaderImplementationLevelToString(const ReaderImplementationLevel &enumValue)
static ProgressBar * GetInstance()
static method to get the GUI dependent ProgressBar-instance so the methods for steps to do and progre...
std::string GetSOPClassUIDAsString() const
SOP Class UID as readable string (Computed Tomography Image Storage, Secondary Capture Image Storage...
The CustomMimeType class represents a custom mime-type which may be registered as a service object...
static std::string PixelSpacingInterpretationToString(const PixelSpacingInterpretation &enumValue)
DicomSeriesReaderService()
us::ServiceRegistration< IFileReader > RegisterService(us::ModuleContext *context=us::GetModuleContext())
virtual std::vector< itk::SmartPointer< BaseData > > Read() override
Reads a path or stream and creates a list of BaseData objects.
Convenience class to temporarily change the current locale.
static FileNamesGrouping GetSeries(const std::string &dir, bool groupImagesWithGantryTilt, const StringContainer &restrictions=StringContainer())
see other GetSeries().
bool HasMultipleTimePoints() const
3D+t or not
std::string GetSeriesInstanceUID() const
The Series Instance UID.
static bool IsPhilips3DDicom(const std::string &filename)
Checks if a specific file is a Philips3D ultrasound DICOM file.
bool IsMultiFrameImage() const
Multi-frame image(s) or not.
void AddStepsToDo(unsigned int steps)
Adds steps to totalSteps.
Base class for creating mitk::BaseData objects from files or streams.
ReaderImplementationLevel GetReaderImplementationLevel() const
Confidence of the reader that this block can be read successfully.
std::map< std::string, ImageBlockDescriptor > FileNamesGrouping
PixelSpacingInterpretation GetPixelSpacingType() const
How the mitk::Image spacing can meaningfully be interpreted.
bool MITKCORE_EXPORT GetBackwardsCompatibleDICOMProperty(unsigned int group, unsigned int element, std::string const &backwardsCompatiblePropertyName, PropertyList const *propertyList, std::string &propertyValue)