X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImage.h;h=07987c78cda75b16c5d40d3c5f3949643dc083e8;hb=e6df1e1e6d29bacf5878463ef4db7589088ed381;hp=49695bb106286a1f5ba4c557d26369319c3dd07f;hpb=a97c480d25285a6d143bd035d6b5fa0804a7d068;p=clitk.git diff --git a/common/vvImage.h b/common/vvImage.h index 49695bb..07987c7 100644 --- a/common/vvImage.h +++ b/common/vvImage.h @@ -25,10 +25,11 @@ class vtkImageData; class vtkImageReslice; +class vtkGeneralTransform; class vtkTransform; -class vtkImageReslice; -class vtkAbstractTransform; +class vtkGridTransform; +//------------------------------------------------------------------------------ class vvImage : public itk::LightObject { public : @@ -38,52 +39,46 @@ public : void Init(); void Reset(); - void SetImage(std::vector images); void AddImage(vtkImageData* image); const std::vector& GetVTKImages(); vtkImageData* GetFirstVTKImageData(); - int GetNumberOfDimensions() const; int GetNumberOfSpatialDimensions(); - ///Writes the scalar range to the provided array, which must have room for two doubles void GetScalarRange(double* range); unsigned long GetActualMemorySize(); std::vector GetSpacing(); std::vector GetOrigin() const; std::vector GetSize(); - std::string GetScalarTypeAsString(); + std::string GetScalarTypeAsITKString(); int GetNumberOfScalarComponents(); int GetScalarSize(); bool IsTimeSequence(); bool IsScalarTypeInteger(); bool IsScalarTypeInteger(int t); - vtkTransform * GetTransform(); - void SetTransform(vtkTransform *transform); - vtkImageReslice* GetVTKImageReslice(); - void SetVTKImageReslice(vtkImageReslice *reslice); - - void SetRotateX(int xvalue); - void SetRotateY(int yvalue); - void SetRotateZ(int zvalue); - - void SetTranslationX(int xvalue); - void SetTranslationY(int yvalue); - void SetTranslationZ(int zvalue); - void SetOrigin(double value[3]); - + vtkSmartPointer GetTransform(); + vtkSmartPointer GetGridTransform(); + void SetTransform(vtkSmartPointer transform); void SetTimeSpacing(double s) { mTimeSpacing = s; } void SetTimeOrigin(double o) { mTimeOrigin = o; } + void UpdateReslice(); private: vvImage(); ~vvImage(); + std::vector mVtkImages; std::vector< vtkSmartPointer > mVtkImageReslice; + vtkSmartPointer mGeneralTransform; vtkSmartPointer mTransform; + vtkSmartPointer mGridTransform; double mTimeOrigin; double mTimeSpacing; - double * origin; }; +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +vtkImageData * CopyAndCastToFloatFrom(vtkImageData * p); +//------------------------------------------------------------------------------ #endif