VTK: Imaging/Color/vtkImageQuantizeRGBToIndex.h Source File

| VTK 9.3.1

vtkImageQuantizeRGBToIndex.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
43 #ifndef vtkImageQuantizeRGBToIndex_h
44 #define vtkImageQuantizeRGBToIndex_h
45
46 #include "vtkImageAlgorithm.h"
47 #include "vtkImagingColorModule.h" // For export macro
48
49 VTK_ABI_NAMESPACE_BEGIN
50 class vtkLookupTable;
51
52 class VTKIMAGINGCOLOR_EXPORT vtkImageQuantizeRGBToIndex : public vtkImageAlgorithm
53 {
54 public:
55 static vtkImageQuantizeRGBToIndex* New();
56 vtkTypeMacro(vtkImageQuantizeRGBToIndex, vtkImageAlgorithm);
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
64 vtkSetClampMacro(NumberOfColors, int, 2, 65536);
65 vtkGetMacro(NumberOfColors, int);
67
68 vtkSetVector3Macro(SamplingRate, int);
69 vtkGetVector3Macro(SamplingRate, int);
70
71 vtkSetMacro(SortIndexByLuminance, bool);
72 vtkGetMacro(SortIndexByLuminance, bool);
73 vtkBooleanMacro(SortIndexByLuminance, bool);
74
76
80 vtkGetObjectMacro(LookupTable, vtkLookupTable);
82
83 vtkGetMacro(InitializeExecuteTime, double);
84 vtkGetMacro(BuildTreeExecuteTime, double);
85 vtkGetMacro(LookupIndexExecuteTime, double);
86
88
91 vtkGetMacro(InputType, int);
93
95
98 vtkSetMacro(InitializeExecuteTime, double);
99 vtkSetMacro(BuildTreeExecuteTime, double);
100 vtkSetMacro(LookupIndexExecuteTime, double);
102
103 protected:
104 vtkImageQuantizeRGBToIndex();
105 ~vtkImageQuantizeRGBToIndex() override;
106
107 vtkLookupTable* LookupTable;
108 int NumberOfColors;
109 int InputType;
110 int SamplingRate[3];
111 bool SortIndexByLuminance;
112
113 double InitializeExecuteTime;
114 double BuildTreeExecuteTime;
115 double LookupIndexExecuteTime;
116
117 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
118 int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
119
120 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
121
122 private:
123 vtkImageQuantizeRGBToIndex(const vtkImageQuantizeRGBToIndex&) = delete;
124 void operator=(const vtkImageQuantizeRGBToIndex&) = delete;
125 };
126
127 VTK_ABI_NAMESPACE_END
128 #endif
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:39
vtkImageQuantizeRGBToIndex
generalized histograms up to 4 dimensions
Definition: vtkImageQuantizeRGBToIndex.h:53
vtkImageQuantizeRGBToIndex::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageQuantizeRGBToIndex::New
static vtkImageQuantizeRGBToIndex * New()
vtkImageQuantizeRGBToIndex::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkImageQuantizeRGBToIndex::LookupIndexExecuteTime
double LookupIndexExecuteTime
Definition: vtkImageQuantizeRGBToIndex.h:115
vtkImageQuantizeRGBToIndex::vtkImageQuantizeRGBToIndex
vtkImageQuantizeRGBToIndex()
vtkImageQuantizeRGBToIndex::SortIndexByLuminance
bool SortIndexByLuminance
Definition: vtkImageQuantizeRGBToIndex.h:111
vtkImageQuantizeRGBToIndex::BuildTreeExecuteTime
double BuildTreeExecuteTime
Definition: vtkImageQuantizeRGBToIndex.h:114
vtkImageQuantizeRGBToIndex::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageQuantizeRGBToIndex::NumberOfColors
int NumberOfColors
Definition: vtkImageQuantizeRGBToIndex.h:108
vtkImageQuantizeRGBToIndex::InitializeExecuteTime
double InitializeExecuteTime
Definition: vtkImageQuantizeRGBToIndex.h:113
vtkImageQuantizeRGBToIndex::LookupTable
vtkLookupTable * LookupTable
Definition: vtkImageQuantizeRGBToIndex.h:107
vtkImageQuantizeRGBToIndex::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
vtkImageQuantizeRGBToIndex::InputType
int InputType
Definition: vtkImageQuantizeRGBToIndex.h:109
vtkImageQuantizeRGBToIndex::~vtkImageQuantizeRGBToIndex
~vtkImageQuantizeRGBToIndex() override
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkLookupTable
map scalar values into colors via a lookup table
Definition: vtkLookupTable.h:73
vtkImageAlgorithm.h