MorphoGraphX
2.0-1-227
src
AutoTrim.hpp
Go to the documentation of this file.
1
//
2
// This file is part of MorphoGraphX - http://www.MorphoGraphX.org
3
// Copyright (C) 2012-2015 Richard S. Smith and collaborators.
4
//
5
// If you use MorphoGraphX in your work, please cite:
6
// http://dx.doi.org/10.7554/eLife.05864
7
//
8
// MorphoGraphX is free software, and is licensed under under the terms of the
9
// GNU General (GPL) Public License version 2.0, http://www.gnu.org/licenses.
10
//
11
#ifndef AUTO_TRIM_HPP
12
#define AUTO_TRIM_HPP
13
14
#include <
Process.hpp
>
15
16
namespace
mgx
17
{
26
class
mgxBase_EXPORT
AutoTrim
:
public
Process
{
27
public
:
28
AutoTrim
(
const
Process
& process) :
Process
(process)
29
{
30
setName(
"Stack/Canvas/AutoTrim"
);
31
setDesc(
"Trim stack boundary box (BBox) to keep only non-empty part.\n"
32
"A voxel is considered empty if its intensity is less or equal to the threshold."
);
33
setIcon(QIcon(
":/images/AutoTrim.png"
));
34
35
addParm(
"Threshold"
,
"Voxels below this threshold are considered empty."
,
"0"
);
36
}
37
38
bool
run
()
39
{
40
if
(!checkState().stack(STACK_ANY))
41
return
false
;
42
43
return
run(currentStack(), currentStack()->currentStore(), parm(
"Threshold"
).toInt());
44
}
45
46
bool
run(
Stack
* stack,
Store
* store,
int
threshold);
47
48
};
49
}
50
#endif
mgx::AutoTrim
Definition:
AutoTrim.hpp:26
Process.hpp
mgx::Stack
Definition:
Stack.hpp:33
mgx
Distributed matrix library.
Definition:
Assert.hpp:26
mgx::Process
Definition:
Process.hpp:219
mgx::AutoTrim::AutoTrim
AutoTrim(const Process &process)
Definition:
AutoTrim.hpp:28
mgx::AutoTrim::run
bool run()
Runs the process.
Definition:
AutoTrim.hpp:38
mgx::Store
Definition:
Store.hpp:33
Generated on Fri Jul 9 2021 18:34:53 for MorphoGraphX by
1.8.17