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
31 // init the file cache for filename filename and the DICOM tag id
32 virtual void init(std::string const & filename, TagId const & id) =0;
33 virtual bool isInitialized() const =0;
34 // copy DICOM attribute value to buffer dest with size bufSize
35 // caller needs to prepare buffer with right size
36 // For values with multiple entries (especially multiframe images)
37 // idx is the index of the requested value
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
virtual void init(std::string const &filename, TagId const &id)=0
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 this class could be used as a starte...