NorMIT-nav  22.09
An IGT application
cxAlgorithmHelpers.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXALGORITHMHELPERS_H_
13 #define CXALGORITHMHELPERS_H_
14 
15 #include "cxResourceExport.h"
16 
19 #include <itkImage.h>
20 
21 #include "cxForwardDeclarations.h"
22 #include "vtkForwardDeclarations.h"
23 
24 namespace cx
25 {
26 
27 const unsigned int Dimension = 3;
28 //typedef unsigned short PixelType;
29 typedef short PixelType; //short will probably work in most cases, but int may be needed
30 typedef itk::Image< PixelType, Dimension > itkImageType;
33 
34 
42 class cxResource_EXPORT AlgorithmHelper
43 {
44 public:
45  static itkImageType::ConstPointer getITKfromSSCImage(ImagePtr image);
46  static itkImageType::ConstPointer getITKfromVTKImage(vtkImageDataPtr image);
47 
48  static vtkImageDataPtr getVTKFromITK(itkImageType::ConstPointer input);
49  static vtkImageDataPtr execute_itk_GrayscaleFillholeImageFilter(vtkImageDataPtr input);
50 
51 private:
52  static itkImageType::ConstPointer getITKfromVTKImageViaFile(vtkImageDataPtr image);
53 };
54 
55 
56 }
57 
58 #endif /* CXALGOROTHMHELPERS_H_ */
cx::itkImageType
itk::Image< PixelType, Dimension > itkImageType
Definition: cxAlgorithmHelpers.h:30
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
itk::ImageToVTKImageFilter
Converts an ITK image into a VTK image and plugs a itk data pipeline to a VTK datapipeline.
Definition: itkImageToVTKImageFilter.h:41
vtkImageDataPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Definition: cxVideoConnectionWidget.h:30
cx::AlgorithmHelper
Class with helper functions for algorithms.
Definition: cxAlgorithmHelpers.h:42
itkImageToVTKImageFilter.h
itkVTKImageToImageFilter.h
cx::itkToVtkFilterType
itk::ImageToVTKImageFilter< itkImageType > itkToVtkFilterType
Definition: cxAlgorithmHelpers.h:31
vtkForwardDeclarations.h
cx::itkVTKImageToImageFilterType
itk::VTKImageToImageFilter< itkImageType > itkVTKImageToImageFilterType
Definition: cxAlgorithmHelpers.h:32
cx::ImagePtr
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
cx::PixelType
short PixelType
Definition: cxAlgorithmHelpers.h:29
itk::VTKImageToImageFilter
Converts a VTK image into an ITK image and plugs a vtk data pipeline to an ITK datapipeline.
Definition: itkVTKImageToImageFilter.h:44
cx::Dimension
const unsigned int Dimension
Definition: cxAlgorithmHelpers.h:27