NIREP
|
00001 /*========================================================================= 00002 00003 Program: vtkINRIA3D 00004 Module: $Id: VectorField.h,v 1.4 2011/01/25 23:48:18 hawle Exp $ 00005 Language: C++ 00006 Author: $Author: hawle $ 00007 Date: $Date: 2011/01/25 23:48:18 $ 00008 Version: $Revision: 1.4 $ 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 _VectorField_h_ 00019 #define _VectorField_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 00057 //end of addition 00058 00059 //I have renamed this class from vtkViewImage2D to 00060 //VectorField. Once this was done I then started 00061 //to make changes so that we can display the 00062 //VectorField widget from vtk. The VectorField 00063 //widget requires two images, so I added an additional 00064 //set image called SetSecondImage(). 00065 //Jeffrey Hawley 00066 00090 class VTK_RENDERINGADDON_EXPORT VectorField : public NIREPvtkViewImage2D 00091 { 00092 public: 00093 00094 static VectorField* New(); 00095 vtkTypeRevisionMacro(VectorField, NIREPvtkViewImage2D); 00096 00097 00099 virtual void SetImage(vtkImageData* image); 00100 00102 // @param orientation 0 is XY (axial), 1 is YZ (sagittal), 2 is XZ (coronal). */ 00103 virtual void SetOrientation(unsigned int orientation); 00104 00106 virtual void SetWindow (double); 00107 00109 virtual void SetLevel (double); 00110 00111 //end of changes 00112 00114 virtual void SetLookupTable (vtkScalarsToColors* lut); 00115 00117 virtual void UpdatePosition (); 00118 00125 virtual vtkActor* AddDataSet (vtkDataSet* dataset, vtkProperty* property = NULL); 00126 00134 virtual vtkActor* SyncAddPolyData (vtkPolyData* polydata, vtkProperty* property = NULL, double thickness = 0.2); 00135 // virtual vtkActor* AddPolyData (vtkPolyData* polydata, vtkProperty* property = NULL, double thickness = 0.2); 00136 00137 protected: 00138 VectorField(); 00139 ~VectorField(); 00140 00141 // Update data information and set the update and display extents. 00142 // Reset the camera position. 00143 void UpdateImageActor(); 00144 00145 00146 00147 00148 //Jeffrey Hawley added this 00149 vtkActor *m_vectorActor; 00150 00151 //end of addition 00152 00153 }; 00154 00155 #endif /* _VectorField_h_ */