X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImage.h;h=10ffc865fa2ed353605e4844abd6c456e5e678ee;hb=0896f3c0ca8e3b1642f3fbce277c64618871f12b;hp=cc0ce76028dd3734eeeb342aa80c9de996846d05;hpb=f181e8fc01dec00bc6b0c82e0e273e1bb0d292c5;p=clitk.git diff --git a/common/vvImage.h b/common/vvImage.h index cc0ce76..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; @@ -52,24 +54,29 @@ public : std::string GetScalarTypeAsITKString(); int GetNumberOfScalarComponents(); int GetScalarSize(); - bool IsTimeSequence(); + 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; }; //------------------------------------------------------------------------------