Just as I finished to write I realized that you use enhanced files and
I am not sure ours are such. Anyway my message is:
I use ReadFile instead of read_file or the other constructs.
In particular in our institute we have a 3T Philips Achieva and we
produce 5D series (4D magnitude/phase images). To be able to create
the two 4D images (we use our proprietary software to analyze images)
I get the important informations about the image from the first DICOM
header:
import dicom as pyDicom
# determine a few things about the 5D image
ds = pyDicom.ReadFile(File, force=True)
SizeX = int(ds.Rows)
SizeY = int(ds.Columns)
SizeT = ds[0x020,0x105].value
# because it is 5D it contains 2 4D images
SizeZ = len(files)/SizeT / 2
spacingX, spacingY = ds[0x28,0x30].value
sliceThickness = ds[0x18,0x88].value
spacingZ = ds[0x18,0x88].value
About the Rescale Slope in our scanner (I understand it depends on
some software settings) it is in (2005,140a)
RS = float(ds[0x2005140a].value)
If it is a 4D series it should be the same in every frame (BTW for our
B1 mapping sequence it isn't).
For my needs I then cycle on all the files putting each slice in the
proper location in the 4D image.
Edo
PS
> --
> You received this message because you are subscribed to the Google Groups
> "pydicom" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pydicom/-/tBNk5MNwAEYJ.
> To post to this group, send email to pyd...@googlegroups.com.
> To unsubscribe from this group, send email to
> pydicom+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pydicom?hl=en.
>
--
Edo
weblog http://edo.imanetti.net/wordpress
podcast http://sieegiueeaccaso.blogspot.com
cooking http://edo.imanetti.net/cucina
:wq