ITK  4.9.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 >
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 );
86 
88  void SetScreenCapturePrefix( const char * prefix );
89 
90 protected:
93 
95  virtual void PrepareVTKPipeline() = 0;
96 
97  typename InputImageConverterType::Pointer m_InputImageConverter;
98 
99  vtkSmartPointer< vtkRenderer > m_Renderer;
100 
101 private:
102  VTKVisualizeImageLevelSet( const Self & ) ITK_DELETE_FUNCTION;
103  void operator=( const Self & ) ITK_DELETE_FUNCTION;
104 
108 
109  vtkSmartPointer< vtkRenderWindow > m_RenderWindow;
110  vtkSmartPointer< vtkCornerAnnotation > m_Annotation;
111 };
112 
113 } // end namespace itk
114 
115 #ifndef ITK_MANUAL_INSTANTIATION
116 #include "itkVTKVisualizeImageLevelSet.hxx"
117 #endif
118 
119 #endif
void SetRenderWindow(vtkRenderWindow *renderWindow)
virtual void SetInputImage(const InputImageType *inputImage)
Light weight base class for most itk classes.
virtual void PrepareVTKPipeline()=0
vtkSmartPointer< vtkRenderWindow > m_RenderWindow
void SetScreenCapture(const bool iCapture)
InputImageConverterType::Pointer m_InputImageConverter
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
IdentifierType GetCurrentIteration() const
void SetCurrentIteration(const IdentifierType iteration)
vtkSmartPointer< vtkRenderer > m_Renderer
vtkSmartPointer< vtkCornerAnnotation > m_Annotation
vtkRenderWindow * GetRenderWindow()
Base class for visualizing level sets defined on an image with VTK.
void SetScreenCapturePrefix(const char *prefix)