Can not extract directions from dicoms using mrinfo

Dear all,

A short question on extracting b vectors from dicoms acquired by sf_ssfp protocol.

mrinfo: [. ] scanning DICOM folder “/media/men…WI_Q300_TR35_1MM_11DIR_0014”.mrinfo: [done] scanning DICOM folder “/media/men…WI_Q300_TR35_1MM_11DIR_0014”
mrinfo: [100%] reading DICOM series “sf_ssfp_dwi_q300_TR35_1mm_11dir”
mrinfo: [ERROR] floating-point sequence specifier is empty

Based on the error message, the directions are not saved in the default field in dicoms. Which field was checked in mrinfo in general? Does it depend on the vendor?

Any comments is appreciated.
Meng

I’m struggling to see how this error message could arise from scanning a DICOM folder… What was the command line you issued exactly? Was it the -dwgrad option that causes this issue? If that’s the case, it would indicate that your DICOM data are badly formed, in that the DW information tags would be present, but would not contain any actual data. You could use the dcminfo -a <file.dcm> command to inspect one of the DICOM files (not the full folder), and maybe send it to me so I can take a closer look…

@jdtournier thank you very much for your help.

The error can be replicated by both of mrinfo -export_grad_mrtrix and mrinfo -dwgrad.

Here is the output by mrinfo -a single_dcm. It will be great if you can have a closer look. Could you tell me where can I upload my dcm?

TYPE GRP ELEM VR SIZE OFFSET NAME CONTENTS
----- ---- ---- --  -------  -------   -------------------------------------  ---------------------------------------
[DCM] 0002 0000 UL 4 132 FileMetaInformationGroupLength [ 178 ]
[DCM] 0002 0001 OB 2 144 FileMetaInformationVersion unknown data type
[DCM] 0002 0002 UI 26 158 MediaStorageSOPClassUID [ 1.2.840.10008.5.1.4.1.1.4 ]
[DCM] 0002 0003 UI 52 192 MediaStorageSOPInstanceUID [ 1.3.12.2.1107.5.2.32.35134.2016111313413885075929713 ]
[DCM] 0002 0010 UI 20 252 TransferSyntaxUID [ 1.2.840.10008.1.2.1 ]
[DCM] 0002 0012 UI 18 280 ImplementationClassUID [ 1.3.12.2.1107.5.2 ]
[DCM] 0002 0013 SH 8 306 ImplementationVersionName [ MR_VB17A ]
[DCM] 0008 0005 CS 10 322 SpecificCharacterSet [ ISO_IR 100 ]
[DCM] 0008 0008 CS 22 340 ImageType [ ORIGINAL PRIMARY M ND ]
[DCM] 0008 0012 DA 8 370 InstanceCreationDate [ 20161113 ]
[DCM] 0008 0013 TM 14 386 InstanceCreationTime [ 124157.265000 ]
[DCM] 0008 0016 UI 26 408 SOPClassUID [ 1.2.840.10008.5.1.4.1.1.4 ]
[DCM] 0008 0018 UI 52 442 SOPInstanceUID [ 1.3.12.2.1107.5.2.32.35134.2016111313413885075929713 ]
[DCM] 0008 0020 DA 8 502 StudyDate [ 20161112 ]
[DCM] 0008 0021 DA 8 518 SeriesDate [ 20161113 ]
[DCM] 0008 0022 DA 8 534 AcquisitionDate [ 20161113 ]
[DCM] 0008 0023 DA 8 550 ContentDate [ 20161113 ]
[DCM] 0008 0030 TM 14 566 StudyTime [ 140643.453000 ]
[DCM] 0008 0031 TM 14 588 SeriesTime [ 124157.265000 ]
[DCM] 0008 0032 TM 14 610 AcquisitionTime [ 122004.270000 ]
[DCM] 0008 0033 TM 14 632 ContentTime [ 124157.265000 ]
[DCM] 0008 0050 SH 10 654 AccessionNumber [ 0033243779 ]
[DCM] 0008 0060 CS 2 672 Modality [ MR ]
[DCM] 0008 1032 SQ 56 892 > ProcedureCodeSequence 
[DCM] FFFE E000 UN 48 904 - Item 
[DCM] 0008 0100 SH 4 912 CodeValue [ 6207 ]
[DCM] 0008 0102 SH 6 924 CodingSchemeDesignator [ 99GAP ]
[DCM] 0008 0104 LO 14 938 CodeMeaning [ MR funktionell ]
[DCM] 0008 103E LO 32 960 SeriesDescription [ sf_ssfp_dwi_q300_TR35_1mm_11dir ]
[DCM] 0008 1040 LO 10 1000 InstitutionalDepartmentName [ Department ]
[DCM] 0008 1090 LO 8 1018 ManufacturerModelName [ TrioTim ]
[DCM] 0008 1111 SQ 104 1034 > ReferencedPerformedProcedureStepSequen 
[DCM] FFFE E000 UN 96 1046 - Item 
[DCM] 0008 1150 UI 24 1054 ReferencedSOPClassUID [ 1.2.840.10008.3.1.2.3.3 ]
[DCM] 0008 1155 UI 56 1086 ReferencedSOPInstanceUID [ 1.3.12.2.1107.5.2.32.35134.30000016101715470359300000258 ]
[DCM] 0008 1140 SQ 306 1150 > ReferencedImageSequence 
[DCM] FFFE E000 UN 94 1162 - Item 
[DCM] 0008 1150 UI 26 1170 ReferencedSOPClassUID [ 1.2.840.10008.5.1.4.1.1.4 ]
[DCM] 0008 1155 UI 52 1204 ReferencedSOPInstanceUID [ 1.3.12.2.1107.5.2.32.35134.2016111220070581771507130 ]
[DCM] FFFE E000 UN 94 1264 - Item 
[DCM] 0008 1150 UI 26 1272 ReferencedSOPClassUID [ 1.2.840.10008.5.1.4.1.1.4 ]
[DCM] 0008 1155 UI 52 1306 ReferencedSOPInstanceUID [ 1.3.12.2.1107.5.2.32.35134.2016111215073719684000147 ]
[DCM] FFFE E000 UN 94 1366 - Item 
[DCM] 0008 1150 UI 26 1374 ReferencedSOPClassUID [ 1.2.840.10008.5.1.4.1.1.4 ]
[DCM] 0008 1155 UI 52 1408 ReferencedSOPInstanceUID [ 1.3.12.2.1107.5.2.32.35134.2016111215073463876600143 ]
[DCM] 0010 0010 PN 30 1468 PatientName [ ZZZNeuroradiologie Postmortem ]
[DCM] 0010 0020 LO 10 1506 PatientID [ GAP598738 ]
[DCM] 0010 0030 DA 8 1524 PatientBirthDate [ 19850303 ]
[DCM] 0010 0040 CS 2 1540 PatientSex [ O ]
[DCM] 0010 1010 AS 4 1550 PatientAge [ 031Y ]
[DCM] 0010 1030 DS 2 1562 PatientWeight [ 50 ]
[DCM] 0018 0020 CS 2 1572 ScanningSequence [ RM ]
[DCM] 0018 0021 CS 2 1582 SequenceVariant [ SS ]
[DCM] 0018 0022 CS 0 1592 ScanOptions [ ]
[DCM] 0018 0023 CS 2 1600 MRAcquisitionType [ 3D ]
[DCM] 0018 0024 SH 12 1610 SequenceName [ ssfp_dwi3d1 ]
[DCM] 0018 0025 CS 2 1630 AngioFlag [ N ]
[DCM] 0018 0050 DS 2 1640 SliceThickness [ 1 ]
[DCM] 0018 0080 DS 2 1650 RepetitionTime [ 35 ]
[DCM] 0018 0081 DS 2 1660 EchoTime [ 24 ]
[DCM] 0018 0083 DS 2 1670 NumberOfAverages [ 2 ]
[DCM] 0018 0084 DS 10 1680 ImagingFrequency [ 123.211293 ]
[DCM] 0018 0085 SH 2 1698 ImagedNucleus [ 1H ]
[DCM] 0018 0086 IS 2 1708 EchoNumbers [ 1 ]
[DCM] 0018 0087 DS 2 1718 MagneticFieldStrength [ 3 ]
[DCM] 0018 0089 IS 4 1728 NumberOfPhaseEncodingSteps [ 144 ]
[DCM] 0018 0091 IS 2 1740 EchoTrainLength [ 1 ]
[DCM] 0018 0093 DS 4 1750 PercentSampling [ 100 ]
[DCM] 0018 0094 DS 2 1762 PercentPhaseFieldOfView [ 75 ]
[DCM] 0018 0095 DS 4 1772 PixelBandwidth [ 159 ]
[DCM] 0018 1000 LO 6 1784 DeviceSerialNumber [ 35134 ]
[DCM] 0018 1020 LO 12 1798 SoftwareVersions [ syngo MR B17 ]
[DCM] 0018 1030 LO 32 1818 ProtocolName [ sf_ssfp_dwi_q300_TR35_1mm_11dir ]
[DCM] 0018 1251 SH 4 1858 TransmitCoilName [ Body ]
[DCM] 0018 1310 US 8 1870 AcquisitionMatrix [ 0 192 144 0 ]
[DCM] 0018 1312 CS 4 1886 InPlanePhaseEncodingDirection [ ROW ]
[DCM] 0018 1314 DS 2 1898 FlipAngle [ 35 ]
[DCM] 0018 1315 CS 2 1908 VariableFlipAngleFlag [ N ]
[DCM] 0018 1316 DS 16 1918 SAR [ 0.04533169170101 ]
[DCM] 0018 1318 DS 2 1942 dBdt [ 0 ]
[DCM] 0018 5100 CS 4 1952 PatientPosition [ HFP ]
[DCM] 0019 0010 LO 18 1964 unknown [ SIEMENS MR HEADER ]
[DCM] 0019 1008 CS 12 1990 unknown [ IMAGE NUM 4 ]
[DCM] 0019 1009 LO 4 2010 unknown [ 1.0 ]
[DCM] 0019 100B DS 10 2022 unknown [ 1295387.5 ]
[DCM] 0019 100F SH 6 2040 unknown [ Normal ]
[DCM] 0019 1011 SH 2 2054 unknown [ No ]
[DCM] 0019 1012 SL 12 2064 unknown [ 0 0 -1295 ]
[DCM] 0019 1013 SL 12 2084 unknown [ 0 0 -1295 ]
[DCM] 0019 1014 IS 6 2104 unknown [ 0 0 0 ]
[DCM] 0019 1015 FD 24 2118 unknown [ -86.247 -55.4036 77.6626 ]
[DCM] 0019 1017 DS 2 2150 unknown [ 1 ]
[DCM] 0019 1018 IS 6 2160 unknown [ 16400 ]
[DCM] 0020 000D UI 48 2174 StudyInstanceUID [ 1.2.276.0.38.1.1.1.3150.20161112135721.33243779 ]
[DCM] 0020 000E UI 58 2230 SeriesInstanceUID [ 1.3.12.2.1107.5.2.32.35134.201611131319582075729621.0.0.0 ]
[DCM] 0020 0010 SH 10 2296 StudyID [ 0033243779 ]
[DCM] 0020 0011 IS 2 2314 SeriesNumber [ 14 ]
[DCM] 0020 0012 IS 2 2324 AcquisitionNumber [ 1 ]
[DCM] 0020 0013 IS 2 2334 InstanceNumber [ 1 ]
[DCM] 0020 0032 DS 48 2344 ImagePositionPatient [ -86.24698498039 -55.403614044189 77.662647231009 ]
[DCM] 0020 0037 DS 36 2400 ImageOrientationPatient [ 1 0 2.051035e-010 2.051035e-010 0 -1 ]
[DCM] 0020 0052 UI 52 2444 FrameOfReferenceUID [ 1.3.12.2.1107.5.2.32.35134.1.20161112140643593.0.0.0 ]
[DCM] 0020 1040 LO 0 2504 PositionReferenceIndicator [ ]
[DCM] 0020 1041 DS 16 2512 SliceLocation [ -55.403614044189 ]
[DCM] 0028 0002 US 2 2536 SamplesPerPixel [ 1 ]
[DCM] 0028 0004 CS 12 2546 PhotometricInterpretation [ MONOCHROME2 ]
[DCM] 0028 0010 US 2 2566 Rows [ 192 ]
[DCM] 0028 0011 US 2 2576 Columns [ 144 ]
[DCM] 0028 0030 DS 32 2586 PixelSpacing [ 1.1041666269302 1.1041666269302 ]
[DCM] 0028 0100 US 2 2626 BitsAllocated [ 16 ]
[DCM] 0028 0101 US 2 2636 BitsStored [ 12 ]
[DCM] 0028 0102 US 2 2646 HighBit [ 11 ]
[DCM] 0028 0103 US 2 2656 PixelRepresentation [ 0 ]
[DCM] 0028 0106 US 2 2666 SmallestImagePixelValue [ 0 ]
[DCM] 0028 0107 US 2 2676 LargestImagePixelValue [ 381 ]
[DCM] 0028 1050 DS 4 2686 WindowCenter [ 204 ]
[DCM] 0028 1051 DS 4 2698 WindowWidth [ 464 ]
[DCM] 0028 1055 LO 6 2710 WindowCenterWidthExplanation [ Algo1 ]
[DCM] 0029 0010 LO 18 2724 PrivateCreatorCode [ SIEMENS CSA HEADER ]
[DCM] 0029 0011 LO 22 2750 AnotherPrivateCreatorCode [ SIEMENS MEDCOM HEADER2 ]
[DCM] 0029 1008 CS 12 2780 CSAImageHeaderType [ IMAGE NUM 4 ]
[DCM] 0029 1009 LO 8 2800 CSAImageHeaderVersion [ 20161113 ]
[DCM] 0029 1010 OB 9364 2816 SiemensCSA1 unknown data type
[DCM] 0029 1018 CS 2 12192 CSASeriesHeaderType [ MR ]
[DCM] 0029 1019 LO 8 12202 CSASeriesHeaderVersion [ 20161113 ]
[DCM] 0029 1020 OB 61144 12218 SiemensCSA2 unknown data type
[DCM] 0029 1160 LO 4 73374 unknown [ com ]
[DCM] 0032 1060 LO 14 73386 RequestedProcedureDescription [ MR funktionell ]
[DCM] 0032 1064 SQ 56 73408 > RequestedProcedureCodeSequence 
[DCM] FFFE E000 UN 48 73420 - Item 
[DCM] 0008 0100 SH 4 73428 CodeValue [ 6207 ]
[DCM] 0008 0102 SH 6 73440 CodingSchemeDesignator [ 99GAP ]
[DCM] 0008 0104 LO 14 73454 CodeMeaning [ MR funktionell ]
[DCM] 0040 0244 DA 8 73476 PerformedProcedureStepStartDate [ 20161112 ]
[DCM] 0040 0245 TM 14 73492 PerformedProcedureStepStartTime [ 140643.531000 ]
[DCM] 0040 0253 SH 10 73514 PerformedProcedureStepID [ 0033243779 ]
[DCM] 0040 0254 LO 14 73532 PerformedProcedureStepDescription [ MR funktionell ]
[DCM] 0040 0275 SQ 134 73554 > RequestAttributesSequence 
[DCM] FFFE E000 UN 126 73566 - Item 
[DCM] 0040 0007 LO 14 73574 ScheduledProcedureStepDescription [ MR funktionell ]
[DCM] 0040 0008 SQ 56 73596 > ScheduledProtocolCodeSequence 
[DCM] FFFE E000 UN 48 73608 - Item 
[DCM] 0008 0100 SH 4 73616 CodeValue [ 6207 ]
[DCM] 0008 0102 SH 6 73628 CodingSchemeDesignator [ 99GAP ]
[DCM] 0008 0104 LO 14 73642 CodeMeaning [ MR funktionell ]
[DCM] 0040 0009 SH 10 73664 ScheduledProcedureStepID [ 0033243779 ]
[DCM] 0040 1001 SH 10 73682 RequestedProcedureID [ 0033243779 ]
[DCM] 0051 0010 LO 18 73700 unknown [ SIEMENS MR HEADER ]
[DCM] 0051 1008 CS 12 73726 unknown [ IMAGE NUM 4 ]
[DCM] 0051 1009 LO 4 73746 unknown [ 1.0 ]
[DCM] 0051 100A LO 8 73758 unknown [ TA 21:35 ]
[DCM] 0051 100B LO 8 73774 unknown [ 144*192 ]
[DCM] 0051 100C LO 12 73790 unknown [ FoV 158*211 ]
[DCM] 0051 100D SH 8 73810 unknown [ SP A55.4 ]
[DCM] 0051 100E LO 4 73826 unknown [ Cor ]
[DCM] 0051 100F LO 10 73838 unknown [ C:HEA;HEP ]
[DCM] 0051 1012 SH 4 73856 unknown [ TP 0 ]
[DCM] 0051 1013 SH 4 73868 unknown [ +LPH ]
[DCM] 0051 1016 LO 4 73880 unknown [ M/ND ]
[DCM] 0051 1017 SH 6 73892 unknown [ SL 1.0 ]
[DCM] 0051 1019 LO 2 73906 unknown [ A2 ]
[DCM] 7FE0 0010 OW 55296 73916 PixelData unknown data type

Best Meng

Ah, it’s from a Siemens Trio, they store that information differently. Can you run this instead:

dcminfo -a -csa <file.dcm>

The output is quite long and too much to pasted here. The txt file is not allow to upload here.
Which way do you prefer to exchange data in this case? Very sorry for the inconvenience.

No problem, you can send it me by email: jdtournier@gmail.com

OK, thanks for sending through your data. Here’s the relevant part of the output of dcminfo -a -csa DICOM.IMA:

...
[CSA] PhaseEncodingDirectionPositive: 1            
[CSA] NumberOfImagesInMosaic:
[CSA] DiffusionGradientDirection:
[CSA] ImageGroup:
[CSA] SliceNormalVector:
[CSA] DiffusionDirectionality:
[CSA] TimeAfterStart:
...

As you can see, the DW information fields are empty…

Nonetheless, I’ve added a few more checks in our handling of the DW scheme to prevent the error message you were getting (mrinfo: [ERROR] floating-point sequence specifier is empty). I’ve just made changes to the code (which I’ll commit in a minute), what it will report now is:

mrinfo: [ERROR] no diffusion encoding information found in image "XYZ"

Thank you very much!
Then I have to go back to the one who developed the protocol and figure out the missing directions.

Best Meng