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 
9 ML_START_NAMESPACE
10 
19 : public TypedCalculateOutputImageHandler< AlgorithmModuleExampleWithOutputImageOutputImageHandler,
20  /* numInputs = */ 1,
21  /* MLVariableType0 = */ ScalarTypes >
22 {
23  public:
25  enum {
26  OutputSubImage_Type = MLVariableType0,
27  InputSubImage0_Type = MLVariableType0,
28 
29  InputSubImage0_ReadOnly = true
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 
58 ML_END_NAMESPACE
The AlgorithmModuleExampleWithOutputImageOutputImageHandler handles the page calculation of an output...
This template class manages/represents a rectangular 6d image region in memory which is organized lin...
Definition: mlTSubImage.h:110
TypedCalculateOutputImageHandler can be used as a base class for an own CalculateOutputImageHandler a...
Base class for thread local data that is passed to CalculateOutputImageHandler::calculateOutputSubIma...
const int MLVariableType0
Defines to use the result type of variable type 0.