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
23
27
31{
32public:
33
36
39 SubImage::operator=(si);
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
62
63#endif
64
65
ManagedSubImage is derived from SubImage and frees its allocated memory automatically when it is dest...
ManagedSubImage()
Constructor.
ManagedSubImage & operator=(const SubImage &si)
Copy operator from SubImage.
~ManagedSubImage() override
Destruct the object, freeing the memory.
void * takeData()
Returns the data pointer and set the internal data to NULL (so it passes the ownership of the data to...
This class manages/represents a rectangular 6d image region which is organized linearly in memory.
Definition mlSubImage.h:75
Target mlrange_cast(Source arg)
Generic version of checked ML casts.