#pragma once #include "Common.h" enum SurfacePicType { Right, Left, Behind, Front, Top, Bottom, }; typedef struct { SurfacePicType surfaceType; ImageInfo imgInfo; }SurfacePicInfo; enum AxisName { X, Y, Z, }; class SliceHelper { public: SliceHelper(); ~SliceHelper(); void LoadVolumeData(UniformVolumeDataInfo volumeDataInfo); bool VolumeDataLoaded(); int GetMaximumImgByteCounts(); void GetSlicePlaneImage(Plane plane,ImageInfo& imageInfo); void GetVerticalToAxisSlicePlaneImage(AxisName axisName,int intersectionVal,ImageInfo& imageInfo); void ImgFlipAndRotate(ImageInfo srcImgInfo, const int srcDataSize, cv::Mat& imgDst); private: bool _dataLoaded; uint8_t* _volumeData; int _x; int _y; int _z; float _spacing; ColorType _colorType; int _dataByteCounts; int _bytesPerPixel; };