ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkVTKVisualize2DSparseLevelSetLayersBase.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 
19 #ifndef itkVTKVisualize2DSparseLevelSetLayersBase_h
20 #define itkVTKVisualize2DSparseLevelSetLayersBase_h
21 
23 
24 #include "itkConceptChecking.h"
25 
27 
28 #include "vtkCornerAnnotation.h"
29 #include "vtkImageData.h"
30 #include "vtkLookupTable.h"
31 #include "vtkMarchingSquares.h"
32 #include "vtkPolyDataMapper.h"
33 #include "vtkActor.h"
34 #include "vtkImageActor.h"
35 #include "vtkScalarBarActor.h"
36 #include "vtkProperty.h"
37 #include "vtkRenderer.h"
38 #include "vtkRenderWindowInteractor.h"
39 #include "vtkRenderWindow.h"
40 #include "vtkImageShiftScale.h"
41 
42 #include "vtkCaptureScreen.h"
43 #include "vtkPNGWriter.h"
44 
45 namespace itk
46 {
53 template< typename TInputImage, typename TLevelSet >
55  public VTKVisualizeImageLevelSet< TInputImage, ImageToRGBVTKImageFilter< TInputImage > >
56 {
57 public:
60 
65 
68 
69  typedef TInputImage InputImageType;
70  typedef typename InputImageType::PixelType InputPixelType;
71 
72  typedef TLevelSet LevelSetType;
74 
75  virtual void SetInputImage( const InputImageType* image );
76  void SetLevelSet( LevelSetType * levelSet );
77 
78 #ifdef ITK_USE_CONCEPT_CHECKING
79  itkConceptMacro( Is2Dimensional,
81 #endif
82 
83 protected:
86 
88  vtkSmartPointer< vtkImageData > m_VTKImage;
89  vtkSmartPointer< vtkImageActor > m_VTKImageActor;
90 
91  virtual void PrepareVTKPipeline();
92 
93  virtual std::string GetLevelSetRepresentationName() const = 0;
94 
95  virtual void AddLayers() = 0;
96 
97 private:
99  void operator = ( const Self& );
100 };
101 }
102 
103 #ifndef ITK_MANUAL_INSTANTIATION
104 #include "itkVTKVisualize2DSparseLevelSetLayersBase.hxx"
105 #endif
106 #endif
virtual void SetInputImage(const InputImageType *image)
Light weight base class for most itk classes.
Derived class for the shi representation of level-set function.
void SetLevelSet(LevelSetType *levelSet)
VTKVisualizeImageLevelSet< TInputImage, ConverterType > Superclass
virtual std::string GetLevelSetRepresentationName() const =0
Converts an ITK image into a VTK image.
Base class for visualizing level sets defined on an image with VTK.
#define itkConceptMacro(name, concept)