13 #ifndef mitkDICOMITKSeriesGDCMReader_h
14 #define mitkDICOMITKSeriesGDCMReader_h
28 class TimeProbesCollectorBase;
251 m_SimpleVolumeReading = read;
259 return m_SimpleVolumeReading;
273 return m_DefaultDecimalPlacesForOrientation;
278 return m_DefaultSimpleVolumeImport;
283 return m_DefaultFixTiltByShearing;
303 const static int m_DefaultDecimalPlacesForOrientation = 5;
304 const static bool m_DefaultSimpleVolumeImport =
false;
305 const static bool m_DefaultFixTiltByShearing =
true;
307 DICOMITKSeriesGDCMReader(
unsigned int decimalPlacesForOrientation = m_DefaultDecimalPlacesForOrientation,
bool simpleVolumeImport = m_DefaultSimpleVolumeImport);
326 unsigned int sortingStepIndex,
327 const DICOMDatasetSorter::Pointer& sorter,
340 void EnsureMandatorySortersArePresent(
unsigned int decimalPlacesForOrientation,
bool simpleVolumeImport =
false);
353 typedef std::list<DICOMDatasetSorter::Pointer> SorterList;
365 static std::mutex s_LocaleMutex;
367 mutable std::stack<std::string> m_ReplacedCLocales;
368 mutable std::stack<std::locale> m_ReplacedCinLocales;
370 double m_DecimalPlacesForOrientation;
372 DICOMTagCache::Pointer m_TagCache;
373 bool m_ExternalCache;
The sorting/splitting building-block of DICOMITKSeriesGDCMReader.
Interface for DICOM readers that produce mitk::Images.
Flexible reader based on itk::ImageSeriesReader and GDCM, for single-slice modalities like CT,...
DICOMITKSeriesGDCMReader(unsigned int decimalPlacesForOrientation=m_DefaultDecimalPlacesForOrientation, bool simpleVolumeImport=m_DefaultSimpleVolumeImport)
virtual bool LoadMitkImageForOutput(unsigned int o)
Loads the mitk::Image by means of an itk::ImageSeriesReader.
static SortingBlockList InternalExecuteSortingStep(unsigned int sortingStepIndex, const DICOMDatasetSorter::Pointer &sorter, const SortingBlockList &input)
Sorting step as described in Loading strategy.
void SetTagCache(const DICOMTagCache::Pointer &) override
A way to provide external knowledge about files and tag values is appreciated.
virtual void AddSortingElement(DICOMDatasetSorter *sorter, bool atFront=false)
Add an element to the sorting procedure described in Loading strategy.
static std::string GetActiveLocale()
Return active C locale.
std::pair< DICOMDatasetAccessingImageFrameList, IOVolumeSplitReason::Pointer > SortingBlockListItemType
bool GetAcceptTwoSlicesGroups() const
void PopLocale() const
Activate last remembered locale from locale stack "C" locale is required for correct parsing of numbe...
static bool GetDefaultSimpleVolumeImport()
mitkNewMacro1Param(DICOMITKSeriesGDCMReader, unsigned int)
bool GetSimpleVolumeReading()
Ignore all dicom tags that are non-essential for simple 3D volume import.
DICOMTagPathList GetTagsOfInterest() const override
static ReaderImplementationLevel GetReaderImplementationLevel(const std::string sopClassUID)
Describe this reader's confidence for given SOP class UID.
static int GetDefaultDecimalPlacesForOrientation()
void SetFixTiltByShearing(bool on)
Controls whether to "fix" tilted acquisitions by shearing the output (see Gantry tilt handling).
void SetSimpleVolumeReading(bool read)
Ignore all dicom tags that are non-essential for simple 3D volume import.
void SetToleratedOriginOffsetToAdaptive(double fractionOfInterSliceDistanct=0.3) const
See Forced Configuration.
double GetToleratedOriginError() const
mitk::NormalDirectionConsistencySorter::Pointer m_NormalDirectionConsistencySorter
static bool GetDefaultFixTiltByShearing()
void PushLocale() const
Remember current locale on stack, activate "C" locale. "C" locale is required for correct parsing of ...
virtual DICOMTagCache::Pointer GetTagCache() const
~DICOMITKSeriesGDCMReader() override
mitkNewMacro2Param(DICOMITKSeriesGDCMReader, unsigned int, bool)
bool IsToleratedOriginOffsetAbsolute() const
bool m_SimpleVolumeReading
DICOMITKSeriesGDCMReader & operator=(const DICOMITKSeriesGDCMReader &other)
bool operator==(const DICOMFileReader &other) const override
mitkClassMacro(DICOMITKSeriesGDCMReader, DICOMFileReader)
ConstSorterList GetFreelyConfiguredSortingElements() const
virtual SortingBlockList Condense3DBlocks(SortingBlockList &resultOf3DGrouping)
"Hook" for sub-classes, see Sub-classes can condense multiple blocks into a single larger block
double GetDecimalPlacesForOrientation() const
bool GetFixTiltByShearing() const
bool LoadImages() override
Loads images using itk::ImageSeriesReader, potentially applies shearing to correct gantry tilt.
mitkCloneMacro(DICOMITKSeriesGDCMReader)
DICOMITKSeriesGDCMReader(const DICOMITKSeriesGDCMReader &other)
virtual bool LoadMitkImageForImageBlockDescriptor(DICOMImageBlockDescriptor &block) const
std::vector< SortingBlockListItemType > SortingBlockList
void SetToleratedOriginOffset(double millimeters=0.005) const
See Forced Configuration.
void AnalyzeInputFiles() override
Runs the sorting / splitting process described in Loading strategy. Method required by DICOMFileReade...
void SetAcceptTwoSlicesGroups(bool accept) const
Controls whether groups of only two images are accepted when ensuring consecutive slices via EquiDist...
bool CanHandleFile(const std::string &filename) override
Indicate whether this reader can handle given file.
mitk::EquiDistantBlocksSorter::Pointer m_EquiDistantBlocksSorter
void InternalPrintConfiguration(std::ostream &os) const override
Configuration description for human reader, to be implemented by sub-classes.
const std::list< DICOMDatasetSorter::ConstPointer > ConstSorterList
Output descriptor for DICOMFileReader.
ReaderImplementationLevel
Describes how well the reader is tested for a certain file type (see mitk::DICOMFileReader).
Find image slices visible on a given plane.
std::vector< DICOMTagPath > DICOMTagPathList