1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
23 #include <itkObjectFactory.h>
24 #include <itkProcessObject.h>
26 #include <vtkSmartPointer.h>
27 #include <vtkTransform.h>
31 //------------------------------------------------------------------------------
32 class vvImage : public itk::LightObject
36 typedef itk::SmartPointer<Self> Pointer;
37 typedef itk::ProcessObject::Pointer ConverterPointer;
42 template<class TItkImageType> void AddItkImage(TItkImageType *input);
43 void AddVtkImage(vtkImageData* input);
44 const std::vector<vtkImageData*>& GetVTKImages();
45 vtkImageData* GetFirstVTKImageData();
46 int GetNumberOfDimensions() const;
47 int GetNumberOfSpatialDimensions();
48 void GetScalarRange(double* range);
49 unsigned long GetActualMemorySize();
50 std::vector<double> GetSpacing();
51 std::vector<double> GetOrigin() const;
52 std::vector<int> GetSize();
53 std::string GetScalarTypeAsITKString();
54 int GetNumberOfScalarComponents();
56 bool IsTimeSequence() const;
57 bool IsScalarTypeInteger();
58 bool IsScalarTypeInteger(int t);
59 vtkSmartPointer<vtkTransform> GetTransform();
60 void SetTimeSpacing(double s) { mTimeSpacing = s; }
61 void SetTimeOrigin(double o) { mTimeOrigin = o; }
62 bool HaveSameSizeAndSpacingThan(vvImage * other);
68 std::vector< ConverterPointer > mItkToVtkConverters;
69 std::vector<vtkImageData*> mVtkImages;
70 vtkSmartPointer<vtkTransform> mTransform;
74 unsigned int mImageDimension;
76 //------------------------------------------------------------------------------
78 #include "vvImage.txx"