X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImage.h;h=cbb0284ce0e925f706032825c7e8888da7744987;hb=08f7de414957e92b25ca5b299007e941b610d3a8;hp=7240be82c4ef5843a221ed34930d4b0691dc8ea5;hpb=0b3ad34085ec3fbbd8419843af0619745e963cfa;p=clitk.git diff --git a/common/vvImage.h b/common/vvImage.h index 7240be8..cbb0284 100644 --- a/common/vvImage.h +++ b/common/vvImage.h @@ -22,7 +22,10 @@ #include #include #include +#include +#include +#define VTK_EXCLUDE_STRSTREAM_HEADERS #include #include @@ -36,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(); @@ -46,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(); @@ -57,6 +68,7 @@ public : bool IsScalarTypeInteger(); bool IsScalarTypeInteger(int t); const std::vector< vtkSmartPointer >& GetTransform(); + void InitializeTransform(); void SetTimeSpacing(double s) { mTimeSpacing = s; } void SetTimeOrigin(double o) { mTimeOrigin = o; } bool HaveSameSizeAndSpacingThan(vvImage * other); @@ -76,6 +88,7 @@ private: double mTimeOrigin; double mTimeSpacing; unsigned int mImageDimension; + double mrange[2]; }; //------------------------------------------------------------------------------