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 
31 ML_START_NAMESPACE
32 
34 class MLImageFormat;
35 
36 // ----------------------------------------------------------
39 // ----------------------------------------------------------
41 {
42 public:
43 
45  enum ApplyModes {
46  Off = 0,
49 
50  NumApplyModes
51  };
52 
55 
57  ~MLImageFormatLoad() override;
58 
59 protected:
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 
99 private:
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 
128 ML_END_NAMESPACE
129 
130 #endif // __mlImageFormatLoad_H
131 
132 
#define MLIMAGEFORMAT_EXPORT
Global and OS specific declarations for the MLImageFormat project.
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Field to encapsulate an enumerated value.
Definition: mlFields.h:363
Base class for all fields used in the ML.
Definition: mlField.h:73
IO base class to manage/save/load/modify .mlimage files and to derive specific save,...
ML module class to load an ML PagedImage from a file of type MLImageFormat with .mlimage suffix.
ApplyModes
Modes how module reacts on parameter changes.
@ AutoApply
Updates loaded image on all parameter changes.
@ AutoClear
Invalidates loaded image on each 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
Calculates page outSubImg of output image with index outIndex by using inSubimgs.
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.
Definition: mlImageFormat.h:36
Field without value for notifications.
Definition: mlFields.h:1049
Class which represents an image, which manages properties of an image and image data which is located...
Definition: mlPagedImage.h:70
This class manages/represents a rectangular 6d image region which is organized linearly in memory.
Definition: mlSubImage.h:75
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
@ Off
Module does not react on input change, output WEM remains.
Definition: MLWEMIncludes.h:89