MeVisLab Toolbox Reference
mlAlgorithmModuleExampleWithOutputImageOutputImageHandler.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
4
5#pragma once
6
7#include <mlTypedHandlers.h>
8
9ML_START_NAMESPACE
10
19: public TypedCalculateOutputImageHandler< AlgorithmModuleExampleWithOutputImageOutputImageHandler,
20 /* numInputs = */ 1,
21 /* MLVariableType0 = */ ScalarTypes >
22{
23 public:
25 enum {
28
30 };
31
34
35 SubImageBox calculateInputSubImageBox(int inputIndex, const SubImageBox& outputSubImageBox) override final;
36
37 template <typename OUTTYPE>
38 void typedCalculateOutputSubImage(TSubImage<OUTTYPE>& outputSubImage,
39 const TSubImage<OUTTYPE>& inputSubImage,
40 UserThreadData* /*userThreadData*/);
41
42 private:
43 template <typename OUTTYPE>
44 void processBox(TSubImage<OUTTYPE>& outputSubImage,
45 const TSubImage<OUTTYPE>& inputSubImage,
46 const SubImageBox& box);
47
48 template <typename OUTTYPE>
49 void processRow(TSubImage<OUTTYPE>& outputSubImage,
50 const TSubImage<OUTTYPE>& inputSubImage,
51 const ImageVector& start,
52 const ImageVector& last);
53
54 template <typename OUTTYPE>
55 void invertValue(const OUTTYPE* inVoxel, OUTTYPE* outVoxel);
56};
57
58ML_END_NAMESPACE
SubImageBox calculateInputSubImageBox(int inputIndex, const SubImageBox &outputSubImageBox) override final
void typedCalculateOutputSubImage(TSubImage< OUTTYPE > &outputSubImage, const TSubImage< OUTTYPE > &inputSubImage, UserThreadData *)
Base class for thread local data that is passed to CalculateOutputImageHandler::calculateOutputSubIma...
TSubImageBox< MLint > SubImageBox
Defines the standard SubImageBox type used in the ML. Its size varies with the size of the MLint type...
const int MLVariableType0
Defines to use the result type of variable type 0.
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.