Thanks for providing a converted for 'CLASSIC' MR Image Storage instances.
I am confused with the documentation for using this class, here is what I did (debian/buster):
$ pip3 install highdicom
$ mkdir /tmp/mr
$ cp gdcmData/*FileSeq* /tmp/mr
$ python3 conv.py
/home/mathieu/.local/lib/python3.7/site-packages/pydicom/dataset.py:1981: UserWarning: Camel case attribute 'DICOMPrefix' used which is not in the element keyword data dictionary
warnings.warn(msg)
/home/mathieu/.local/lib/python3.7/site-packages/pydicom/dataset.py:1981: UserWarning: Camel case attribute 'FilePreamble' used which is not in the element keyword data dictionary
warnings.warn(msg)
/home/mathieu/.local/lib/python3.7/site-packages/pydicom/dataset.py:1981: UserWarning: Camel case attribute 'FrameVolumeBasedCalculationTechnique' used which is not in the element keyword data dictionary
warnings.warn(msg)
Which resulted in (truncated):
(0020,9171) SQ (Sequence with explicit length #=1) # 568, 1 UnassignedPerFrameConvertedAttributesSequence
(fffe,e000) na (Item with explicit length #=9) # 560, 1 Item
(0009,1015) ?? 30\33\33\53\36\39\4d\52\30\31\32\30\30\32\30\36\31\39\31\38\32\33... # 26, 1 Unknown Tag & Data
(0019,1212) ?? 30\30\31\2e\31\38\32\36\39\36\45\2d\34\32 # 14, 1 Unknown Tag & Data
(0020,0030) DS [-01.190625E+02\-1.190625E+02\-3.553830E+01] # 42, 3 RETIRED_ImagePosition
(0020,0050) DS [003.553830E+01] # 14, 1 RETIRED_Location
(0020,1041) DS [003.553830E+01] # 14, 1 SliceLocation
(0021,1160) ?? 30\30\30\2e\30\30\30\30\30\30\45\2b\30\30\5c\30\30\2e\30\30\30\30... # 42, 1 Unknown Tag & Data
(0021,1163) ?? 30\30\33\2e\35\35\33\38\33\30\45\2b\30\31 # 14, 1 Unknown Tag & Data
(0021,1342) ?? 20\20\20\20\31\35 # 6, 1 Unknown Tag & Data
(0051,1010) ?? 30\30\33\37\32\37\36\5c\46\20\37\39\59\5c\48\2d\53\50\2d\43\52\5c... # 316, 1 Unknown Tag & Data
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
The output file is missing Private Creator for nested DataSet.
If using ExplicitVRLittleEndian, here is what I get:
$ dcmdump enh.dcm
W: DcmItem: Non-standard VR ' ' (0a\00) encountered while parsing element (0008,0005), assuming 2 byte length field
W: DcmItem: Non-standard VR 'IR' (49\52) encountered while parsing element (5349,5f4f), assuming 4 byte length field
E: DcmElement: Unknown Tag & Data (5349,5f4f) larger (536624) than remaining bytes in file
E: dcmdump: I/O suspension or premature end of stream: reading file: enh.dcm
Could you please add a section in the documentation on how to use LegacyConvertedEnhancedMRImage class ? Thanks much.
For reference:
$ cat conv.py
from pathlib import Path
from pydicom.filereader import dcmread
from pydicom import uid
from highdicom.legacy.sop import LegacyConvertedEnhancedMRImage
series_dir = Path('/tmp/mr')
image_files = series_dir.glob('*.dcm')
image_datasets = [dcmread(str(f)) for f in image_files]
enh = LegacyConvertedEnhancedMRImage(image_datasets, "1.2.3", "1", "4.5.6", "2")
# enh.file_meta.TransferSyntaxUID = uid.ExplicitVRLittleEndian
enh.save_as("enh.dcm")
Thanks for providing a converted for 'CLASSIC' MR Image Storage instances.
I am confused with the documentation for using this class, here is what I did (debian/buster):
Which resulted in (truncated):
The output file is missing Private Creator for nested DataSet.
If using ExplicitVRLittleEndian, here is what I get:
Could you please add a section in the documentation on how to use LegacyConvertedEnhancedMRImage class ? Thanks much.
For reference: