MeVisLab Toolbox Reference
DCMTree_MFPixelTag.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_MFPIXEL_TAG_H
14#define DCM_TREE_MFPIXEL_TAG_H
15
16#include <cstddef>
17#include <string>
18
19#include <boost/shared_array.hpp>
20#include <boost/shared_ptr.hpp>
21
22#include "DCMTree_Tag.h"
23#include "DCMTree_Value.h"
24#include "DCMTree_TagId.h"
25#include "DCMTree_FileCache.h"
26
27
28namespace DCMTree
29{
30 // This class manages pixel data access of DICOM multi-frame images.
31 // Pixel data is not loaded to memory on creation but can be loaded
32 // on demand to a user defined and controlled buffer.
33 // This class is an abstract class, as the file handling differs
34 // for different parsers - at the moment, dcmtk from OFFIS is supported.
36 {
37 public:
39 typedef boost::shared_ptr<FileCache> file_cache_t;
40
42 std::string const & filename,
43 boost::uint32_t value_count,
44 boost::uint32_t value_size);
45
46 ~MFPixelTag() override;
47
49 TagPtr copy() const override = 0;
50
51 virtual file_cache_t createFileCache() const =0;
52 virtual pixel_cont_t getFrame(boost::uint32_t idx) =0;
53 virtual pixel_cont_t getFrame(boost::uint32_t idx, FileCache *cache) =0;
54 virtual pixel_cont_t getFrame(boost::uint32_t idx, std::string & colorModel, unsigned int & fragment) =0;
55 virtual pixel_cont_t getFrame(boost::uint32_t idx, std::string & colorModel, unsigned int & fragment,
56 DCMTree::FileCache *cache) =0;
57 virtual boost::uint32_t numberOfFrames() const;
58 virtual boost::uint32_t frameSize() const;
59
60 // ----- DCMTree_Tag Interface -----
61 boost::uint32_t numberOfValues() const override;
62 boost::uint32_t getValueSize (unsigned int) const override;
63 boost::uint32_t getValueSize () const override;
64
65 protected:
66 boost::uint32_t valueCount() const { return value_count_; }
67 boost::uint32_t valueSize() const { return value_size_; }
68 std::string const & filename() const { return filename_; }
69
70 private:
71 boost::uint32_t value_count_;
72 boost::uint32_t value_size_;
73 std::string filename_;
74 };
75
76}
77
78#endif
#define DCMTREE_EXPORT
boost::uint32_t getValueSize() const override
Returns the total size in bytes of the data of the values.
virtual file_cache_t createFileCache() const =0
boost::uint32_t numberOfValues() const override
Returns the number of values of this tag.
virtual pixel_cont_t getFrame(boost::uint32_t idx, std::string &colorModel, unsigned int &fragment)=0
virtual pixel_cont_t getFrame(boost::uint32_t idx, FileCache *cache)=0
std::string const & filename() const
virtual pixel_cont_t getFrame(boost::uint32_t idx)=0
boost::uint32_t valueSize() const
~MFPixelTag() override
boost::uint32_t valueCount() const
DCMTree::pixel_cont_t pixel_cont_t
boost::shared_ptr< FileCache > file_cache_t
TagPtr copy() const override=0
Makes a deep copy of this, overwriting the original copy method.
virtual boost::uint32_t frameSize() const
virtual boost::uint32_t numberOfFrames() const
boost::uint32_t getValueSize(unsigned int) const override
Returns the size in bytes of the data of the value-object with index idx.
MFPixelTag(TagInfo const &tagInfo, std::string const &filename, boost::uint32_t value_count, boost::uint32_t value_size)
virtual pixel_cont_t getFrame(boost::uint32_t idx, std::string &colorModel, unsigned int &fragment, DCMTree::FileCache *cache)=0
Class to carry meta information about a specific tag.
TagInfo const & tagInfo() const
Tag()
Constructor.
Class to dump a DCMTree DICOM message into a human-readable file.
boost::shared_array< unsigned char > pixel_cont_t
Definition DCMTree_Lib.h:93
boost::shared_ptr< Tag > TagPtr
Shared pointer to tag.
Definition DCMTree_Lib.h:56