On 2/18/15 6:05 PM, d4v3m0nk wrote:
> I appreciate that this thread may be here for more historical purposes,
> but I've got a multi-frame DICOM file that I've uncompressed, converted
> to single frames, obtained raw pixel data, resized the images and then
> converted back to individual DICOM files. I've tried on numerous
> occasions to then use "dcmulti" to take those single frame files and
>put them back into one multi-frame but it's not overly clear how to
> achieve this, even when reading the "man dcmulti".
>
> I'm using "dcmulti -v 1-0*_1.dcm > MULTIFRAME.DCM"
>
> MULTIFRAME.DCM gets created but is only 982 bytes in size, whereas each
> of the single frame DICOM files (1-001_1.dcm, 1-002_1.dcm) are 1040
> bytes each.
Try the -of flag to specify the output file rather than piping stdout to
a file.
Note that dcmulti is really not a general purpose tool; it was originally
written just to concatenate frames, and then later tweaked for the
specific role of producing the test images for the NEMA MR (and later
CT) enhanced multi-frame project; it expects the input images to be in
precisely the right form to make a valid enhanced MR or CT output file,
and when the original input files were not, I copied them and added or
changed what was necessary to make dcmulti happy. It also spews lots
of warnings and errors that were useful to me but can often be
ignored.
I don't maintain it, so it probably no longer produces completely
valid output for some cases, as we have cleaned up the standard
a bit since those days.
An example of a Makefile for one of the files from that project is
included below, in case it helps (the
Makefile.common.mk just
contains paths and nothing of interest).
That said, if you give it valid single frame images as input, it
should produce a multi-frame pixel data output regardless of the
validity of the rest of the attributes, so when you say your input
files are only 1040 bytes long, that doesn't sound right, since
that isn't enough to contain any meaningful pixel data, right?
Are your single frame images valid? What does dciodvfy say about
them?
David
--- start example Makefile ---
include
Makefile.common.mk
DISCIMG/IMAGES/BRTUM001: Makefile.BRTUM001
mkdir -p ${TMPDIR}
rm -f ${TMPDIR}/*
for i in \
${SRCDIR}/braintumordiffusionspectro/488 \
${SRCDIR}/braintumordiffusionspectro/489 \
${SRCDIR}/braintumordiffusionspectro/490 \
${SRCDIR}/braintumordiffusionspectro/491 \
${SRCDIR}/braintumordiffusionspectro/492 \
${SRCDIR}/braintumordiffusionspectro/493 \
${SRCDIR}/braintumordiffusionspectro/494 \
${SRCDIR}/braintumordiffusionspectro/495 \
${SRCDIR}/braintumordiffusionspectro/496 \
${SRCDIR}/braintumordiffusionspectro/497 \
${SRCDIR}/braintumordiffusionspectro/498 \
${SRCDIR}/braintumordiffusionspectro/499 \
${SRCDIR}/braintumordiffusionspectro/500 \
${SRCDIR}/braintumordiffusionspectro/501 \
${SRCDIR}/braintumordiffusionspectro/502 \
; do ${DCCP} \
-stamp ${STAMP} \
-r PatientName "Brain^RFrontalTumorWSpectro" -r PatientID "MF-0000020" \
-r PatientSex "M" -r PatientBirthDate "19500704" \
-r PatientAge "052Y" \
-r PatientSize "1.6" -r PatientWeight "75" \
-r StudyID "05020" \
-r AccessionNumber "9995020" \
-r StudyDate "${RELEASEDATE}" \
-r SeriesDate "${RELEASEDATE}" \
-r ContentDate "${RELEASEDATE}" \
-r AcquisitionDate "${RELEASEDATE}" \
-r AcquisitionNumber "1" \
-r PerformingPhysicianName "Smith^John" \
-r ReferringPhysicianName "Thomas^Albert" \
-r NameOfPhysiciansReadingStudy "Smith^John" \
-r OperatorsName "Jones^Molly" \
-r InstitutionName "St. Nowhere Hospital" \
-r Manufacturer "Acme Medical Devices" \
-r ManufacturerModelName "Super Dooper Scanner" \
-r DeviceSerialNumber "123456" \
-r SoftwareVersions "1.00" \
-r StationName "CONSOLE01" \
-r BodyPartExamined "BRAIN" \
-r ImageType "ORIGINAL\\PRIMARY\\T1" \
-r AcquisitionContrast "T1" \
-r MagneticFieldStrength "1.5" \
-r ImagingFrequency "63.8755" \
-r EchoTrainLength 1 \
-d ImageComments \
-d InstanceCreationDate \
-d InstanceCreationTime \
-nodisclaimer \
"$$i" ${TMPDIR}/`basename "$$i"`; \
done
${DCMULTI} -of $@ \
-stamp ${STAMP} \
-nodisclaimer \
-removeinstanceuid \
-sortby ImagePositionPatient \
-derivedurationfromtiming \
-r StudyDescription "Brain" \
-r MultiPlanarExcitation "YES" \
-r SpecificCharacterSet "ISO_IR 100" \
-d BodyPartExamined \
-d PixelPaddingValue \
${TMPDIR}/*
rm -f ${TMPDIR}/*
--- end example Makefile ---