I'm having trouble using the "Save DICOM..." plugin from Tudor DICOM.
I can't seem to save with tags describing the geometry of an image,
specifically Image Position (Patient), Image Orientation (Patient), and
Pixel Spacing. For example, the following macro saves a 16-bit image locally
as a CT DICOM file, but without the IPP, IOP, and Pixel Spacing tags.
n = getSliceNumber();
x = 0.5 // pixel width in mm
y = 0.5 // pixel height in mm
z = 1.23; // table position in mm
cr = "\n";
tags = getMetadata( "info" );
tags = tags +
"0008,0016 SOP Class UID: 1.2.840.10008.5.1.4.1.1.2" + cr +
"0008,0060 Modality: CT" + cr +
"0020,000D Study Instance UID: 1" + cr +
"0020,000E Series Instance UID: 1" + cr +
"0020,0010 Study ID: 1" + cr +
"0020,0013 Instance Number: " + n + cr +
"0020,0032 Image Position (Patient): 0\\0\\" + z + cr +
"0020,0037 Image Orientation (Patient): 1\\0\\0\\0\\1\\0" + cr +
"0028,0030 Pixel Spacing: " + x + "\\" + y + cr +
"";
setMetadata( "info", tags );
run( "Save DICOM...", "filename=[C:\\" + n + ".dcm]" );
Stephen J Hart, CTO, HOLORAD,
[hidden email]