X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImage.h;h=10ffc865fa2ed353605e4844abd6c456e5e678ee;hb=f3457815210ffe8646f3288be3362d34fcc7c3af;hp=2d4776d728cb9707a70ae2dc22c7a34ba27e810e;hpb=3b5ab5fac2a4b3d4c752722687a04a0dd08e80b0;p=clitk.git diff --git a/common/vvImage.h b/common/vvImage.h index 2d4776d..10ffc86 100644 --- a/common/vvImage.h +++ b/common/vvImage.h @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #ifndef VVIMAGE_H #define VVIMAGE_H @@ -22,11 +22,12 @@ #include #include #include + +#define VTK_EXCLUDE_STRSTREAM_HEADERS #include +#include class vtkImageData; -class vtkImageReslice; -class vtkTransform; //------------------------------------------------------------------------------ class vvImage : public itk::LightObject @@ -40,6 +41,7 @@ public : void Init(); void Reset(); template void AddItkImage(TItkImageType *input); + void AddVtkImage(vtkImageData* input); const std::vector& GetVTKImages(); vtkImageData* GetFirstVTKImageData(); int GetNumberOfDimensions() const; @@ -55,19 +57,23 @@ public : bool IsTimeSequence() const; bool IsScalarTypeInteger(); bool IsScalarTypeInteger(int t); - vtkSmartPointer GetTransform(); + const std::vector< vtkSmartPointer >& GetTransform(); void SetTimeSpacing(double s) { mTimeSpacing = s; } void SetTimeOrigin(double o) { mTimeOrigin = o; } - void UpdateReslice(); + bool HaveSameSizeAndSpacingThan(vvImage * other); + //META DATA + itk::MetaDataDictionary* GetFirstMetaDataDictionary(); private: vvImage(); ~vvImage(); std::vector< ConverterPointer > mItkToVtkConverters; - std::vector mVtkImages; - std::vector< vtkSmartPointer > mVtkImageReslice; - vtkSmartPointer mTransform; + std::vector< vtkImageData* > mVtkImages; + std::vector< vtkSmartPointer > mTransform; + //META DATA + std::vector< itk::MetaDataDictionary* > mDictionary; + double mTimeOrigin; double mTimeSpacing; unsigned int mImageDimension;