33 for (
auto frameIter = m_ScanResult.cbegin(); frameIter != m_ScanResult.cend(); ++frameIter )
35 if ( **frameIter == *frame )
37 return (*frameIter)->GetTagValueAsString(tag);
41 if ( m_ScannedTags.find( tag ) != m_ScannedTags.cend() )
43 if ( std::find( m_InputFilenames.cbegin(), m_InputFilenames.cend(), frame->
Filename )
44 == m_InputFilenames.cend() )
48 std::stringstream errorstring;
49 errorstring <<
"Invalid call to DICOMGDCMTagCache::GetTagValue( "
51 <<
" ). Filename was never mentioned before!";
53 throw std::invalid_argument( errorstring.str() );
60 std::stringstream errorstring;
61 errorstring <<
"Invalid call to DICOMGDCMTagCache::GetTagValue( ";
62 tag.
Print( errorstring );
63 errorstring <<
" ). Tag was never mentioned before!";
65 throw std::invalid_argument( errorstring.str() );
90 m_ScannedTags = scannedTags;
91 m_InputFilenames = inputFiles;
95 m_ScanResult.reserve(m_InputFilenames.size());
97 for (
auto inputIter = m_InputFilenames.cbegin(); inputIter != m_InputFilenames.cend(); ++inputIter)
100 m_Scanner->GetMapping(inputIter->c_str())).GetPointer());
107 return *(this->m_Scanner);
Class is used to identify (nested) attributes in a DICOM dataset. In contrast to the class DICOMTag...
const unsigned int FrameNo
frame number, starting with 0
Representation of a DICOM tag.
const gdcm::Scanner & GetScanner() const
virtual DICOMDatasetFinding GetTagValue(DICOMImageFrameInfo *frame, const DICOMTag &tag) const override
Describes a frame within a DICOM file.
std::list< DICOMDatasetFinding > FindingsListType
const std::string Filename
absolute filename
PathIndexType Size() const
virtual ~DICOMGDCMTagCache()
void InitCache(const std::set< DICOMTag > &scannedTags, const std::shared_ptr< gdcm::Scanner > &scanner, const StringList &inputFiles)
std::vector< std::string > StringList
virtual DICOMDatasetAccessingImageFrameList GetFrameInfoList() const override
Retrieve a result list for file-by-file tag access.
std::vector< DICOMDatasetAccessingImageFrameInfo::Pointer > DICOMDatasetAccessingImageFrameList
std::list< DICOMDatasetFinding > FindingsListType
void Print(std::ostream &os) const
add "(group-id,element-id) name" to given stream
NodeInfo & GetFirstNode()
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.