Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkTbssImageMapper.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 
18 #ifndef TbssImageMapper__cpp
19 #define TbssImageMapper__cpp
20 
21 #include "mitkTbssImageMapper.h"
22 
23 #include "mitkProperties.h"
24 #include "mitkTbssImage.h"
25 
26 
27 
29 {
30 }
31 
32 
34 {
35 }
36 
37 
39 {
40  int displayIndex(0);
41 
42 
43  this->GetDataNode()->GetIntProperty( "DisplayChannel", displayIndex, renderer );
44  mitk::Image *input = const_cast< mitk::Image* >(
45  this->GetInput()
46  );
47  mitk::TbssImage *input2 = dynamic_cast< mitk::TbssImage* >(
48  input
49  );
50 
51  MITK_INFO << "displayindex: " << displayIndex;
52 
53 
54  input2->SetDisplayIndexForRendering(displayIndex);
55  Superclass::GenerateDataForRenderer(renderer);
56 }
57 
58 
60 {
61  node->AddProperty( "DisplayChannel", mitk::IntProperty::New( 0 ), renderer, overwrite );
62  Superclass::SetDefaultProperties(node, renderer, overwrite);
63 }
64 
65 #endif
void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override
Does the actual resampling, without rendering the image yet. All the data is generated inside this me...
void SetDisplayIndexForRendering(int displayIndex)
#define MITK_INFO
Definition: mitkLogMacros.h:22
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=NULL, bool overwrite=false)
Organizes the rendering process.
void AddProperty(const char *propertyKey, BaseProperty *property, const mitk::BaseRenderer *renderer=nullptr, bool overwrite=false)
Add the property (instance of BaseProperty) if it does not exist (or always ifoverwrite istrue) with ...
Image class for storing images.
Definition: mitkImage.h:76
static Pointer New()
this class encapsulates diffusion volumes (vectorimages not yet supported by mitkImage) ...
Definition: mitkTbssImage.h:34
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66