00001 /*=auto========================================================================= 00002 00003 Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved. 00004 00005 See Doc/copyright/copyright.txt 00006 or http://www.slicer.org/copyright/copyright.txt for details. 00007 00008 Program: 3D Slicer 00009 Module: $RCSfile: vtkTractographyPointAndArray.h,v $ 00010 Date: $Date: 2007/02/20 20:44:22 $ 00011 Version: $Revision: 1.1 $ 00012 00013 =========================================================================auto=*/ 00014 #ifndef __vtkTractographyPointAndArray_h 00015 #define __vtkTractographyPointAndArray_h 00016 00017 #include "vtkSystemIncludes.h" 00018 #include "vtkStreamer.h" 00019 #include "vtkTeemConfigure.h" 00020 00023 00024 // 00026 //BTX 00027 class VTK_Teem_EXPORT vtkTractographyPoint { //;prevent man page generation 00028 public: 00029 vtkTractographyPoint(); 00030 vtkTractographyPoint &operator=(const vtkTractographyPoint& hp); //for resizing 00031 00032 vtkFloatingPointType X[3]; 00033 vtkIdType CellId; 00034 int SubId; 00035 vtkFloatingPointType P[3]; 00036 vtkFloatingPointType W[3]; 00037 vtkFloatingPointType *V[3]; 00038 vtkFloatingPointType V0[3]; 00039 vtkFloatingPointType V1[3]; 00040 vtkFloatingPointType V2[3]; 00041 vtkFloatingPointType S; 00042 vtkFloatingPointType D; 00043 vtkFloatingPointType *T[3]; 00044 vtkFloatingPointType T0[3]; 00045 vtkFloatingPointType T1[3]; 00046 vtkFloatingPointType T2[3]; 00047 }; 00048 //ETX 00049 00050 //BTX 00051 class VTK_Teem_EXPORT vtkTractographyArray { //;prevent man page generation 00052 public: 00053 vtkTractographyArray(); 00054 ~vtkTractographyArray() 00055 { 00056 if (this->Array) 00057 { 00058 delete [] this->Array; 00059 } 00060 }; 00061 vtkIdType GetNumberOfPoints() {return this->MaxId + 1;}; 00062 vtkTractographyPoint *GetTractographyPoint(vtkIdType i) {return this->Array + i;}; 00063 vtkTractographyPoint *InsertNextTractographyPoint() 00064 { 00065 if ( ++this->MaxId >= this->Size ) 00066 { 00067 this->Resize(this->MaxId); 00068 } 00069 return this->Array + this->MaxId; 00070 } 00071 vtkTractographyPoint *Resize(vtkIdType sz); //reallocates data 00072 void Reset() {this->MaxId = -1;}; 00073 00074 vtkTractographyPoint *Array; 00075 vtkIdType MaxId; 00076 vtkIdType Size; 00077 vtkIdType Extend; 00078 vtkFloatingPointType Direction; 00079 }; 00080 //ETX 00081 00082 #define VTK_START_FROM_POSITION 0 00083 #define VTK_START_FROM_LOCATION 1 00084 00085 #endif
1.6.1