00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef QMITKTRANSFERFUNCTIONWIDGET_H 00019 #define QMITKTRANSFERFUNCTIONWIDGET_H 00020 00021 #include "ui_QmitkTransferFunctionWidget.h" 00022 #include "QmitkExtExports.h" 00023 00024 #include <mitkCommon.h> 00025 00026 #include <QWidget> 00027 00028 #include <mitkDataNode.h> 00029 #include <mitkTransferFunctionProperty.h> 00030 00031 #include <QSlider> 00032 #include <QPushButton> 00033 00034 #include <QmitkTransferFunctionWidget.h> 00035 00036 00037 class QmitkExt_EXPORT QmitkTransferFunctionWidget : public QWidget, public Ui::QmitkTransferFunctionWidget 00038 { 00039 00040 Q_OBJECT 00041 00042 public: 00043 00044 QmitkTransferFunctionWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); 00045 ~QmitkTransferFunctionWidget () ; 00046 00047 void SetDataNode(mitk::DataNode* node); 00048 00049 public slots: 00050 00051 void SetXValueScalar(); 00052 void SetYValueScalar(); 00053 void SetXValueGradient(); 00054 void SetYValueGradient(); 00055 void SetXValueColor(); 00056 00057 void OnUpdateCanvas(); 00058 void UpdateRanges(); 00059 void OnResetSlider(); 00060 00061 void OnSpanChanged (int lower, int upper); 00062 00063 00064 protected: 00065 00066 mitk::TransferFunctionProperty::Pointer tfpToChange; 00067 00068 int m_RangeSliderMin; 00069 int m_RangeSliderMax; 00070 00071 mitk::SimpleHistogramCache histogramCache; 00072 00073 }; 00074 #endif