ctkTransferFunction.cpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.commontk.org/LICENSE
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =========================================================================*/
  14. /// CTK includes
  15. #include "ctkTransferFunction.h"
  16. #include "ctkTransferFunctionRepresentation.h"
  17. //-----------------------------------------------------------------------------
  18. ctkControlPoint::~ctkControlPoint()
  19. {
  20. }
  21. //-----------------------------------------------------------------------------
  22. ctkBezierControlPoint::~ctkBezierControlPoint()
  23. {
  24. }
  25. //-----------------------------------------------------------------------------
  26. ctkNonLinearControlPoint::~ctkNonLinearControlPoint()
  27. {
  28. }
  29. //-----------------------------------------------------------------------------
  30. class ctkTransferFunctionPrivate
  31. {
  32. public:
  33. ctkTransferFunctionPrivate();
  34. ctkTransferFunctionRepresentation* Representation;
  35. };
  36. //-----------------------------------------------------------------------------
  37. ctkTransferFunctionPrivate::ctkTransferFunctionPrivate()
  38. {
  39. this->Representation = 0;
  40. }
  41. //-----------------------------------------------------------------------------
  42. ctkTransferFunction::ctkTransferFunction(QObject* parentObject)
  43. :QObject(parentObject)
  44. , d_ptr(new ctkTransferFunctionPrivate)
  45. {
  46. Q_D(ctkTransferFunction);
  47. d->Representation = new ctkTransferFunctionRepresentation(this);
  48. }
  49. //-----------------------------------------------------------------------------
  50. ctkTransferFunction::~ctkTransferFunction()
  51. {
  52. // foreach(ctkControlPoint* cp, this->ControlPoints)
  53. // {
  54. // delete cp;
  55. // }
  56. // this->ControlPoints->clear();
  57. // emit changed();
  58. }
  59. //-----------------------------------------------------------------------------
  60. ctkTransferFunctionRepresentation* ctkTransferFunction::representation()const
  61. {
  62. Q_D(const ctkTransferFunction);
  63. return d->Representation;
  64. }