NIREP
|
00001 /*========================================================================= 00002 00003 Program: vtkINRIA3D 00004 Module: $Id: Checkerboard.h,v 1.12 2010/07/17 19:46:11 gec Exp $ 00005 Language: C++ 00006 Author: $Author: gec $ 00007 Date: $Date: 2010/07/17 19:46:11 $ 00008 Version: $Revision: 1.12 $ 00009 00010 Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved. 00011 See Copyright.txt for details. 00012 00013 This software is distributed WITHOUT ANY WARRANTY; without even 00014 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00015 PURPOSE. See the above copyright notices for more information. 00016 00017 =========================================================================*/ 00018 #ifndef _Checkerboard_h_ 00019 #define _Checkerboard_h_ 00020 00021 #include "vtkINRIA3DConfigure.h" 00022 00023 #include <iostream> 00024 #include "NIREPvtkViewImage2D.h" 00025 00026 class vtkActor; 00027 class vtkAlgorithmOutput; 00028 class vtkBox; 00029 class vtkBoxCutPolyLines; 00030 class vtkColorTransferFunction; 00031 class vtkColorTransferFunction; 00032 class vtkCutter; 00033 class vtkCutter; 00034 class vtkDataSet; 00035 class vtkDataSetMapper; 00036 class vtkImageActor; 00037 class vtkImageBlend; 00038 class vtkImageBlendWithMask; 00039 class vtkImageMapToColors; 00040 class vtkImageMapToWindowLevelColors; 00041 class vtkImageReslice; 00042 class NIREPvtkInteractorStyleImage2D; 00043 class vtkLineSource; 00044 class vtkLookupTable; 00045 class vtkMatrix4x4; 00046 class vtkPlane; 00047 class vtkPolyDataMapper; 00048 class vtkProp; 00049 class vtkProperty; 00050 class vtkScalarsToColors; 00051 class vtkTextMapper; 00052 class vtkTransform; 00053 class vtkRulerWidget; 00054 00055 //Jeffrey Hawley added this 00056 class vtkCheckerboardWidget; 00057 class vtkCheckerboardRepresentation; 00058 class vtkImageCheckerboard; 00059 //end of addition 00060 00061 //I have renamed this class from vtkViewImage2D to 00062 //Checkerboard. Once this was done I then started 00063 //to make changes so that we can display the 00064 //checkerboard widget from vtk. The checkerboard 00065 //widget requires two images, so I added an additional 00066 //set image called SetSecondImage(). 00067 //Jeffrey Hawley 00068 00092 class VTK_RENDERINGADDON_EXPORT Checkerboard : public NIREPvtkViewImage2D 00093 { 00094 public: 00095 00096 static Checkerboard* New(); 00097 vtkTypeRevisionMacro(Checkerboard, NIREPvtkViewImage2D); 00098 00099 00101 virtual void SetImage(vtkImageData* image); 00102 00104 // @param orientation 0 is XY (axial), 1 is YZ (sagittal), 2 is XZ (coronal). */ 00105 virtual void SetOrientation(unsigned int orientation); 00106 00108 virtual void SetWindow (double); 00109 00111 virtual void SetLevel (double); 00112 00113 00114 //Jeffrey Hawley[07/27/09]: Added SetSecondImage() which is similar to 00115 // SetImage() because checkerboard needs a second 00116 // image 00117 00119 void SetSecondImage (vtkImageData* image); 00120 00122 vtkGetObjectMacro (SecondImage, vtkImageData); 00123 00124 //end of changes 00125 00127 virtual void SetLookupTable (vtkScalarsToColors* lut); 00128 00130 virtual void UpdatePosition (); 00131 00138 virtual vtkActor* AddDataSet (vtkDataSet* dataset, vtkProperty* property = NULL); 00139 00147 virtual vtkActor* SyncAddPolyData (vtkPolyData* polydata, vtkProperty* property = NULL, double thickness = 0.2); 00148 // virtual vtkActor* AddPolyData (vtkPolyData* polydata, vtkProperty* property = NULL, double thickness = 0.2); 00149 00150 protected: 00151 Checkerboard(); 00152 ~Checkerboard(); 00153 00154 // Update data information and set the update and display extents. 00155 // Reset the camera position. 00156 void UpdateImageActor(); 00157 00158 00160 vtkImageData* AuxInputTwo; 00161 00163 vtkImageData* ResliceInputTwo; 00164 00165 vtkImageData* SecondImage; 00166 00168 vtkImageMapToColors* WindowLevelTwo; 00169 00173 vtkImageReslice* ImageResliceTwo; 00174 00175 // mask filter 00176 vtkImageBlendWithMask* MaskFilterTwo; 00177 00178 00179 //Jeffrey Hawley added this 00181 vtkCheckerboardWidget *CheckerboardWidget; 00182 vtkCheckerboardRepresentation *CheckerboardRepresentation; 00183 vtkImageCheckerboard *ImageCheckerboard; 00184 //end of addition 00185 00186 }; 00187 00188 #endif /* _Checkerboard_h_ */