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 #define VTK_EXCLUDE_STRSTREAM_HEADERS
27 #include <vtkSmartPointer.h>
28 #include <vtkTransform.h>
32 //------------------------------------------------------------------------------
33 class vvImage : public itk::LightObject
37 typedef itk::SmartPointer<Self> Pointer;
38 typedef itk::ProcessObject::Pointer ConverterPointer;
43 template<class TItkImageType> void AddItkImage(TItkImageType *input);
44 void AddVtkImage(vtkImageData* input);
45 const std::vector<vtkImageData*>& GetVTKImages();
46 vtkImageData* GetFirstVTKImageData();
47 int GetNumberOfDimensions() const;
48 int GetNumberOfSpatialDimensions();
49 void GetScalarRange(double* range);
50 unsigned long GetActualMemorySize();
51 std::vector<double> GetSpacing();
52 std::vector<double> GetOrigin() const;
53 std::vector<int> GetSize();
54 std::string GetScalarTypeAsITKString();
55 int GetNumberOfScalarComponents();
57 bool IsTimeSequence() const;
58 bool IsScalarTypeInteger();
59 bool IsScalarTypeInteger(int t);
60 const std::vector< vtkSmartPointer<vtkTransform> >& GetTransform();
61 void SetTimeSpacing(double s) { mTimeSpacing = s; }
62 void SetTimeOrigin(double o) { mTimeOrigin = o; }
63 bool HaveSameSizeAndSpacingThan(vvImage * other);
65 itk::MetaDataDictionary* GetFirstMetaDataDictionary();
71 std::vector< ConverterPointer > mItkToVtkConverters;
72 std::vector< vtkImageData* > mVtkImages;
73 std::vector< vtkSmartPointer<vtkTransform> > mTransform;
75 std::vector< itk::MetaDataDictionary* > mDictionary;
79 unsigned int mImageDimension;
81 //------------------------------------------------------------------------------
83 #include "vvImage.txx"