00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2009-05-12 19:56:03 +0200 (Di, 12 Mai 2009) $ 00006 Version: $Revision: 17179 $ 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 00019 #ifndef DiffusionImageMapper_txx_HEADER_INCLUDED 00020 #define DiffusionImageMapper_txx_HEADER_INCLUDED 00021 00022 #include "mitkProperties.h" 00023 #include "mitkDiffusionImage.h" 00024 00025 template<class TPixelType> 00026 mitk::DiffusionImageMapper<TPixelType>::DiffusionImageMapper() 00027 { 00028 } 00029 00030 template<class TPixelType> 00031 mitk::DiffusionImageMapper<TPixelType>::~DiffusionImageMapper() 00032 { 00033 } 00034 00035 template<class TPixelType> 00036 void 00037 mitk::DiffusionImageMapper<TPixelType>::GenerateData( mitk::BaseRenderer *renderer ) 00038 { 00039 int displayIndex(0); 00040 this->GetDataNode()->GetIntProperty( "DisplayChannel", displayIndex, renderer ); 00041 InputImageType *input = const_cast< InputImageType* >( 00042 this->GetInput() 00043 ); 00044 mitk::DiffusionImage<TPixelType> *input2 = dynamic_cast< mitk::DiffusionImage<TPixelType>* >( 00045 input 00046 ); 00047 input2->SetDisplayIndexForRendering(displayIndex); 00048 Superclass::GenerateData(renderer); 00049 } 00050 00051 template<class TPixelType> 00052 void mitk::DiffusionImageMapper<TPixelType>::SetDefaultProperties(mitk::DataNode* node, mitk::BaseRenderer* renderer, bool overwrite) 00053 { 00054 node->AddProperty( "DisplayChannel", mitk::IntProperty::New( true ), renderer, overwrite ); 00055 Superclass::SetDefaultProperties(node, renderer, overwrite); 00056 } 00057 00058 #endif