![]() We now have a list of volumes, where each volume is a list of headersĮstimate the z direction cosine by (effectively) finding the cross Otherwise make a new volume for this header If the current header matches the current volume, insert it there, SequenceName (iff sequencename exists in both) PixelSpacing (to tolerance of sum squared difference 1e-4) ImageOrientationPatient (to tolerance of sum squared difference 1e-4) Match the current header to the current volume iff the following match: Whether all but ICE1 are the same as ICE2. The same way as above, for the first header in this volume, and check ‘name’, in the first header in this volume, then extract ICE dims in If we have ICE1 above, and we do have ‘CSAIMageHeaderInfo’, with a Then, for each currently identified volume: Look for Siemens ‘CSAImageHeaderInfo’,Ĭheck it has a ‘name’ field, then pull dimensions out of ‘ICE_Dims’įield in form of 9 integers separated by ‘_’, where ‘X’ in this Take first header, put as start of first volume. Sorting files into volumes ¶ First pass ¶ Page refers to standard (slice by slice) DICOMs. Theįor converting mosaic format, see Siemens mosaic format. ‘NumberOfImagesInMosaic’, and with non-zero ‘NumberOfImagesInMosaic’. Non-empty fields from that header of ‘AcquisitionMatrixText’, ( 0029, 1009 ) OB : '20100114'Īnd a readable CSA header (see Siemens mosaic format), and with Mosaic images are those with the Siemens private tag: Next SPM distinguishes between Siemens mosaic format and standard DICOM. ‘ImageOrientationPatient’ - presumably on the basis that SPM cannotįields ‘SeriesNumber’, ‘AcquisitionNumber’ and ‘InstanceNumber’ are ‘Rows’, ‘Columns’, ‘BitsAllocated’, ‘BitsStored’, ‘HighBit’,ĭiscards images lacking any of ‘PixelSpacing’, ‘ImagePositionPatient’, ![]() Volume of ones corresponding to the acquisition planes.ĭiscards images that do not have any of (‘MR’, ‘PT’, ‘CT’) in ‘Modality’ field.ĭiscards images lacking any of ‘StartOfPixelData’, ‘SamplesperPixel’, Tag of (29, 1210) for these it pulls out the affine, and writes a Images that have ‘SOPClassUID’ = ‘1.3.5.9.1’ and the private SPM makes a special case of Siemens ‘spectroscopy images’. Written by John Ashburner and Jesper Andersson. If not even:Ĥ294967295 appears to be OK - and decoded as Inf for tag length.ġ3 appears to mean 10 and is reset to be 10Īny other odd number is not valid and gives a tag length of 0 In this case the tag length is zero, and we JA comments that GE ‘ImageDelimitationItem’ has If current format isĮxplicit (as in ‘explicit little endian’):įor VR of x00x00, then group, element must be (FFFE, E00D) (itemĭelimitation tag). Tag lengths as read in read_tag subfunction. That he didn’t find that in the standard, but that it seemed to be (item delimitation tag), and the tag length was not 0, then SPM sets theįile pointer back by 4 bytes from the current position. The loop breaks when theĬurrent tag is empty, or is the item delimitation tag (group=FFFE,Īfter it has broken out of the loop, if the last tag was (FFFE, E00D) The end of the loop, it reads the next tag. The tag is processed (by setting values into the return structure). The read_dicom subfunction reads a tag, then has a loop during which Otherwise - crash out with error saying that this is not DICOM file. Signature for a ‘GE Twin+excite’ for which JA notes there is noĭocumentation set file pointer to 0 and continue read with If group = 8 and element = 0, this is apparently the Spm_dicom_dict.mat, then set file pointer to 0 and continue Reads two unsigned short values into group and tag Otherwise, tests to see if this is what SPM calls truncated DICOMįile format - lacking 128 byte lead in and DICM string: When opening the DICOM file, SPM (subfunction readdicomfile)Ĭhecks if these are DICM if so then continues file read Reads the given DICOM files into a struct. Group and element, and values, where values is a structĪrray, one element per (group, element) pair, with fields name and The version in SPM8, as of around January 2010. Spm_dicom_dict.mat and spm_dicom_convert.m. ![]() The relevant SPM files are spm_dicom_headers.m, There are other notes in Siemens mosaic format. These are some notes on the algorithms that SPM uses to convert fromĭICOM to nifti.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |