NIREP
|
00001 /*========================================================================= 00002 00003 Program: vtkINRIA3D 00004 Module: $Id: Grid.h,v 1.1 2011/01/21 00:07:59 hawle Exp $ 00005 Language: C++ 00006 Author: $Author: hawle $ 00007 Date: $Date: 2011/01/21 00:07:59 $ 00008 Version: $Revision: 1.1 $ 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 _Grid_h_ 00019 #define _Grid_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 #include <gecDeform.hpp> 00057 //end of addition 00058 00059 //I have renamed this class from vtkViewImage2D to 00060 //Grid. Once this was done I then started 00061 //to make changes so that we can display the 00062 //Grid widget from vtk. The Grid 00063 //widget requires two images, so I added an additional 00064 //set image called SetSecondImage(). 00065 //Jeffrey Hawley 00066 00090 class VTK_RENDERINGADDON_EXPORT Grid : public NIREPvtkViewImage2D 00091 { 00092 public: 00093 00094 static Grid* New(); 00095 vtkTypeRevisionMacro(Grid, NIREPvtkViewImage2D); 00096 00097 00099 virtual void SetImage(vtkImageData* image); 00100 00101 void SetImage(gec::Deform<double>* 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 //end of changes 00114 00116 virtual void SetLookupTable (vtkScalarsToColors* lut); 00117 00119 virtual void UpdatePosition (); 00120 00127 virtual vtkActor* AddDataSet (vtkDataSet* dataset, vtkProperty* property = NULL); 00128 00136 virtual vtkActor* SyncAddPolyData (vtkPolyData* polydata, vtkProperty* property = NULL, double thickness = 0.2); 00137 // virtual vtkActor* AddPolyData (vtkPolyData* polydata, vtkProperty* property = NULL, double thickness = 0.2); 00138 00139 protected: 00140 Grid(); 00141 ~Grid(); 00142 00143 // Update data information and set the update and display extents. 00144 // Reset the camera position. 00145 void UpdateImageActor(); 00146 00147 00148 00149 00150 //Jeffrey Hawley added this 00151 gec::Deform<double>* deform; 00152 //end of addition 00153 00154 }; 00155 00156 #endif /* _Grid_h_ */