~brenthuisman/medimage

3148928c9c12bd379ba85df5df216296c257200c — Brent 9 months ago 4146e91
dicom read: DoseGridScaling
1 files changed, 7 insertions(+), 0 deletions(-)

M medimage/io_dicom.py
M medimage/io_dicom.py => medimage/io_dicom.py +7 -0
@@ 43,6 43,7 @@ def read(self,filename,**kwargs):
				pa = pa.reshape(pa.shape[::-1])
				pa = pa.reshape(tuple(reversed(pa.shape))).swapaxes(0, len(pa.shape) - 1)
				self.imdata[:,:,i] = pa

		try:
			self.header['ElementSpacing'] = [float(dcm.PixelSpacing[0]), float(dcm.PixelSpacing[1]), float(dcm.SliceThickness)]
			#[dcm.SliceThickness]+list(dcm.PixelSpacing[::-1])


@@ 50,6 51,12 @@ def read(self,filename,**kwargs):
			self.header['ElementSpacing'] = [float(dcm.PixelSpacing[0]), float(dcm.PixelSpacing[1])]

		try:
			a=np.diff(dcm.GridFrameOffsetVector)
			print(a)
		except:
			pass

		try:
			self.mul(dcm.DoseGridScaling) #doses may have this
		except:
			pass