MeVisLab Toolbox Reference
mlImageFormatLoad.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_LOAD_H
14#define ML_IMAGE_FORMAT_LOAD_H
15
16
20
21#include "MLImageFormatSystem.h"
22
23// ML includes
24#include "mlModuleIncludes.h"
25
26#include "mlDataCompressor.h"
27
28#include "mlImageFormatIOBase.h"
29
30
31ML_START_NAMESPACE
32
34class MLImageFormat;
35
36// ----------------------------------------------------------
39// ----------------------------------------------------------
41{
42public:
43
52
55
58
59protected:
60
61 // ----------------------------------------------------------
64 // ----------------------------------------------------------
66 virtual void _open();
67
69 virtual void _close();
71
72 // ----------------------------------------------------------
75 // ----------------------------------------------------------
77 void activateAttachments() override;
78
80 void handleNotification (Field *field) override;
82
83 // ----------------------------------------------------------
86 // ----------------------------------------------------------
88 void calculateOutputImageProperties(int outputIndex, PagedImage* outputImage) override;
89
95 void calculateOutputSubImage(SubImage *outSubImg, int outIndex, SubImage *inSubImgs) override;
96
98
99private:
100
101 // ----------------------------------------------------------
104 // ----------------------------------------------------------
106 MLImageFormat *_loader;
107
109 EnumField *_applyModeFld;
110
112 NotifyField *_closeFld;
113
115 NotifyField *_openFld;
116
120 BoolField *_suppressCheckSumTestsFld;
122
125};
126
127
128ML_END_NAMESPACE
129
130#endif // __mlImageFormatLoad_H
131
132
#define MLIMAGEFORMAT_EXPORT
Global and OS specific declarations for the MLImageFormat project.
MLImageFormatIOBase(int numIns=0, int numOuts=0)
Constructor for a module with numIns inputs and numOuts outputs.
ApplyModes
Modes how module reacts on parameter changes.
@ AutoApply
Updates loaded image on all parameter changes.
@ NumApplyModes
Number of modes, not to be used as mode.
@ AutoClear
Invalidates loaded image on each change.
@ Off
Leave loaded image as it it even on change.
virtual void _close()
Closes file and deletes loader instance.
MLImageFormatLoad()
Constructor.
void handleNotification(Field *field) override
Handle field changes of the field field.
void activateAttachments() override
Update internal module state after load or clone.
void calculateOutputImageProperties(int outputIndex, PagedImage *outputImage) override
Sets properties of the output image at output outIndex.
~MLImageFormatLoad() override
Destructor, closes file if still not done.
void calculateOutputSubImage(SubImage *outSubImg, int outIndex, SubImage *inSubImgs) override
virtual void _open()
Create loader instance, opens file and provide it at module output.
File format class to store, load, and modify a PagedImage in a file.
#define ML_MODULE_CLASS_HEADER(className)