24 : m_HasGantryTiltCorrected(false), m_HasMultipleTimePoints(false), m_IsMultiFrameImage(false)
34 : m_HasGantryTiltCorrected(false), m_HasMultipleTimePoints(false), m_IsMultiFrameImage(false)
39 void DicomSeriesReader::ImageBlockDescriptor::AddFile(
const std::string &
filename)
41 m_Filenames.push_back(filename);
44 void DicomSeriesReader::ImageBlockDescriptor::AddFiles(
const StringContainer &files)
46 m_Filenames.insert(m_Filenames.end(), files.begin(), files.end());
59 gdcm::UIDs uidKnowledge;
60 uidKnowledge.SetFromUID(m_SOPClassUID.c_str());
61 return uidKnowledge.GetName();
69 if (this->IsMultiFrameImage())
72 gdcm::UIDs uidKnowledge;
73 uidKnowledge.SetFromUID(m_SOPClassUID.c_str());
75 gdcm::UIDs::TSType uid = uidKnowledge;
79 case gdcm::UIDs::CTImageStorage:
80 case gdcm::UIDs::MRImageStorage:
81 case gdcm::UIDs::PositronEmissionTomographyImageStorage:
82 case gdcm::UIDs::ComputedRadiographyImageStorage:
83 case gdcm::UIDs::DigitalXRayImageStorageForPresentation:
84 case gdcm::UIDs::DigitalXRayImageStorageForProcessing:
87 case gdcm::UIDs::NuclearMedicineImageStorage:
90 case gdcm::UIDs::SecondaryCaptureImageStorage:
112 if (m_PixelSpacing.empty())
114 if (m_ImagerPixelSpacing.empty())
125 if (m_ImagerPixelSpacing.empty())
129 else if (m_PixelSpacing != m_ImagerPixelSpacing)
155 void DicomSeriesReader::ImageBlockDescriptor::SetPixelSpacingInformation(
const std::string &pixelSpacing,
156 const std::string &imagerPixelSpacing)
158 m_PixelSpacing = pixelSpacing;
159 m_ImagerPixelSpacing = imagerPixelSpacing;
162 void DicomSeriesReader::ImageBlockDescriptor::GetDesiredMITKImagePixelSpacing(
ScalarType &spacingX,
172 spacingX = spacingY = 1.0;
178 void DicomSeriesReader::ImageBlockDescriptor::SetImageBlockUID(
const std::string &uid) { m_ImageBlockUID = uid; }
179 void DicomSeriesReader::ImageBlockDescriptor::SetSeriesInstanceUID(
const std::string &uid)
181 m_SeriesInstanceUID = uid;
184 void DicomSeriesReader::ImageBlockDescriptor::SetModality(
const std::string &modality) { m_Modality = modality; }
185 void DicomSeriesReader::ImageBlockDescriptor::SetNumberOfFrames(
const std::string &numberOfFrames)
187 m_IsMultiFrameImage = !numberOfFrames.empty();
190 void DicomSeriesReader::ImageBlockDescriptor::SetSOPClassUID(
const std::string &sopClassUID)
192 m_SOPClassUID = sopClassUID;
195 void DicomSeriesReader::ImageBlockDescriptor::SetHasGantryTiltCorrected(
bool on) { m_HasGantryTiltCorrected = on; }
196 void DicomSeriesReader::ImageBlockDescriptor::SetHasMultipleTimePoints(
bool on) { m_HasMultipleTimePoints = on; }
PixelSpacingInterpretation
How the mitk::Image spacing should be interpreted.
distances are mm within a patient
StringContainer GetFilenames() const
List of files in this group.
static bool DICOMStringToSpacing(const std::string &s, ScalarType &spacingX, ScalarType &spacingY)
Safely convert a string into pixel spacing x and y.
bool HasGantryTiltCorrected() const
Whether or not the block contains a gantry tilt which will be "corrected" during loading.
std::string GetImageBlockUID() const
A unique ID describing this bloc (enhanced Series Instance UID).
distances are mm at detector surface
std::vector< std::string > StringContainer
Lists of filenames.
DataCollection - Class to facilitate loading/accessing structured data.
std::string GetModality() const
Series Modality (CT, MR, etc.)
std::string GetSOPClassUID() const
SOP Class UID as DICOM UID.
std::string GetSOPClassUIDAsString() const
SOP Class UID as readable string (Computed Tomography Image Storage, Secondary Capture Image Storage...
loader code is implemented but not accompanied by tests
static const std::string filename
bool HasMultipleTimePoints() const
3D+t or not
std::string GetSeriesInstanceUID() const
The Series Instance UID.
loader code and tests are established
bool IsMultiFrameImage() const
Multi-frame image(s) or not.
bool PixelSpacingRelatesToDetector() const
Whether or not mitk::Image spacing relates to the detector surface.
ReaderImplementationLevel GetReaderImplementationLevel() const
Confidence of the reader that this block can be read successfully.
bool PixelSpacingIsUnknown() const
Whether or not mitk::Image spacing is of unknown origin.
PixelSpacingInterpretation GetPixelSpacingType() const
How the mitk::Image spacing can meaningfully be interpreted.
bool PixelSpacingRelatesToPatient() const
Whether or not mitk::Image spacing relates to the patient.
ReaderImplementationLevel
Describes how well the reader is tested for a certain file type.