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
mitkBoundingObjectCutAndCast.txx
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 #ifndef MITKBOUNDINGOBJECTCUTANDCAST_TXX
18 #define MITKBOUNDINGOBJECTCUTANDCAST_TXX
19 
20 #include "mitkBoundingObjectCutAndCast.h"
21 #include "mitkImage.h"
22 #include "mitkImageAccessByItk.h"
23 
24 namespace mitk
25 {
26  template <typename TPixel>
27  BoundingObjectCutAndCast<TPixel>::BoundingObjectCutAndCast()
28  {
29  }
30 
31  template <typename TPixel>
32  BoundingObjectCutAndCast<TPixel>::~BoundingObjectCutAndCast()
33  {
34  }
35 
36  template <typename TPixel>
37  const std::type_info &BoundingObjectCutAndCast<TPixel>::GetOutputPixelType()
38  {
39  return typeid(TPixel);
40  }
41 
42  template <typename TInputPixelType, unsigned int VImageDimension, class TBoundingObjectCutAndCastType>
43  void CutImageFixedOutputType(itk::Image<TInputPixelType, VImageDimension> *inputItkImage,
44  TBoundingObjectCutAndCastType *cutter,
45  int boTimeStep)
46  {
47  CutImageWithOutputTypeSelect<TInputPixelType, VImageDimension, typename TBoundingObjectCutAndCastType::PixelType>(
48  inputItkImage, cutter, boTimeStep);
49  }
50 
51  template <typename TPixel>
52  void BoundingObjectCutAndCast<TPixel>::ComputeData(mitk::Image *input3D, int boTimeStep)
53  {
54  AccessFixedDimensionByItk_2(input3D, CutImageFixedOutputType, 3, this, boTimeStep);
55  }
56 
57 } // of namespace mitk
58 #endif // of MITKBOUNDINGOBJECTCUTANDCAST_TXX