MeVisLab Toolbox Reference
mlManagedSubImage.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2009, 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_MANAGED_SUB_IMAGE_H
14#define ML_MANAGED_SUB_IMAGE_H
15
16// Local includes
18
19// ML includes
20#include <mlSubImage.h>
21
22ML_START_NAMESPACE
23
27
31{
32public:
33
36
40 return *this;
41 }
42
44 ~ManagedSubImage() override {
45 free();
46 };
47
52 void* takeData() {
53 void* data = getData();
54 setData(nullptr);
55 return data;
56 }
57
58};
59
60
61ML_END_NAMESPACE
62
63#endif
64
65
ManagedSubImage()
Constructor.
ManagedSubImage & operator=(const SubImage &si)
Copy operator from SubImage.
~ManagedSubImage() override
Destruct the object and freeing the memory.
SubImage & operator=(const SubImage &si)
Definition mlSubImage.h:141
MLEXPORT void free()
void * getData() const
Returns the memory address of the memory managed by the subimage.
Definition mlSubImage.h:372
SubImage()
Constructor: Creates a subimage with no data.
Definition mlSubImage.h:84
MLEXPORT void setData(void *data)
Definition mlSubImage.h:377