MeVisLab Toolbox Reference
DCMTree_FileCache.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2008, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef DCM_TREE_FILE_CACHE_H
14#define DCM_TREE_FILE_CACHE_H
15
16#include "DCMTree_TagId.h"
17
18#include <string>
19
20namespace DCMTree
21{
22 // Abstract base class for a DICOM tag cache.
23 // A DICOM tag can be left in file and read on demand.
24 // The file cache class handles the read requests.
25
27 {
28 public:
29 virtual ~FileCache() = default;
30
32 virtual void init(std::string const & filename, TagId const & id) =0;
33 virtual bool isInitialized() const =0;
38 virtual bool getValue(boost::uint32_t idx, unsigned char *dest, boost::uint32_t bufSize) =0;
39 virtual bool getValue(boost::uint32_t idx, unsigned char *dest, boost::uint32_t bufSize,
40 std::string & colorModel, unsigned int & fragment) =0;
41 };
42}
43
44#endif
#define DCMTREE_EXPORT
virtual bool isInitialized() const =0
virtual bool getValue(boost::uint32_t idx, unsigned char *dest, boost::uint32_t bufSize)=0
Copies DICOM attribute value to buffer dest with size bufSize.
virtual void init(std::string const &filename, TagId const &id)=0
Initializes the file cache for filename filename and the DICOM tag ID.
virtual ~FileCache()=default
virtual bool getValue(boost::uint32_t idx, unsigned char *dest, boost::uint32_t bufSize, std::string &colorModel, unsigned int &fragment)=0
Class to wrap a tag ID.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Class to dump a DCMTree DICOM message into a human-readable file.