ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkVTKVisualizeImageLevelSet.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkVTKVisualizeImageLevelSet_h
19 #define itkVTKVisualizeImageLevelSet_h
20 
21 #include "itkLightObject.h"
22 #include "itkIntTypes.h"
23 
24 #include "vtkRenderer.h"
25 #include "vtkRenderWindow.h"
26 #include "vtkSmartPointer.h"
27 #include "vtkImageShiftScale.h"
28 #include "vtkImageActor.h"
29 #include "vtkCornerAnnotation.h"
30 
31 namespace itk
32 {
33 
43 template< typename TInputImage, typename TInputImageConverter >
44 class ITK_TEMPLATE_EXPORT VTKVisualizeImageLevelSet: public LightObject
45 {
46 public:
51 
54 
56  typedef TInputImage InputImageType;
57 
59  typedef TInputImageConverter InputImageConverterType;
60 
62  virtual void SetInputImage( const InputImageType * inputImage );
63 
65  void SetScreenCapture( const bool iCapture );
66  bool GetScreenCapture() const;
68 
71  virtual void Update();
72 
74  vtkRenderer * GetRenderer();
75 
77  vtkRenderWindow * GetRenderWindow();
78  void SetRenderWindow( vtkRenderWindow * renderWindow );
80 
83  void SetCurrentIteration( const IdentifierType iteration );
84  IdentifierType GetCurrentIteration() const;
86 
88  void SetScreenCapturePrefix( const char * prefix );
89 
90 protected:
92  virtual ~VTKVisualizeImageLevelSet();
93 
95  virtual void PrepareVTKPipeline() = 0;
96 
97  typename InputImageConverterType::Pointer m_InputImageConverter;
98 
99  vtkSmartPointer< vtkRenderer > m_Renderer;
100 
101 private:
102  ITK_DISALLOW_COPY_AND_ASSIGN(VTKVisualizeImageLevelSet);
103 
104  bool m_ScreenCapture;
107 
108  vtkSmartPointer< vtkRenderWindow > m_RenderWindow;
109  vtkSmartPointer< vtkCornerAnnotation > m_Annotation;
110 };
111 
112 } // end namespace itk
113 
114 #ifndef ITK_MANUAL_INSTANTIATION
115 #include "itkVTKVisualizeImageLevelSet.hxx"
116 #endif
117 
118 #endif
Light weight base class for most itk classes.
vtkSmartPointer< vtkRenderWindow > m_RenderWindow
InputImageConverterType::Pointer m_InputImageConverter
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
vtkSmartPointer< vtkRenderer > m_Renderer
vtkSmartPointer< vtkCornerAnnotation > m_Annotation
Base class for visualizing level sets defined on an image with VTK.