00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2009-07-14 19:11:20 +0200 (Tue, 14 Jul 2009) $ 00006 Version: $Revision: 18127 $ 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 QMITKTRANSFERFUNCTIONGENERATORWIDGET_H 00019 #define QMITKTRANSFERFUNCTIONGENERATORWIDGET_H 00020 00021 #include "ui_QmitkTransferFunctionGeneratorWidget.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 class QmitkExt_EXPORT QmitkTransferFunctionGeneratorWidget : public QWidget, public Ui::QmitkTransferFunctionGeneratorWidget 00032 { 00033 00034 Q_OBJECT 00035 00036 public: 00037 00038 QmitkTransferFunctionGeneratorWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); 00039 ~QmitkTransferFunctionGeneratorWidget () ; 00040 00041 void SetDataNode(mitk::DataNode* node); 00042 00043 public slots: 00044 00045 void OnSavePreset( ); 00046 void OnLoadPreset( ); 00047 void OnMitkInternalPreset( int mode ); 00048 00049 void OnDeltaLevelWindow( int dx, int dy ); 00050 void OnDeltaThreshold( int dx, int dy ); 00051 00052 signals: 00053 00054 void SignalTransferFunctionModeChanged( int ); 00055 void SignalUpdateCanvas( ); 00056 00057 protected: 00058 00059 mitk::TransferFunctionProperty::Pointer tfpToChange; 00060 00061 int histoMinimum; 00062 int histoMaximum; 00063 00064 int thPos; 00065 int thDelta; 00066 00067 const mitk::Image::HistogramType *histoGramm; 00068 00069 QString presetFileName; 00070 00071 std::string ReduceFileName(std::string fileNameLong ); 00072 00073 }; 00074 #endif