level 5
gucunlin
楼主
//计算所有点的hu值
ans = GetDCMFileTag(gdcm::Tag(0x0028, 0x1052));
int intercept = ans.toInt();
ans = GetDCMFileTag(gdcm::Tag(0x0028, 0x1053));
int slope = ans.toInt();
m_PdataHU = new short[m_dimx*m_dimy];
short *pshort = (short *)m_Pdata;
for (int i = 0; i < m_dimx*m_dimy; i++)
{
m_PdataHU[i] = *pshort * slope + intercept;
pshort++;
}

2021年07月15日 02点07分
1
ans = GetDCMFileTag(gdcm::Tag(0x0028, 0x1052));
int intercept = ans.toInt();
ans = GetDCMFileTag(gdcm::Tag(0x0028, 0x1053));
int slope = ans.toInt();
m_PdataHU = new short[m_dimx*m_dimy];
short *pshort = (short *)m_Pdata;
for (int i = 0; i < m_dimx*m_dimy; i++)
{
m_PdataHU[i] = *pshort * slope + intercept;
pshort++;
}
