Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GDCMIMAGEHELPER_H
00016 #define GDCMIMAGEHELPER_H
00017
00018 #include "gdcmTypes.h"
00019 #include "gdcmTag.h"
00020 #include <vector>
00021
00022 namespace gdcm
00023 {
00024
00025 class MediaStorage;
00026 class DataSet;
00027 class File;
00028 class Image;
00044 class GDCM_EXPORT ImageHelper
00045 {
00046 public:
00052 static void SetForceRescaleInterceptSlope(bool);
00053 static bool GetForceRescaleInterceptSlope();
00054
00061 static void SetForcePixelSpacing(bool);
00062 static bool GetForcePixelSpacing();
00063
00065 static std::vector<double> GetRescaleInterceptSlopeValue(File const & f);
00066 static void SetRescaleInterceptSlopeValue(File & f, const Image & img);
00067
00069 static std::vector<double> GetOriginValue(File const & f);
00070 static void SetOriginValue(DataSet & ds, const Image & img);
00071
00073 static std::vector<double> GetDirectionCosinesValue(File const & f);
00079
00080 static void SetDirectionCosinesValue(DataSet & ds, const std::vector<double> & dircos);
00081
00083 static std::vector<double> GetSpacingValue(File const & f);
00084 static void SetSpacingValue(DataSet & ds, const std::vector<double> & spacing);
00085
00087 static bool ComputeSpacingFromImagePositionPatient(const std::vector<double> &imageposition, std::vector<double> & spacing);
00088
00089 static bool GetDirectionCosinesFromDataSet(DataSet const & ds, std::vector<double> & dircos);
00090
00091 protected:
00092 static Tag GetSpacingTagFromMediaStorage(MediaStorage const &ms);
00093 static Tag GetZSpacingTagFromMediaStorage(MediaStorage const &ms);
00094
00095 private:
00096 static bool ForceRescaleInterceptSlope;
00097 static bool ForcePixelSpacing;
00098 };
00099
00100 }
00101
00102 #endif //__gdcmSpacing_h
00103