X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImage.h;h=09cb4d94bcd7bb4d58b8378a8fb3430efc2112fa;hb=a365564201d98b704f43e1f52124f55f5e110d2e;hp=10ffc865fa2ed353605e4844abd6c456e5e678ee;hpb=dad5c078062d820e3fc4c2b6c47b822245487cb9;p=clitk.git diff --git a/common/vvImage.h b/common/vvImage.h index 10ffc86..09cb4d9 100644 --- a/common/vvImage.h +++ b/common/vvImage.h @@ -22,6 +22,8 @@ #include #include #include +#include +#include #define VTK_EXCLUDE_STRSTREAM_HEADERS #include @@ -37,6 +39,10 @@ public : typedef itk::SmartPointer 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 void ComputeScalarRangeBase(itk::Image *input); + template void ComputeScalarRange(DimensionDispatchBase, itk::Image *input); + template void ComputeScalarRange(DimensionDispatch< 1 >, itk::Image *input); unsigned long GetActualMemorySize(); std::vector GetSpacing(); std::vector GetOrigin() const; std::vector GetSize(); + std::vector< std::vector > GetDirection(); std::string GetScalarTypeAsITKString(); int GetNumberOfScalarComponents(); int GetScalarSize(); @@ -77,6 +87,7 @@ private: double mTimeOrigin; double mTimeSpacing; unsigned int mImageDimension; + double mrange[2]; }; //------------------------------------------------------------------------------