NIREP
|
00001 /*========================================================================= 00002 00003 Program: vtkINRIA3D 00004 Module: $Id: Wipe.h,v 1.10 2010/07/19 18:40:22 gec Exp $ 00005 Language: C++ 00006 Author: $Author: gec $ 00007 Date: $Date: 2010/07/19 18:40:22 $ 00008 Version: $Revision: 1.10 $ 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 _Wipe_h_ 00019 #define _Wipe_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 vtkRectilinearWipeWidget; 00057 class vtkImageRectilinearWipe; 00058 class vtkRectilinearWipeRepresentation; 00059 //end of addition 00060 00061 //I have renamed this class from vtkViewImage2D to 00062 //Wipe. Once this was done I then started 00063 //to make changes so that we can display the 00064 //Wipe widget from vtk. The Wipe 00065 //widget requires two images, so I added an additional 00066 //set image called SetSecondImage(). 00067 //Jeffrey Hawley 00068 00069 00093 class VTK_RENDERINGADDON_EXPORT Wipe : public NIREPvtkViewImage2D 00094 { 00095 public: 00096 00097 static Wipe* New(); 00098 vtkTypeRevisionMacro(Wipe, NIREPvtkViewImage2D); 00099 00100 00102 virtual void SetImage(vtkImageData* image); 00103 00106 virtual void SetOrientation(unsigned int orientation); 00107 00109 virtual void SetWindow (double); 00110 00112 virtual void SetLevel (double); 00113 00114 00115 //Jeffrey Hawley[07/27/09]: Added SetSecondImage() which is similar to 00116 // SetImage() because wipe needs a second 00117 // image 00118 00120 void SetSecondImage (vtkImageData* image); 00121 00123 vtkGetObjectMacro (SecondImage, vtkImageData); 00124 00125 //end of changes 00126 00128 virtual void SetLookupTable (vtkScalarsToColors* lut); 00129 00130 /* Updates the position of the image. */ 00131 virtual void UpdatePosition (); 00132 00139 virtual vtkActor* AddDataSet (vtkDataSet* dataset, vtkProperty* property = NULL); 00140 00148 virtual vtkActor* SyncAddPolyData (vtkPolyData* polydata, vtkProperty* property = NULL, double thickness = 0.2); 00149 //virtual vtkActor* AddPolyData (vtkPolyData* polydata, vtkProperty* property = NULL, double thickness = 0.2); 00150 00151 00152 00153 protected: 00154 Wipe(); 00155 ~Wipe(); 00156 00157 00158 //void InitInteractorStyle(unsigned int p_style); don't need this anymore, taken care of in the panel 00159 // Update data information and set the update and display extents. 00160 // Reset the camera position. 00161 void UpdateImageActor(); 00162 00163 00165 vtkImageData* AuxInputTwo; 00166 00168 vtkImageData* ResliceInputTwo; 00169 00171 vtkImageData* SecondImage; 00172 00174 vtkImageMapToColors* WindowLevelTwo; 00175 00179 vtkImageReslice* ImageResliceTwo; 00180 00181 // mask filter 00182 vtkImageBlendWithMask* MaskFilterTwo; 00183 00184 //Jeffrey Hawley added this 00186 vtkRectilinearWipeWidget *RectilinearWipeWidget; 00187 vtkRectilinearWipeRepresentation *RectilinearWipeRepresentation; 00188 vtkImageRectilinearWipe *ImageRectilinearWipe; 00189 //end of addition 00190 00191 00192 }; 00193 00194 #endif /* _Wipe_h_ */