Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkLookupTable.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkLookupTable.h"
14 #include <itkProcessObject.h>
15 
16 #include <vtkColorTransferFunction.h>
17 #include <vtkPiecewiseFunction.h>
18 
19 #include <Colortables/HotIron.h>
20 #include <Colortables/Jet.h>
21 #include <Colortables/Inferno.h>
22 #include <Colortables/Viridis.h>
23 #include <Colortables/Plasma.h>
24 #include <Colortables/Magma.h>
25 #include <Colortables/Multilabel.h>
26 #include <Colortables/PET20.h>
27 #include <Colortables/PETColor.h>
29 
30 std::vector<std::string> mitk::LookupTable::typenameList = {
31  "Grayscale",
32  "Inverse Grayscale",
33  "Hot Iron",
34  "Jet",
35  "Jet Transparent",
36  "Plasma",
37  "Inferno",
38  "Viridis",
39  "Magma",
40  "Legacy Binary",
41  "Legacy Rainbow Color",
42  "Multilabel",
43  "PET Color",
44  "PET 20"
45 };
46 
48  : m_LookupTable(vtkSmartPointer<vtkLookupTable>::New())
49  , m_Window(0.0)
50  , m_Level(0.0)
51  , m_Opacity(1.0)
52  , m_Type(mitk::LookupTable::GRAYSCALE)
53 {
55 }
56 
58  : itk::DataObject()
59  , m_LookupTable(vtkSmartPointer<vtkLookupTable>::New())
60  , m_Window(other.m_Window)
61  , m_Level(other.m_Level)
62  , m_Opacity(other.m_Opacity)
63  , m_Type(other.m_Type)
64 {
65  m_LookupTable->DeepCopy(other.m_LookupTable);
66 }
67 
69 {
70 }
71 
72 void mitk::LookupTable::SetVtkLookupTable(vtkSmartPointer<vtkLookupTable> lut)
73 {
74  if ((!lut) || (m_LookupTable == lut))
75  {
76  return;
77  }
78 
79  m_LookupTable = lut;
80  this->Modified();
81 }
82 
84 {
85  if (m_Type == type)
86  return;
87 
88  switch (type)
89  {
92  break;
95  break;
98  break;
100  this->BuildJetLookupTable();
101  break;
103  this->BuildJetLookupTable(true);
104  break;
106  this->BuildPlasmaLookupTable();
107  break;
109  this->BuildInfernoLookupTable();
110  break;
112  this->BuildViridisLookupTable();
113  break;
115  this->BuildMagmaLookupTable();
116  break;
119  break;
122  break;
124  this->BuildPETColorLookupTable();
125  break;
127  this->BuildPET20LookupTable();
128  break;
131  break;
132  default:
133  MITK_ERROR << "non-existing colormap";
134  return;
135  }
136 
137  m_Type = type;
138 }
139 
140 void mitk::LookupTable::SetType(const std::string &typeName)
141 {
142  for (size_t i = 0; i < typenameList.size(); ++i)
143  {
144  if (typenameList.at(i) == typeName)
145  {
146  this->SetType(static_cast<mitk::LookupTable::LookupTableType>(i));
147  }
148  }
149 }
150 
152 {
153  return m_Type;
154 }
155 
157 {
158  if (static_cast<unsigned int>(m_Type) < typenameList.size())
159  {
160  return typenameList.at(m_Type);
161  }
162 
163  return "";
164 }
165 
167 {
168  int noValues = m_LookupTable->GetNumberOfTableValues();
169 
170  double rgba[4];
171 
172  for (int i = 0; i < noValues; i++)
173  {
174  m_LookupTable->GetTableValue(i, rgba);
175  rgba[3] = opacity;
176  m_LookupTable->SetTableValue(i, rgba);
177  }
178  this->Modified(); // need to call modified, since LookupTableProperty seems to be unchanged so no widget-update is
179  // executed
180 }
181 
182 void mitk::LookupTable::ChangeOpacity(int index, float opacity)
183 {
184  int noValues = m_LookupTable->GetNumberOfTableValues();
185  if (index > noValues)
186  {
187  MITK_INFO << "could not change opacity. index exceed size of lut ... " << std::endl;
188  return;
189  }
190 
191  double rgba[4];
192 
193  m_LookupTable->GetTableValue(index, rgba);
194  rgba[3] = opacity;
195  m_LookupTable->SetTableValue(index, rgba);
196 
197  this->Modified(); // need to call modified, since LookupTableProperty seems to be unchanged so no widget-update is
198  // executed
199 }
200 
201 void mitk::LookupTable::GetColor(double value, double rgb[3])
202 {
203  this->GetVtkLookupTable()->GetColor(value, rgb);
204 }
205 
206 void mitk::LookupTable::GetTableValue(int index, double rgba[4])
207 {
208  this->GetVtkLookupTable()->GetTableValue(index, rgba);
209 }
210 
211 void mitk::LookupTable::SetTableValue(int index, double rgba[4])
212 {
213  this->GetVtkLookupTable()->SetTableValue(index, rgba);
214 }
215 
216 vtkSmartPointer<vtkLookupTable> mitk::LookupTable::GetVtkLookupTable() const
217 {
218  return m_LookupTable;
219 }
220 
222 {
223  return m_LookupTable->GetPointer(0);
224 }
225 
227 {
228  if (m_LookupTable == other.GetVtkLookupTable())
229  return true;
230  vtkLookupTable *olut = other.GetVtkLookupTable();
231  if (olut == nullptr)
232  return false;
233 
234  bool equal = (m_LookupTable->GetNumberOfColors() == olut->GetNumberOfColors()) &&
235  (m_LookupTable->GetTableRange()[0] == olut->GetTableRange()[0]) &&
236  (m_LookupTable->GetTableRange()[1] == olut->GetTableRange()[1]) &&
237  (m_LookupTable->GetHueRange()[0] == olut->GetHueRange()[0]) &&
238  (m_LookupTable->GetHueRange()[1] == olut->GetHueRange()[1]) &&
239  (m_LookupTable->GetSaturationRange()[0] == olut->GetSaturationRange()[0]) &&
240  (m_LookupTable->GetSaturationRange()[1] == olut->GetSaturationRange()[1]) &&
241  (m_LookupTable->GetValueRange()[0] == olut->GetValueRange()[0]) &&
242  (m_LookupTable->GetValueRange()[1] == olut->GetValueRange()[1]) &&
243  (m_LookupTable->GetAlphaRange()[0] == olut->GetAlphaRange()[0]) &&
244  (m_LookupTable->GetAlphaRange()[1] == olut->GetAlphaRange()[1]) &&
245  (m_LookupTable->GetRamp() == olut->GetRamp()) && (m_LookupTable->GetScale() == olut->GetScale()) &&
246  (m_LookupTable->GetAlpha() == olut->GetAlpha()) &&
247  (m_LookupTable->GetTable()->GetNumberOfTuples() == olut->GetTable()->GetNumberOfTuples());
248  if (equal == false)
249  return false;
250  for (vtkIdType i = 0; i < m_LookupTable->GetNumberOfTableValues(); i++)
251  {
252  bool tvequal = (m_LookupTable->GetTableValue(i)[0] == olut->GetTableValue(i)[0]) &&
253  (m_LookupTable->GetTableValue(i)[1] == olut->GetTableValue(i)[1]) &&
254  (m_LookupTable->GetTableValue(i)[2] == olut->GetTableValue(i)[2]) &&
255  (m_LookupTable->GetTableValue(i)[3] == olut->GetTableValue(i)[3]);
256  if (tvequal == false)
257  return false;
258  }
259  return true;
260 }
261 
263 {
264  return !(*this == other);
265 }
266 
268 {
269  if (this == &LookupTable)
270  {
271  return *this;
272  }
273  else
274  {
275  m_LookupTable = LookupTable.GetVtkLookupTable();
276  return *this;
277  }
278 }
279 
281 {
282  if (this->GetSource())
283  {
284  this->GetSource()->UpdateOutputInformation();
285  }
286 }
287 
289 {
290 }
291 
293 {
294  return false;
295 }
296 
298 {
299  // normally we should check if the requested region lies within the
300  // largest possible region. Since for lookup-tables we assume, that the
301  // requested region is always the largest possible region, we can always
302  // return true!
303  return true;
304 }
305 
306 void mitk::LookupTable::SetRequestedRegion(const itk::DataObject *)
307 {
308  // not implemented, since we always want to have the RequestedRegion
309  // to be set to LargestPossibleRegion
310 }
311 
312 vtkSmartPointer<vtkColorTransferFunction> mitk::LookupTable::CreateColorTransferFunction()
313 {
314  vtkSmartPointer<vtkColorTransferFunction> colorFunction = vtkSmartPointer<vtkColorTransferFunction>::New();
315 
317  int num_of_values = m_LookupTable->GetNumberOfTableValues();
318 
319  auto cols = new double[3 * num_of_values];
320  double *colsHead = cols;
321 
322  for (int i = 0; i < num_of_values; ++i)
323  {
324  *cols = static_cast<double>(*rawLookupTable) / 255.0;
325  ++cols;
326  ++rawLookupTable;
327  *cols = static_cast<double>(*rawLookupTable) / 255.0;
328  ++cols;
329  ++rawLookupTable;
330  *cols = static_cast<double>(*rawLookupTable) / 255.0;
331  ++cols;
332  ++rawLookupTable;
333  ++rawLookupTable;
334  }
335  colorFunction->BuildFunctionFromTable(
336  m_LookupTable->GetTableRange()[0], m_LookupTable->GetTableRange()[1], num_of_values, colsHead);
337  return colorFunction;
338 }
339 
340 void mitk::LookupTable::CreateColorTransferFunction(vtkColorTransferFunction *&colorFunction)
341 {
342  colorFunction = this->CreateColorTransferFunction();
343 }
344 
345 vtkSmartPointer<vtkPiecewiseFunction> mitk::LookupTable::CreateOpacityTransferFunction()
346 {
347  vtkSmartPointer<vtkPiecewiseFunction> opacityFunction = vtkSmartPointer<vtkPiecewiseFunction>::New();
348 
350  int num_of_values = m_LookupTable->GetNumberOfTableValues();
351 
352  auto alphas = new double[num_of_values];
353  double *alphasHead = alphas;
354 
355  rgba += 3;
356  for (int i = 0; i < num_of_values; ++i)
357  {
358  *alphas = static_cast<double>(*rgba) / 255.0;
359  ++alphas;
360  rgba += 4;
361  }
362 
363  opacityFunction->BuildFunctionFromTable(
364  m_LookupTable->GetTableRange()[0], m_LookupTable->GetTableRange()[1], num_of_values, alphasHead);
365  return opacityFunction;
366 }
367 
368 void mitk::LookupTable::CreateOpacityTransferFunction(vtkPiecewiseFunction *&opacityFunction)
369 {
370  opacityFunction = this->CreateOpacityTransferFunction();
371 }
372 
373 vtkSmartPointer<vtkPiecewiseFunction> mitk::LookupTable::CreateGradientTransferFunction()
374 {
375  vtkSmartPointer<vtkPiecewiseFunction> gradientFunction = vtkSmartPointer<vtkPiecewiseFunction>::New();
376 
378  int num_of_values = m_LookupTable->GetNumberOfTableValues();
379 
380  auto alphas = new double[num_of_values];
381  double *alphasHead = alphas;
382 
383  rgba += 3;
384  for (int i = 0; i < num_of_values; ++i)
385  {
386  *alphas = static_cast<double>(*rgba) / 255.0;
387  ++alphas;
388  rgba += 4;
389  }
390 
391  gradientFunction->BuildFunctionFromTable(
392  m_LookupTable->GetTableRange()[0], m_LookupTable->GetTableRange()[1], num_of_values, alphasHead);
393  return gradientFunction;
394 }
395 
396 void mitk::LookupTable::CreateGradientTransferFunction(vtkPiecewiseFunction *&gradientFunction)
397 {
398  gradientFunction = this->CreateGradientTransferFunction();
399 }
400 
401 void mitk::LookupTable::PrintSelf(std::ostream &os, itk::Indent indent) const
402 {
403  os << indent;
404  m_LookupTable->PrintHeader(os, vtkIndent());
405 }
406 
407 itk::LightObject::Pointer mitk::LookupTable::InternalClone() const
408 {
409  itk::LightObject::Pointer result(new Self(*this));
410  result->UnRegister();
411  return result;
412 }
413 
415 {
416  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
417  lut->SetRampToLinear();
418  lut->SetSaturationRange(0.0, 0.0);
419  lut->SetHueRange(0.0, 0.0);
420  lut->SetValueRange(0.0, 1.0);
421  lut->Build();
422 
423  m_LookupTable = lut;
424  this->Modified();
425 }
426 
428 {
429  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
430  lut->SetRampToLinear();
431  lut->SetSaturationRange(0.0, 0.0);
432  lut->SetHueRange(0.0, 0.0);
433  lut->SetValueRange(0.0, 1.0);
434  lut->Build();
435  lut->SetTableValue(0, 0.0, 0.0, 0.0, 0.0);
436 
437  m_LookupTable = lut;
438  this->Modified();
439 }
440 
442 {
443  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
444  lut->SetTableRange(0, 1);
445  lut->SetSaturationRange(0, 0);
446  lut->SetHueRange(0, 0);
447  lut->SetValueRange(1, 0);
448  lut->SetAlphaRange(1, 0);
449  lut->Build();
450 
451  m_LookupTable = lut;
452  this->Modified();
453 }
454 
456 {
457  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
458  lut->SetNumberOfTableValues(256);
459  lut->Build();
460 
461  for (int i = 0; i < 256; i++)
462  {
463  lut->SetTableValue(
464  i, (double)HotIron[i][0] / 255.0, (double)HotIron[i][1] / 255.0, (double)HotIron[i][2] / 255.0, 1.0);
465  }
466 
467  m_LookupTable = lut;
468  this->Modified();
469 }
470 
472 {
473  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
474  lut->SetNumberOfTableValues(256);
475  lut->Build();
476  int i = 0;
477 
478  if (transparent)
479  {
480  // Lowest intensity is transparent
481  lut->SetTableValue(0, (double)Jet[0][0] / 255.0, (double)Jet[0][1] / 255.0, (double)Jet[0][2] / 255.0, 0.0);
482  i = 1;
483  }
484 
485  for (; i < 256; i++)
486  {
487  lut->SetTableValue(i, (double)Jet[i][0] / 255.0, (double)Jet[i][1] / 255.0, (double)Jet[i][2] / 255.0, 1.0);
488  }
489 
490  m_LookupTable = lut;
491  this->Modified();
492 }
493 
495 {
496  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
497  lut->SetNumberOfTableValues(256);
498  lut->SetTableRange((m_Level - m_Window / 2.0), (m_Level + m_Window / 2.0));
499  lut->Build();
500 
501  for (int i = 0; i < 256; i++)
502  {
503  lut->SetTableValue(
504  i, (double)PETColor[i][0] / 255.0, (double)PETColor[i][1] / 255.0, (double)PETColor[i][2] / 255.0, 1.0);
505  }
506 
507  m_LookupTable = lut;
508  this->Modified();
509 }
510 
512 {
513  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
514  lut->SetNumberOfTableValues(256);
515  lut->SetTableRange((m_Level - m_Window / 2.0), (m_Level + m_Window / 2.0));
516  lut->Build();
517 
518  for (int i = 0; i < 256; i++)
519  {
520  lut->SetTableValue(i, (double)PET20[i][0] / 255.0, (double)PET20[i][1] / 255.0, (double)PET20[i][2] / 255.0, 1.0);
521  }
522 
523  m_LookupTable = lut;
524  this->Modified();
525 }
526 
528 {
529  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
530  lut->SetNumberOfTableValues(65536);
531  lut->SetTableRange(0, 65536);
532  lut->Build();
533 
534  lut->SetTableValue(0, 0.0, 0.0, 0.0, 0.0); // background
535 
536  for (int i = 0; i < 25; i++)
537  {
538  lut->SetTableValue(i+1, Multilabel[i][0], Multilabel[i][1], Multilabel[i][2], 0.4);
539  }
540 
541  for (int i = 26; i < 65536; i++)
542  {
543  if (i % 12 == 0)
544  lut->SetTableValue(i, 1.0, 0.0, 0.0, 0.4);
545  else if (i % 12 == 1)
546  lut->SetTableValue(i, 0.0, 1.0, 0.0, 0.4);
547  else if (i % 12 == 2)
548  lut->SetTableValue(i, 0.0, 0.0, 1.0, 0.4);
549  else if (i % 12 == 3)
550  lut->SetTableValue(i, 1.0, 1.0, 0.0, 0.4);
551  else if (i % 12 == 4)
552  lut->SetTableValue(i, 0.0, 1.0, 1.0, 0.4);
553  else if (i % 12 == 5)
554  lut->SetTableValue(i, 1.0, 0.0, 1.0, 0.4);
555  else if (i % 12 == 6)
556  lut->SetTableValue(i, 1.0, 0.5, 0.0, 0.4);
557  else if (i % 12 == 7)
558  lut->SetTableValue(i, 0.0, 1.0, 0.5, 0.4);
559  else if (i % 12 == 8)
560  lut->SetTableValue(i, 0.5, 0.0, 1.0, 0.4);
561  else if (i % 12 == 9)
562  lut->SetTableValue(i, 1.0, 1.0, 0.5, 0.4);
563  else if (i % 12 == 10)
564  lut->SetTableValue(i, 0.5, 1.0, 1.0, 0.4);
565  else if (i % 12 == 11)
566  lut->SetTableValue(i, 1.0, 0.5, 1.0, 0.4);
567  }
568 
569  m_LookupTable = lut;
570  this->Modified();
571 }
572 
574 {
575  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
576  lut->SetRampToLinear();
577  lut->SetHueRange(0.6667, 0.0);
578  lut->SetTableRange(0.0, 20.0);
579  lut->Build();
580 
581  m_LookupTable = lut;
582  this->Modified();
583 }
584 
586 {
587  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
588  lut->SetNumberOfTableValues(256);
589  lut->Build();
590 
591  for (int i = 0; i < 256; i++)
592  {
593  lut->SetTableValue(
594  i, (double)Plasma[i][0] / 255.0, (double)Plasma[i][1] / 255.0, (double)Plasma[i][2] / 255.0, 1.0);
595  }
596 
597  m_LookupTable = lut;
598  this->Modified();
599 }
600 
602 {
603  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
604  lut->SetNumberOfTableValues(256);
605  lut->Build();
606 
607  for (int i = 0; i < 256; i++)
608  {
609  lut->SetTableValue(
610  i, (double)Inferno[i][0] / 255.0, (double)Inferno[i][1] / 255.0, (double)Inferno[i][2] / 255.0, 1.0);
611  }
612 
613  m_LookupTable = lut;
614  this->Modified();
615 }
616 
618 {
619  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
620  lut->SetNumberOfTableValues(256);
621  lut->Build();
622 
623  for (int i = 0; i < 256; i++)
624  {
625  lut->SetTableValue(
626  i, (double)Viridis[i][0] / 255.0, (double)Viridis[i][1] / 255.0, (double)Viridis[i][2] / 255.0, 1.0);
627  }
628 
629  m_LookupTable = lut;
630  this->Modified();
631 }
632 
634 {
635  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
636  lut->SetNumberOfTableValues(256);
637  lut->Build();
638 
639  for (int i = 0; i < 256; i++)
640  {
641  lut->SetTableValue(
642  i, (double)Magma[i][0] / 255.0, (double)Magma[i][1] / 255.0, (double)Magma[i][2] / 255.0, 1.0);
643  }
644 
645  m_LookupTable = lut;
646  this->Modified();
647 }
virtual void SetTableValue(int index, double rgba[4])
SetTableValue convenience method wrapping the vtkLookupTable::SetTableValue() method.
virtual bool operator!=(const LookupTable &LookupTable) const
non equality operator implementation
virtual void BuildGrayScaleLookupTable()
bool VerifyRequestedRegion() override
Checks if the requested region is completely contained in the buffered region. Since we always want t...
#define MITK_INFO
Definition: mitkLogMacros.h:18
static const int Plasma[256][3]
Definition: Plasma.h:23
virtual void BuildInverseGrayScaleLookupTable()
virtual vtkSmartPointer< vtkLookupTable > GetVtkLookupTable() const
GetVtkLookupTable Getter for the internally wrapped vtkLookupTable.
#define MITK_ERROR
Definition: mitkLogMacros.h:20
LookupTableType
The LookupTableType enum for different predefined lookup tables.
virtual void BuildPlasmaLookupTable()
static std::vector< std::string > typenameList
virtual void BuildPETColorLookupTable()
DataCollection - Class to facilitate loading/accessing structured data.
virtual void BuildMagmaLookupTable()
virtual void ChangeOpacityForAll(float opacity)
ChangeOpacityForAll Set the opacity for all table values.
void SetRequestedRegionToLargestPossibleRegion() override
Sets the requested Region to the largest possible region. This method is not implemented, since this is the default behavior of the itk pipeline and we do not support the requested-region mechanism for lookup-tables.
virtual void GetTableValue(int index, double rgba[4])
GetTableValue convenience method wrapping the vtkLookupTable::GetTableValue() method.
virtual LookupTableType GetActiveType() const
Return the current look-up table type.
static const int HotIron[256][3]
Definition: HotIron.h:16
static const int Inferno[256][3]
Definition: Inferno.h:23
void SetRequestedRegion(const itk::DataObject *data) override
This method has no effect for lookup tables, since we do not support the region-mechanism.
void UpdateOutputInformation() override
Updates the output information of the current object by calling updateOutputInformation of the data o...
vtkSmartPointer< vtkPiecewiseFunction > CreateGradientTransferFunction()
virtual bool operator==(const mitk::LookupTable &LookupTable) const
equality operator implementation
static const int Viridis[256][3]
Definition: Viridis.h:23
virtual void BuildLegacyRainbowColorLookupTable()
virtual void BuildJetLookupTable(bool transparent=false)
virtual LookupTable & operator=(const LookupTable &LookupTable)
implementation necessary because operator made private in itk::Object
static const int Jet[256][3]
Definition: Jet.h:18
virtual void BuildViridisLookupTable()
static const int Magma[256][3]
Definition: Magma.h:23
static Pointer New()
vtkSmartPointer< vtkPiecewiseFunction > CreateOpacityTransferFunction()
static const double Multilabel[25][3]
Definition: Multilabel.h:16
virtual void BuildInfernoLookupTable()
LookupTableType m_Type
virtual void BuildPET20LookupTable()
vtkSmartPointer< vtkLookupTable > m_LookupTable
virtual void BuildHotIronLookupTable()
virtual std::string GetActiveTypeAsString() const
Return the current look-up table type as a string.
void PrintSelf(std::ostream &os, itk::Indent indent) const override
unsigned char RawLookupTableType
RawLookupTableType raw lookuptable typedef for convenience.
vtkSmartPointer< vtkColorTransferFunction > CreateColorTransferFunction()
virtual void ChangeOpacity(int index, float opacity)
ChangeOpacity Set the opacity for a specific table index.
virtual void GetColor(double value, double rgb[3])
GetColor convenience method wrapping the vtkLookupTable::GetColor() method.
virtual void BuildLegacyBinaryLookupTable()
virtual void SetVtkLookupTable(vtkSmartPointer< vtkLookupTable > lut)
SetVtkLookupTable Setter for the internal lookuptable.
virtual RawLookupTableType * GetRawLookupTable() const
GetRawLookupTable Getter for the raw lookuptable array.
static const int PET20[256][3]
Definition: PET20.h:16
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Checks, if the requested region lies outside of the buffered region by calling verifyRequestedRegion(...
virtual void SetType(const LookupTableType type)
Set the look-up table type by enum (or integer).
virtual void BuildMultiLabelLookupTable()
The LookupTable class mitk wrapper for a vtkLookupTableThis class can be used to color images with a ...
static const int PETColor[256][3]
Definition: PETColor.h:16