-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkKWImage.h
87 lines (62 loc) · 2.23 KB
/
vtkKWImage.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: vtkKWImage.h
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __vtkKWImage_h
#define __vtkKWImage_h
#include "itkImageBase.h"
#include "itkImageIOBase.h"
#include "vtkObject.h"
#include "vtkVersion.h"
class vtkImageData;
class vtkImageImport;
/** \class KWImage
*
* \brief This class represents an image object.
*
* This class associates an internal ITK image and a VTK importer in such a way
* that internally it can make available both image formats to ITK and VTK
* classes.
*
*/
class vtkKWImage : public vtkObject
{
public:
static vtkKWImage* New();
#if (VTK_MAJOR_VERSION < 6)
vtkTypeRevisionMacro(vtkKWImage,vtkObject);
#else
vtkTypeMacro(vtkKWImage,vtkObject);
#endif
typedef itk::ImageBase< 3 > ImageBaseType;
typedef ImageBaseType::Pointer ImagePointer;
typedef ImageBaseType::ConstPointer ImageConstPointer;
typedef itk::ImageIOBase::IOComponentType ITKScalarPixelType;
// Set the untyped ITK image
void SetITKImageBase( ImageBaseType * );
// Return the pixel type using ITK enums.
ITKScalarPixelType GetITKScalarPixelType() const;
// Return the pixel type using VTK enums.
int GetVTKScalarPixelType();
vtkImageData *GetVTKImage();
// Return the ITK image base. This is independent of the pixel type
const ImageBaseType * GetITKImageBase() const;
protected:
vtkKWImage();
~vtkKWImage();
private:
vtkKWImage(const vtkKWImage&); // Not implemented.
void operator=(const vtkKWImage&); // Not implemented.
ImagePointer ItkImage;
itk::ProcessObject::Pointer Exporter;
vtkImageImport *Importer;
};
#endif