MeVisLab Toolbox Reference
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 public:
40
43
46 EnumField &getCompressorNameFld () const { return *_compressorNameFld ; }
47 NotifyField &getUpdateHintControlsFld() const { return *_updateHintControlsFld; }
48 const std::vector<std::string> &getCompressorNames () const { return _compressorNames ; }
49 MLImageFormatTagList &getCompressorArgs () { return _compressorArgs ; }
50 StringField* const* getHintNameFlds () const { return _hintNameFld ; }
51 DoubleField* const* getDblHintValFlds () const { return _dblHintValFld ; }
52 IntField * const* getIntHintValFlds () const { return _intHintValFld ; }
53 StringField* const* getStrHintValFlds () const { return _strHintValFld ; }
54 BoolField * const* getBoolHintValFlds () const { return _boolHintValFld ; }
55 BoolField * const* getIntHintVisibleFlds () const { return _intHintVisibleFld ; }
56 BoolField * const* getStrHintVisibleFlds () const { return _strHintVisibleFld ; }
57 BoolField * const* getDblHintVisibleFlds () const { return _dblHintVisibleFld ; }
58 BoolField * const* getBoolHintVisibleFlds () const { return _boolHintVisibleFld ; }
60
64
67 void updateHintVisibility(const DataCompressor *compressor);
68
73
80
85
88
89
90 protected:
91
94
95 //--- Members
97 std::vector<std::string> _compressorNames;
98
101
102
103 //--- Fields
104
107
111
114 StringField *_hintNameFld [DataCompressor::MaxHints];
115
116 DoubleField *_dblHintValFld [DataCompressor::MaxHints];
117 IntField *_intHintValFld [DataCompressor::MaxHints];
118 StringField *_strHintValFld [DataCompressor::MaxHints];
119 BoolField *_boolHintValFld [DataCompressor::MaxHints];
120
121 BoolField *_intHintVisibleFld [DataCompressor::MaxHints];
122 BoolField *_strHintVisibleFld [DataCompressor::MaxHints];
123 BoolField *_dblHintVisibleFld [DataCompressor::MaxHints];
124 BoolField *_boolHintVisibleFld[DataCompressor::MaxHints];
126
127 private:
134
135};
136
138
139#endif // __mlImageFormatCompressionParams_H
#define MLIMAGEFORMATBASE_EXPORT
Global and OS specific declarations for the MLImageFormatBase project.
Field to encapsulate a boolean value.
Definition mlFields.h:58
Abstract base class for ML data compression algorithms.
Field to encapsulate a double value.
Definition mlFields.h:538
Field to encapsulate an enumerated value.
Definition mlFields.h:195
Base class for all fields used in the ML.
Definition mlField.h:73
Field to encapsulate an integer value.
Definition mlFields.h:126
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 which are val...
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 first entry.
MLImageFormatTagList _compressorArgs
List of tags used as parameters for compressors.
void updateHintFieldsFromCompressor(DataCompressor *compressor)
Set 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)
Update 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:151
Field without value for notifications.
Definition mlFields.h:659
Field to encapsulate a string value.
Definition mlFields.h:610
Target mlrange_cast(Source arg)
Generic version of checked ML casts.