vtkOMETIFFChannelCalculator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
13 #ifndef vtkOMETIFFChannelCalculator_h
14 #define vtkOMETIFFChannelCalculator_h
15 
16 #include "vtkPVVTKExtensionsFiltersGeneralModule.h" //needed for exports
18 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
19 
20 #include <map> // needed for map
21 
23 class vtkScalarsToColors;
24 class VTKPVVTKEXTENSIONSFILTERSGENERAL_EXPORT vtkOMETIFFChannelCalculator
26 {
27 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
33 
36  vtkGetObjectMacro(ChannelSelection, vtkDataArraySelection);
38 
40 
43  void SetChannel1LUT(vtkScalarsToColors* stc) { this->SetLUT("Channel_1", stc); }
44  void SetChannel2LUT(vtkScalarsToColors* stc) { this->SetLUT("Channel_2", stc); }
45  void SetChannel3LUT(vtkScalarsToColors* stc) { this->SetLUT("Channel_3", stc); }
46  void SetChannel4LUT(vtkScalarsToColors* stc) { this->SetLUT("Channel_4", stc); }
47  void SetChannel5LUT(vtkScalarsToColors* stc) { this->SetLUT("Channel_5", stc); }
48  void SetChannel6LUT(vtkScalarsToColors* stc) { this->SetLUT("Channel_6", stc); }
49  void SetChannel7LUT(vtkScalarsToColors* stc) { this->SetLUT("Channel_7", stc); }
50  void SetChannel8LUT(vtkScalarsToColors* stc) { this->SetLUT("Channel_8", stc); }
51  void SetChannel9LUT(vtkScalarsToColors* stc) { this->SetLUT("Channel_9", stc); }
52  void SetChannel10LUT(vtkScalarsToColors* stc) { this->SetLUT("Channel_10", stc); }
53  void SetLUT(const char* channelName, vtkScalarsToColors*);
55 
57 
60  void SetChannel1Weight(double wght) { this->SetWeight("Channel_1", wght); }
61  void SetChannel2Weight(double wght) { this->SetWeight("Channel_2", wght); }
62  void SetChannel3Weight(double wght) { this->SetWeight("Channel_3", wght); }
63  void SetChannel4Weight(double wght) { this->SetWeight("Channel_4", wght); }
64  void SetChannel5Weight(double wght) { this->SetWeight("Channel_5", wght); }
65  void SetChannel6Weight(double wght) { this->SetWeight("Channel_6", wght); }
66  void SetChannel7Weight(double wght) { this->SetWeight("Channel_7", wght); }
67  void SetChannel8Weight(double wght) { this->SetWeight("Channel_8", wght); }
68  void SetChannel9Weight(double wght) { this->SetWeight("Channel_9", wght); }
69  void SetChannel10Weight(double wght) { this->SetWeight("Channel_10", wght); }
70  void SetWeight(const char* channelName, double weight);
72  vtkMTimeType GetMTime() override;
73 
74 protected:
76  ~vtkOMETIFFChannelCalculator() override;
77 
78  int FillInputPortInformation(int port, vtkInformation* info) override;
80 
81  struct LUTItem
82  {
84  double Weight;
85  };
86 
87  std::map<std::string, LUTItem> LUTMap;
89 
90 private:
92  void operator=(const vtkOMETIFFChannelCalculator&) = delete;
93 };
94 
95 #endif
vtkObjectBase::operator=
void operator=(const vtkObjectBase &)
vtkPassInputTypeAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkOMETIFFChannelCalculator::SetChannel3LUT
void SetChannel3LUT(vtkScalarsToColors *stc)
Set the transfer functions to use to map scalars to colors.
Definition: vtkOMETIFFChannelCalculator.h:45
vtkOMETIFFChannelCalculator::LUTMap
std::map< std::string, LUTItem > LUTMap
Definition: vtkOMETIFFChannelCalculator.h:87
vtkPassInputTypeAlgorithm.h
vtkOMETIFFChannelCalculator::SetChannel3Weight
void SetChannel3Weight(double wght)
Set weights for each of the channels.
Definition: vtkOMETIFFChannelCalculator.h:62
vtkOMETIFFChannelCalculator::LUTItem::LUT
vtkSmartPointer< vtkScalarsToColors > LUT
Definition: vtkOMETIFFChannelCalculator.h:83
vtkOMETIFFChannelCalculator::SetChannel1Weight
void SetChannel1Weight(double wght)
Set weights for each of the channels.
Definition: vtkOMETIFFChannelCalculator.h:60
vtkInformationVector
vtkSmartPointer< vtkScalarsToColors >
vtkOMETIFFChannelCalculator::SetChannel5Weight
void SetChannel5Weight(double wght)
Set weights for each of the channels.
Definition: vtkOMETIFFChannelCalculator.h:64
vtkOMETIFFChannelCalculator::SetChannel8LUT
void SetChannel8LUT(vtkScalarsToColors *stc)
Set the transfer functions to use to map scalars to colors.
Definition: vtkOMETIFFChannelCalculator.h:50
vtkDataArraySelection
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
vtkPassInputTypeAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkPassInputTypeAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkOMETIFFChannelCalculator::SetChannel6Weight
void SetChannel6Weight(double wght)
Set weights for each of the channels.
Definition: vtkOMETIFFChannelCalculator.h:65
vtkIndent
vtkOMETIFFChannelCalculator
filter to combine multiple channels into colors
Definition: vtkOMETIFFChannelCalculator.h:24
vtkOMETIFFChannelCalculator::SetChannel10LUT
void SetChannel10LUT(vtkScalarsToColors *stc)
Set the transfer functions to use to map scalars to colors.
Definition: vtkOMETIFFChannelCalculator.h:52
vtkOMETIFFChannelCalculator::SetChannel9Weight
void SetChannel9Weight(double wght)
Set weights for each of the channels.
Definition: vtkOMETIFFChannelCalculator.h:68
vtkSmartPointer.h
vtkScalarsToColors
vtkOMETIFFChannelCalculator::LUTItem
Definition: vtkOMETIFFChannelCalculator.h:81
vtkOMETIFFChannelCalculator::SetChannel1LUT
void SetChannel1LUT(vtkScalarsToColors *stc)
Set the transfer functions to use to map scalars to colors.
Definition: vtkOMETIFFChannelCalculator.h:43
vtkOMETIFFChannelCalculator::SetChannel2LUT
void SetChannel2LUT(vtkScalarsToColors *stc)
Set the transfer functions to use to map scalars to colors.
Definition: vtkOMETIFFChannelCalculator.h:44
vtkOMETIFFChannelCalculator::SetChannel8Weight
void SetChannel8Weight(double wght)
Set weights for each of the channels.
Definition: vtkOMETIFFChannelCalculator.h:67
vtkInformation
vtkOMETIFFChannelCalculator::SetChannel6LUT
void SetChannel6LUT(vtkScalarsToColors *stc)
Set the transfer functions to use to map scalars to colors.
Definition: vtkOMETIFFChannelCalculator.h:48
vtkPassInputTypeAlgorithm::New
static vtkPassInputTypeAlgorithm * New()
vtkOMETIFFChannelCalculator::LUTItem::Weight
double Weight
Definition: vtkOMETIFFChannelCalculator.h:84
vtkOMETIFFChannelCalculator::ChannelSelection
vtkDataArraySelection * ChannelSelection
Definition: vtkOMETIFFChannelCalculator.h:88
vtkOMETIFFChannelCalculator::SetChannel2Weight
void SetChannel2Weight(double wght)
Set weights for each of the channels.
Definition: vtkOMETIFFChannelCalculator.h:61
vtkOMETIFFChannelCalculator::SetChannel7Weight
void SetChannel7Weight(double wght)
Set weights for each of the channels.
Definition: vtkOMETIFFChannelCalculator.h:66
vtkOMETIFFChannelCalculator::SetChannel9LUT
void SetChannel9LUT(vtkScalarsToColors *stc)
Set the transfer functions to use to map scalars to colors.
Definition: vtkOMETIFFChannelCalculator.h:51
vtkOMETIFFChannelCalculator::SetChannel7LUT
void SetChannel7LUT(vtkScalarsToColors *stc)
Set the transfer functions to use to map scalars to colors.
Definition: vtkOMETIFFChannelCalculator.h:49
vtkOMETIFFChannelCalculator::SetChannel4Weight
void SetChannel4Weight(double wght)
Set weights for each of the channels.
Definition: vtkOMETIFFChannelCalculator.h:63
vtkOMETIFFChannelCalculator::SetChannel10Weight
void SetChannel10Weight(double wght)
Set weights for each of the channels.
Definition: vtkOMETIFFChannelCalculator.h:69
vtkPassInputTypeAlgorithm
vtkOMETIFFChannelCalculator::SetChannel4LUT
void SetChannel4LUT(vtkScalarsToColors *stc)
Set the transfer functions to use to map scalars to colors.
Definition: vtkOMETIFFChannelCalculator.h:46
vtkOMETIFFChannelCalculator::SetChannel5LUT
void SetChannel5LUT(vtkScalarsToColors *stc)
Set the transfer functions to use to map scalars to colors.
Definition: vtkOMETIFFChannelCalculator.h:47