00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2010-05-10 18:06:04 +0200 (Mo, 10 Mai 2010) $ 00006 Version: $Revision: 22790 $ 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 MITK_TRANSFER_FUNCTION_MODE_CREATOR_H_HEADER_INCLUDED 00019 #define MITK_TRANSFER_FUNCTION_MODE_CREATOR_H_HEADER_INCLUDED 00020 00021 #include <vtkPiecewiseFunction.h> 00022 #include <vtkColorTransferFunction.h> 00023 #include <vtkSmartPointer.h> 00024 00025 #include "mitkTransferFunction.h" 00026 00027 #include <itkObject.h> 00028 #include <itkObjectFactory.h> 00029 00030 #include "mitkCommon.h" 00031 00032 namespace mitk { 00033 00047 class MITK_CORE_EXPORT TransferFunctionInitializer : public itk::Object 00048 { 00049 public: 00050 mitkClassMacro(TransferFunctionInitializer, itk::Object); 00051 00052 itkNewMacro( TransferFunctionInitializer ); 00053 mitkNewMacro1Param(TransferFunctionInitializer, TransferFunction::Pointer); 00054 00055 void SetTransferFunction(TransferFunction::Pointer transferFunction); 00056 mitk::TransferFunction::Pointer GetTransferFunction(); 00057 void SetTransferFunctionMode(int mode); 00058 00059 void InitTransferFunctionMode(); 00060 00061 protected: 00062 TransferFunctionInitializer(TransferFunction::Pointer transferFunction = NULL); 00063 virtual ~TransferFunctionInitializer(); 00064 00065 private: 00066 int m_Mode; 00067 mitk::TransferFunction::Pointer m_transferFunction; 00068 00069 //Define Transfer Function 00070 enum TransferFunctionMode{ 00071 TF_CT_DEFAULT, 00072 TF_CT_BLACK_WHITE, 00073 TF_CT_THORAX_LARGE, 00074 TF_CT_THORAX_SMALL, 00075 TF_CT_BONE, 00076 TF_CT_BONE_GRADIENT, 00077 TF_CT_CARDIAC, 00078 TF_MR_GENERIC 00079 }; 00080 00081 //remove all old points 00082 void RemoveAllPoints(); 00083 void SetModified(); 00084 void SetCtDefaultMode(); 00085 void SetCtBlackWhiteMode(); 00086 void SetCtThoraxLargeMode(); 00087 void SetCtThoraxSmallMode(); 00088 void SetCtBoneMode(); 00089 void SetCtBoneGradientMode(); 00090 void SetCtCardiacMode(); 00091 void SetMrGenericMode(); 00092 00093 }; 00094 00095 } 00096 00097 #endif /* MITK_TRANSFER_FUNCTION_MODE_CREATOR_H_HEADER_INCLUDED */