MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
mlImageFormatCompressionParams.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, 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 ML_IMAGE_FORMAT_COMPRESSION_PARAMS_H
14#define ML_IMAGE_FORMAT_COMPRESSION_PARAMS_H
15
17
18// Local includes
20
21// ML includes
22#include "mlModuleIncludes.h"
23
25
26#include "mlDataCompressor.h"
27
28
30
31// Forward declaration.
32class MLImageFormat;
33
34// ----------------------------------------------------------
36// ----------------------------------------------------------
38{
39
40public:
43
47 {
48 return *_compressorNameFld;
49 }
51 {
52 return *_updateHintControlsFld;
53 }
54 const std::vector<std::string>& getCompressorNames() const
55 {
56 return _compressorNames;
57 }
59 {
60 return _compressorArgs;
61 }
63 {
64 return _hintNameFld;
65 }
67 {
68 return _dblHintValFld;
69 }
71 {
72 return _intHintValFld;
73 }
75 {
76 return _strHintValFld;
77 }
79 {
80 return _boolHintValFld;
81 }
83 {
84 return _intHintVisibleFld;
85 }
87 {
88 return _strHintVisibleFld;
89 }
91 {
92 return _dblHintVisibleFld;
93 }
95 {
96 return _boolHintVisibleFld;
97 }
99
103
106 void updateHintVisibility(const DataCompressor* compressor);
107
112
119
124
127
128
129protected:
132
133 //--- Members
135 std::vector<std::string> _compressorNames;
136
139
140
141 //--- Fields
142
145
149
152 StringField* _hintNameFld[DataCompressor::MaxHints];
153
154 DoubleField* _dblHintValFld[DataCompressor::MaxHints];
155 IntField* _intHintValFld[DataCompressor::MaxHints];
156 StringField* _strHintValFld[DataCompressor::MaxHints];
157 BoolField* _boolHintValFld[DataCompressor::MaxHints];
158
159 BoolField* _intHintVisibleFld[DataCompressor::MaxHints];
160 BoolField* _strHintVisibleFld[DataCompressor::MaxHints];
161 BoolField* _dblHintVisibleFld[DataCompressor::MaxHints];
162 BoolField* _boolHintVisibleFld[DataCompressor::MaxHints];
164
165private:
172};
173
175
176#endif // __mlImageFormatCompressionParams_H
#define MLIMAGEFORMATBASE_EXPORT
Field to encapsulate a boolean value.
Definition mlFields.h:56
Abstract base class for ML data compression algorithms.
Field to encapsulate a double value.
Definition mlFields.h:567
Field to encapsulate an enumerated value.
Definition mlFields.h:185
Base class for all fields used in the ML.
Definition mlField.h:73
Field to encapsulate an integer value.
Definition mlFields.h:123
Helper class for compressor arguments managed inside of a module.
void updateCompressorArgsFromHintFields(const DataCompressor *compressor)
Clears the compressor arguments and updates them with new values from those hint fields that are vali...
void updateCompressionFieldsToLoaderState(const MLImageFormat &loader)
Helper function to update compression fields to the compressor settings of the the passed loader.
MLImageFormatCompressionParams(Module &baseOp)
Constructor; only available with a valid Module reference.
EnumField * _compressorNameFld
Compression scheme used for stored image data. Default is the first entry.
MLImageFormatTagList _compressorArgs
List of tags used as parameters for compressors.
void updateHintFieldsFromCompressor(DataCompressor *compressor)
Sets up all hint fields and their visibility according to the compressor configuration.
Module & _baseOp
Reference to the related Module.
NotifyField * _updateHintControlsFld
Field to notify a possible GUI layouter of the modules to update the visibility and name displays of ...
void resetCompressionParams()
Reset _compressionFld, _tagListFld, and all _tagListFld.
void updateHintVisibility(const DataCompressor *compressor)
Sets visibility and hint name fields according to the given compressor configuration.
std::vector< std::string > _compressorNames
List of available compressor names stored when creating the module.
const std::vector< std::string > & getCompressorNames() const
void handleCompressionFieldChanges(Field *field)
Updates the compressor and the fields showing compression parameters.
Class defining a list of tags used in the MLImageFormat class.
File format class to store, load, and modify a PagedImage in a file.
Base class for an image processing module of the ML.
Definition mlModule.h:150
Field without value for notifications.
Definition mlFields.h:687
Field to encapsulate a string value.
Definition mlFields.h:634
Target mlrange_cast(Source arg)
Generic version of checked ML casts.