]> Creatis software - clitk.git/blobdiff - common/vvImage.h
QVTKOpenGLNativeWidget is available from VTK8.2
[clitk.git] / common / vvImage.h
index 10ffc865fa2ed353605e4844abd6c456e5e678ee..cbb0284ce0e925f706032825c7e8888da7744987 100644 (file)
@@ -22,6 +22,8 @@
 #include <vector>
 #include <itkObjectFactory.h>
 #include <itkProcessObject.h>
+#include <itkMinimumMaximumImageCalculator.h>
+#include <itkCastImageFilter.h>
 
 #define VTK_EXCLUDE_STRSTREAM_HEADERS
 #include <vtkSmartPointer.h>
@@ -37,6 +39,10 @@ public :
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::ProcessObject::Pointer ConverterPointer;
   itkNewMacro(Self);
+  
+  struct DimensionDispatchBase {};
+  template< unsigned int VDimension >
+  struct DimensionDispatch:public DimensionDispatchBase {};
 
   void Init();
   void Reset();
@@ -47,10 +53,14 @@ public :
   int GetNumberOfDimensions() const;
   int GetNumberOfSpatialDimensions();
   void GetScalarRange(double* range);
+  template<class TPixelType, unsigned int VImageDimension> void ComputeScalarRangeBase(itk::Image<TPixelType,VImageDimension> *input);
+  template<class TPixelType, unsigned int VImageDimension> void ComputeScalarRange(DimensionDispatchBase, itk::Image<TPixelType,VImageDimension> *input);
+  template<class TPixelType, unsigned int VImageDimension> void ComputeScalarRange(DimensionDispatch< 1 >, itk::Image<TPixelType,VImageDimension> *input);
   unsigned long GetActualMemorySize();
   std::vector<double> GetSpacing();
   std::vector<double> GetOrigin() const;
   std::vector<int> GetSize();
+  std::vector< std::vector<double> > GetDirection();
   std::string GetScalarTypeAsITKString();
   int GetNumberOfScalarComponents();
   int GetScalarSize();
@@ -58,6 +68,7 @@ public :
   bool IsScalarTypeInteger();
   bool IsScalarTypeInteger(int t);
   const std::vector< vtkSmartPointer<vtkTransform> >& GetTransform();
+  void InitializeTransform();
   void SetTimeSpacing(double s) { mTimeSpacing = s; }
   void SetTimeOrigin(double o) { mTimeOrigin = o; }
   bool HaveSameSizeAndSpacingThan(vvImage * other);
@@ -77,6 +88,7 @@ private:
   double mTimeOrigin;
   double mTimeSpacing;
   unsigned int mImageDimension;
+  double mrange[2];
 };
 //------------------------------------------------------------------------------