X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImage.h;h=29573cd029795f3cb7a4f3ab33b33fd9bcb36086;hb=0cace02fba5ca83add8dbf179cc7dd835bd43a5e;hp=49695bb106286a1f5ba4c557d26369319c3dd07f;hpb=a97c480d25285a6d143bd035d6b5fa0804a7d068;p=clitk.git diff --git a/common/vvImage.h b/common/vvImage.h index 49695bb..29573cd 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(); - + vtkSmartPointer 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