GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GoImageProcessor.cxx
Go to the documentation of this file.
1 /*=========================================================================
2  Authors: The GoFigure Dev. Team.
3  at Megason Lab, Systems biology, Harvard Medical school, 2009-11
4 
5  Copyright (c) 2009-11, President and Fellows of Harvard College.
6  All rights reserved.
7 
8  Redistribution and use in source and binary forms, with or without
9  modification, are permitted provided that the following conditions are met:
10 
11  Redistributions of source code must retain the above copyright notice,
12  this list of conditions and the following disclaimer.
13  Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16  Neither the name of the President and Fellows of Harvard College
17  nor the names of its contributors may be used to endorse or promote
18  products derived from this software without specific prior written
19  permission.
20 
21  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
25  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
28  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
30  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 =========================================================================*/
34 
35 #include "GoImageProcessor.h"
36 
37 // external library include
38 #include "vtkLookupTable.h"
39 #include "vtkMath.h"
40 #include "vtkImageMapToColors.h"
41 #include "vtkImageBlend.h"
42 #include "vtkPointData.h"
43 #include "vtkImageShiftScale.h"
44 //histogram
45 #include "vtkImageExtractComponents.h"
46 #include "vtkImageAccumulate.h"
47 
48 #include "vtkPiecewiseFunction.h"
49 
50 #include <QString>
51 
52 // temp
53 #include "vtkImageWeightedSum.h"
54 
55 //--------------------------------------------------------------------------
57  m_MaxThreshold(0),m_MaxImage(0),
58  m_DopplerMode(false), m_DopplerStep(1), m_DopplerTime( 3, 0 ),
59  m_DopplerChannel(0), m_DopplerSize(3)
60 {
61  m_CurrentTimePoint = std::numeric_limits< unsigned int >::max();
62 
63  m_BoundsTime[0] = 0;
64  m_BoundsTime[1] = 0;
65 
66  m_BoundsChannel[0] = 0;
67  m_BoundsChannel[1] = 0;
68 
69  m_Extent[0] = 0;
70  m_Extent[1] = 0;
71  m_Extent[2] = 0;
72  m_Extent[3] = 0;
73  m_Extent[4] = 0;
74  m_Extent[5] = 0;
75 }
76 //--------------------------------------------------------------------------
77 
78 //--------------------------------------------------------------------------
80  m_MegaImageContainer(iE.m_MegaImageContainer), m_Output(iE.m_Output),
81  m_DopplerMode(iE.m_DopplerMode), m_DopplerStep(iE.m_DopplerStep),
82  m_DopplerTime(iE.m_DopplerTime), m_DopplerChannel(iE.m_DopplerChannel),
83  m_DopplerSize(iE.m_DopplerSize)
84 {
85  m_BoundsTime[0] = iE.m_BoundsTime[0];
86  m_BoundsTime[1] = iE.m_BoundsTime[1];
87 
90 
91  m_Extent[0] = iE.m_Extent[0];
92  m_Extent[1] = iE.m_Extent[1];
93  m_Extent[2] = iE.m_Extent[2];
94  m_Extent[3] = iE.m_Extent[3];
95  m_Extent[4] = iE.m_Extent[4];
96  m_Extent[5] = iE.m_Extent[5];
97 }
98 //--------------------------------------------------------------------------
99 
100 //--------------------------------------------------------------------------
103 {
104 }
105 //--------------------------------------------------------------------------
106 
107 //--------------------------------------------------------------------------
108 vtkSmartPointer<vtkLookupTable>
110 createLUT(const double& iRed, const double& iGreen, const double& iBlue,
111  const double& iAlpha)
112 {
113  vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
114  double* HSV = vtkMath::RGBToHSV(iRed,iGreen,iBlue);
115  lut->SetAlphaRange(0, 1);
116  lut->SetHueRange(HSV[0], HSV[0]);
117  lut->SetSaturationRange(1, 1);
118  lut->SetValueRange(0, 1);
119  lut->SetNumberOfTableValues(m_MaxThreshold);
120  double* range = new double[2];
121  range[0] = 0;
122  range[1] = m_MaxThreshold;
123  lut->SetRange(range);
124 
125  lut->Build();
126  delete range;
127 
128  return lut;
129 }
130 //--------------------------------------------------------------------------
131 
132 
133 //--------------------------------------------------------------------------
134 vtkSmartPointer<vtkLookupTable>
136 getLookuptable(const std::string& iName) const
137 {
138  GoMegaImageStructureMultiIndexContainer::index<Name>::type::iterator it =
139  m_MegaImageContainer.get< Name >().find(iName);
140 
141  if(it!=m_MegaImageContainer.get< Name >().end())
142  {
143  return it->LUT;
144  }
145 
146  return NULL;
147 }
148 //--------------------------------------------------------------------------
149 
150 //--------------------------------------------------------------------------
151 vtkSmartPointer<vtkLookupTable>
154 {
155  GoMegaImageStructureMultiIndexContainer::index<Visibility>::type::iterator it =
156  m_MegaImageContainer.get< Visibility >().find(true);
157 
158  assert(it!=m_MegaImageContainer.get< Visibility >().end());
159 
160  return it->LUT;
161 }
162 //--------------------------------------------------------------------------
163 
164 //--------------------------------------------------------------------------
165 vtkSmartPointer<vtkPiecewiseFunction>
167 getOpacityTransferFunction(const std::string& iName) const
168 {
169  GoMegaImageStructureMultiIndexContainer::index<Name>::type::iterator it =
170  m_MegaImageContainer.get< Name >().find(iName);
171 
172  if(it!=m_MegaImageContainer.get< Name >().end())
173  {
174  return it->OpacityTF;
175  }
176 
177  return NULL;
178 }
179 //--------------------------------------------------------------------------
180 
181 //--------------------------------------------------------------------------
182 std::vector<vtkPiecewiseFunction*>
185 {
186  std::vector<vtkPiecewiseFunction*> opacityTFs;
187 
188  typedef GoMegaImageStructureMultiIndexContainer::index<Visibility>::type::iterator
189  IteratorType;
190 
191  IteratorType it0, it1;
192  boost::tuples::tie( it0, it1 ) =
193  m_MegaImageContainer.get< Visibility >().equal_range(true);
194 
195  while( it0 != it1 )
196  {
197  opacityTFs.push_back( it0->OpacityTF );
198  ++it0;
199  }
200 
201  return opacityTFs;
202 }
203 //--------------------------------------------------------------------------
204 
205 //--------------------------------------------------------------------------
206 std::vector<double>
208 getColor(const std::string& iName) const
209 {
210  GoMegaImageStructureMultiIndexContainer::index<Name>::type::iterator it =
211  m_MegaImageContainer.get< Name >().find(iName);
212 
213  assert(it!=m_MegaImageContainer.get< Name >().end());
214 
215  return it->Color;
216 }
217 //--------------------------------------------------------------------------
218 
219 //--------------------------------------------------------------------------
220 void
222 setColor(const std::string& iName, std::vector<double>& iColor)
223 {
224  GoMegaImageStructureMultiIndexContainer::index<Name>::type::iterator it =
225  m_MegaImageContainer.get< Name >().find(iName);
226 
227  if(it!=m_MegaImageContainer.get< Name >().end())
228  {
229  m_MegaImageContainer.get< Name >().modify( it , set_color(iColor));
230  }
231 }
232 //--------------------------------------------------------------------------
233 
234 //--------------------------------------------------------------------------
235 void
237 setLUTParameters(const std::string& iName, int iGamma, int iMin, int iMax)
238 {
239  GoMegaImageStructureMultiIndexContainer::index<Name>::type::iterator it =
240  m_MegaImageContainer.get< Name >().find(iName);
241 
242  if(it!=m_MegaImageContainer.get< Name >().end())
243  {
244  m_MegaImageContainer.get< Name >().modify( it ,
245  set_LUT_Parameters(iGamma, iMin, iMax) );
246  }
247 }
248 //--------------------------------------------------------------------------
249 
250 //--------------------------------------------------------------------------
251 std::vector<int>
253 getLUTParameters(const std::string& iName)
254 {
255  GoMegaImageStructureMultiIndexContainer::index<Name>::type::iterator it =
256  m_MegaImageContainer.get< Name >().find(iName);
257 
258  assert(it!=m_MegaImageContainer.get< Name >().end());
259 
260  std::vector<int> parameters(3);
261  parameters[0] = it->Gamma;
262  parameters[1] = it->Min;
263  parameters[2] = it->Max;
264 
265  return parameters;
266 }
267 //--------------------------------------------------------------------------
268 
269 //--------------------------------------------------------------------------
270 std::map<unsigned int, unsigned int>
272 getAlpha(const std::string& iName) const
273 {
274  GoMegaImageStructureMultiIndexContainer::index<Name>::type::iterator it =
275  m_MegaImageContainer.get< Name >().find(iName);
276 
277  assert(it!=m_MegaImageContainer.get< Name >().end());
278 
279  return it->Alpha;
280 }
281 //--------------------------------------------------------------------------
282 
283 //--------------------------------------------------------------------------
284 vtkSmartPointer<vtkImageAccumulate>
286 getHistogram(const std::string& iName) const
287 {
288  GoMegaImageStructureMultiIndexContainer::index<Name>::type::iterator it =
289  m_MegaImageContainer.get< Name >().find(iName);
290 
291  assert(it!=m_MegaImageContainer.get< Name >().end());
292 
293  return it->Histogram;
294 }
295 //--------------------------------------------------------------------------
296 
297 //--------------------------------------------------------------------------
298 vtkSmartPointer<vtkImageData>
300 colorImage(vtkSmartPointer<vtkImageData> iImage,
301  vtkSmartPointer<vtkLookupTable> iLUT)
302 {
303  vtkSmartPointer<vtkImageMapToColors> coloredImage =
304  vtkSmartPointer<vtkImageMapToColors>::New();
305  coloredImage->SetLookupTable(iLUT);
306  coloredImage->SetInput( iImage );
307  coloredImage->SetOutputFormatToRGB();
308  coloredImage->SetNumberOfThreads(VTK_MAX_THREADS);
309  coloredImage->ReleaseDataFlagOn();
310  coloredImage->Update();
311 
312  return coloredImage->GetOutput();
313 }
314 //--------------------------------------------------------------------------
315 
316 //--------------------------------------------------------------------------
317 vtkSmartPointer<vtkImageData>
319 getImageBW(const std::string& iName)
320 {
321  GoMegaImageStructureMultiIndexContainer::index<Name>::type::iterator it =
322  m_MegaImageContainer.get< Name >().find(iName);
323 
324  assert(it!=m_MegaImageContainer.get< Name >().end());
325 
326  return it->Image;
327 }
328 //--------------------------------------------------------------------------
329 
330 //--------------------------------------------------------------------------
331 vtkSmartPointer<vtkImageData>
333 getImageBW(const unsigned int& iIndex)
334 {
335  GoMegaImageStructureMultiIndexContainer::index<Index>::type::iterator it =
336  m_MegaImageContainer.get< Index >().find(iIndex);
337  if(it!=m_MegaImageContainer.get< Index >().end())
338  {
339  return it->Image;
340  }
341  return NULL;
342 }
343 //--------------------------------------------------------------------------
344 
345 //--------------------------------------------------------------------------
346 vtkSmartPointer<vtkImageData>
349 {
350  GoMegaImageStructureMultiIndexContainer::index<Visibility>::type::iterator it =
351  m_MegaImageContainer.get< Visibility >().find(true);
352 
353  if(it!=m_MegaImageContainer.get< Visibility >().end())
354  {
355  return it->Image;
356  }
357  return NULL;
358 }
359 //--------------------------------------------------------------------------
360 
361 //--------------------------------------------------------------------------
362 std::vector<vtkImageData*>
365 {
366  std::vector<vtkImageData*> images;
367 
368  typedef GoMegaImageStructureMultiIndexContainer::index<Visibility>::type::iterator
369  IteratorType;
370 
371  IteratorType it0, it1;
372  boost::tuples::tie( it0, it1 ) =
373  m_MegaImageContainer.get< Visibility >().equal_range(true);
374 
375  while( it0 != it1 )
376  {
377  // requiered deepcopy....
378  vtkImageData* image = vtkImageData::New();
379  image->DeepCopy( this->colorImage( it0->Image, it0->LUT ) );
380  images.push_back(image);
381  ++it0;
382  }
383 
384  return images;
385 }
386 //--------------------------------------------------------------------------
387 
388 //--------------------------------------------------------------------------
389 vtkSmartPointer<vtkImageData>
392 {
393  vtkSmartPointer<vtkImageBlend> blendedImage =
394  vtkSmartPointer<vtkImageBlend>::New();
395  blendedImage->RemoveAllInputs();
396  blendedImage->SetBlendModeToCompound();
397  blendedImage->ReleaseDataFlagOn();
398  blendedImage->SetNumberOfThreads(VTK_MAX_THREADS);
399 
400  typedef GoMegaImageStructureMultiIndexContainer::index<Visibility>::type::iterator
401  IteratorType;
402 
403  IteratorType it0, it1;
404  boost::tuples::tie( it0, it1 ) =
405  m_MegaImageContainer.get< Visibility >().equal_range(true);
406 
407  int N(0);
408 
409  std::vector< IteratorType > tempVector;
410 
411  while( it0 != it1 )
412  {
413  tempVector.push_back( it0 );
414  ++it0;
415  ++N;
416  }
417 
418 #ifdef HAS_OPENMP
419 #pragma omp for
420 #endif
421  for( int j = 0; j < N; j++ )
422  {
423  it0 = tempVector[j];
424 
425  vtkSmartPointer<vtkImageData> temp = this->colorImage(it0->Image, it0->LUT);
426  vtkSmartPointer<vtkImageData> image = vtkSmartPointer<vtkImageData>::New();
427  image->DeepCopy(temp);
428  temp = NULL;
429  blendedImage->AddInput(image);
430  }
431  blendedImage->Update();
432 
433  double rangeR[2];
434  blendedImage->GetOutput()->GetPointData()->GetScalars()->GetRange(rangeR, 0);
435  double rangeG[2];
436  blendedImage->GetOutput()->GetPointData()->GetScalars()->GetRange(rangeG, 1);
437  double rangeB[2];
438  blendedImage->GetOutput()->GetPointData()->GetScalars()->GetRange(rangeB, 2);
439 
440  double range = std::max(rangeB[1], std::max(rangeR[1], rangeG[1]));
441 
442  if( range != 0. )
443  {
444  vtkSmartPointer<vtkImageShiftScale> scale =
445  vtkSmartPointer<vtkImageShiftScale>::New();
446  scale->SetInput(blendedImage->GetOutput());
447  scale->SetScale(m_MaxImage/range);
448  scale->SetOutputScalarTypeToUnsignedChar();
449  scale->ReleaseDataFlagOn();
450  scale->SetNumberOfThreads(VTK_MAX_THREADS);
451  scale->Update();
452 
453  blendedImage = NULL;
454 
455  return scale->GetOutput();
456  }
457 
458  return blendedImage->GetOutput();
459 }
460 //--------------------------------------------------------------------------
461 
462 //--------------------------------------------------------------------------
463 unsigned int*
466 {
467  return m_BoundsTime;
468 }
469 //--------------------------------------------------------------------------
470 
471 //--------------------------------------------------------------------------
472 unsigned int*
475 {
476  return m_BoundsChannel;
477 }
478 //--------------------------------------------------------------------------
479 
480 //--------------------------------------------------------------------------
481 int*
484 {
485  if( !m_MegaImageContainer.empty() )
486  {
487  if( ( m_MegaImageContainer.begin() )->Image )
488  {
489  return ( m_MegaImageContainer.begin() )->Image->GetExtent();
490  }
491  }
492 
493  return NULL;
494 }
495 //--------------------------------------------------------------------------
496 
497 //--------------------------------------------------------------------------
498 unsigned int
501 {
502  return m_BoundsTime[1] - m_BoundsTime[0] + 1;
503 }
504 //--------------------------------------------------------------------------
505 
506 //--------------------------------------------------------------------------
507 unsigned int
510 {
511  return m_BoundsChannel[1] - m_BoundsChannel[0] + 1;
512 }
513 //--------------------------------------------------------------------------
514 
515 //--------------------------------------------------------------------------
516 unsigned int
519 {
520  return m_TimeInterval;
521 }
522 //--------------------------------------------------------------------------
523 
524 //--------------------------------------------------------------------------
525 unsigned int
528 {
529  return m_DopplerStep;
530 }
531 //--------------------------------------------------------------------------
532 
533 //--------------------------------------------------------------------------
534 void
536 setDopplerStep(unsigned int iStep)
537 {
538  m_DopplerStep = iStep;
539 }
540 //--------------------------------------------------------------------------
541 
542 //--------------------------------------------------------------------------
543 std::vector<int>
545 getDopplerTime(unsigned int iTime)
546 {
547  // get min t point
548  int time = iTime - (m_DopplerSize/2)*m_DopplerStep;
549 
550  for(unsigned int i=0; i<m_DopplerSize; ++i)
551  {
552  m_DopplerTime[i] = time +i*m_DopplerStep;
553 
554  // special case if we are at the borders
555  // value will be -1
556  if (m_DopplerTime[i] < static_cast<int>(m_BoundsTime[0]))
557  {
558  m_DopplerTime[i] = -1;
559  }
560  if (m_DopplerTime[i] > static_cast<int>(m_BoundsTime[1]))
561  {
562  m_DopplerTime[i] = -1;
563  }
564  }
565 
566  return m_DopplerTime;
567 }
568 //--------------------------------------------------------------------------
569 
570 //--------------------------------------------------------------------------
571 void
573 setDopplerMode(const bool& iEnable, const unsigned int& iChannel)
574 {
575  m_DopplerMode = iEnable;
576  m_DopplerChannel = iChannel;
577 }
578 //--------------------------------------------------------------------------
579 
580 //--------------------------------------------------------------------------
581 bool
584 {
585  return m_DopplerMode;
586 }
587 //--------------------------------------------------------------------------
588 unsigned int
591 {
592  return m_DopplerChannel;
593 }
594 //--------------------------------------------------------------------------
595 
596 //--------------------------------------------------------------------------
597 unsigned int
600 {
601  return m_DopplerSize;
602 }
603 //--------------------------------------------------------------------------
604 
605 //--------------------------------------------------------------------------
606 void
608 setDopplerSize(int iSize)
609 {
610  m_DopplerSize = iSize;
611  m_DopplerTime.resize(iSize);
612 }
613 //--------------------------------------------------------------------------
614 
615 //--------------------------------------------------------------------------
616 std::string
618 getChannelName(const unsigned int& iIndex)
619 {
620  GoMegaImageStructureMultiIndexContainer::index<Index>::type::iterator it =
621  m_MegaImageContainer.get< Index >().find(iIndex);
622 
623  if(it!=m_MegaImageContainer.get< Index >().end())
624  {
625  return it->Name;
626  }
627  return "";
628 }
629 //--------------------------------------------------------------------------
630 
631 //--------------------------------------------------------------------------
632 void
634 visibilityChanged(std::string iName, bool iVisibility)
635 {
636  GoMegaImageStructureMultiIndexContainer::index<Name>::type::iterator it =
637  m_MegaImageContainer.get< Name >().find(iName);
638 
639  if(it!=m_MegaImageContainer.get< Name >().end())
640  {
641  m_MegaImageContainer.get< Name >().modify( it , set_visibility(iVisibility));
642  }
643 }
644 //--------------------------------------------------------------------------
645 
646 //--------------------------------------------------------------------------
647 unsigned int
650 {
651  typedef GoMegaImageStructureMultiIndexContainer::index<Visibility>::type::iterator
652  IteratorType;
653 
654  IteratorType it0, it1;
655  boost::tuples::tie( it0, it1 ) =
656  m_MegaImageContainer.get< Visibility >().equal_range(true);
657 
658  unsigned int numberOfVisibleChannels( 0 );
659 
660  while( it0 != it1 )
661  {
662  ++it0;
663  ++numberOfVisibleChannels;
664  }
665 
666  return numberOfVisibleChannels;
667 }
668 //--------------------------------------------------------------------------
669 
670 //--------------------------------------------------------------------------
671 void
673 updatePoints(std::string iName, std::map< unsigned int, unsigned int> iPointsAlpha)
674 {
675  GoMegaImageStructureMultiIndexContainer::index<Name>::type::iterator it =
676  m_MegaImageContainer.get< Name >().find(iName);
677 
678  if(it!=m_MegaImageContainer.get< Name >().end())
679  {
680  m_MegaImageContainer.get< Name >().modify( it , set_PointsAlpha(iPointsAlpha));
681  }
682 }
683 //--------------------------------------------------------------------------
684 
685 //--------------------------------------------------------------------------
686 int
689 {
690  return m_MaxThreshold;
691 }
692 //--------------------------------------------------------------------------
693 
694 //--------------------------------------------------------------------------
695 int
698 {
699  return m_MaxImage;
700 }
701 //--------------------------------------------------------------------------
change color of given structure
unsigned int getTimeInterval() const
void setColor(const std::string &iName, std::vector< double > &iColor)
unsigned int m_CurrentTimePoint
unsigned int m_DopplerSize
std::vector< int > getDopplerTime(unsigned int iTime)
unsigned int m_BoundsTime[2]
unsigned int * getBoundsChannel()
unsigned int getDopplerSize()
vtkSmartPointer< vtkLookupTable > getLookuptable() const
get LUT of the first visible channel. Useful is we are in single channel visualization mode...
unsigned int getNumberOfChannels()
void setDopplerMode(const bool &iEnable, const unsigned int &iChannel)
std::map< unsigned int, unsigned int > getAlpha(const std::string &iName) const
get points to update r, g, b and a TFs in TF editor.
vtkSmartPointer< vtkImageData > getImageBW()
get first raw (not colored) visible image
std::string getChannelName(const unsigned int &iIndex)
get name of a channel given its index.
unsigned int getNumberOfVisibleChannels()
get number of visible channels
unsigned int m_DopplerChannel
unsigned int m_BoundsChannel[2]
std::vector< vtkPiecewiseFunction * > getOpacityTransferFunctions()
get vector of visible opacity transfer functions. Useful for the transfer function editor while volum...
unsigned int m_DopplerStep
void setLUTParameters(const std::string &iName, int iGamma, int iMin, int iMax)
std::vector< vtkImageData * > getColoredImages()
get all the visible images colored separately (N images).
std::vector< int > getLUTParameters(const std::string &iName)
GoMegaImageStructureMultiIndexContainer m_MegaImageContainer
void setDopplerStep(unsigned int iStep)
vtkSmartPointer< vtkImageData > colorImage(vtkSmartPointer< vtkImageData > iImage, vtkSmartPointer< vtkLookupTable > iLUT)
void setDopplerSize(int iSize)
unsigned int m_TimeInterval
unsigned int getDopplerChannel()
unsigned int getNumberOfTimePoints()
std::vector< double > getColor(const std::string &iName) const
get color from channel name.
change parameters of LUT
std::vector< int > m_DopplerTime
unsigned int getDopplerStep()
vtkSmartPointer< vtkImageData > getVisibleImages()
get all the -visible- images present in the containerl. Colors the image and combuine them into 1 ima...
vtkSmartPointer< vtkLookupTable > createLUT(const double &iRed, const double &iGreen, const double &iBlue, const double &iAlpha)
create a lookuptable (LUT) given r, g, b, a and range LUT will go from black to the color...
void visibilityChanged(std::string iName, bool iVisibility)
change visibility of one channel given its name.
void updatePoints(std::string iChannel, std::map< unsigned int, unsigned int > iPointsAlpha)
store points from TF editor
vtkSmartPointer< vtkImageAccumulate > getHistogram(const std::string &iName) const
get histogram from 1 channel image
Interface between image reader and vtkImageData.
unsigned int * getBoundsTime()
change visibility of given structure
vtkSmartPointer< vtkPiecewiseFunction > getOpacityTransferFunction(const std::string &iName) const
get opacity from channel name. Useful for the transfer function editor while volume rendering...