diff -Nru dicom3tools-1.0~20111109/appsrc/dcfile/dcuncat.cc dicom3tools-1.0~20111213/appsrc/dcfile/dcuncat.cc --- dicom3tools-1.0~20111109/appsrc/dcfile/dcuncat.cc 2011-11-09 17:18:43.000000000 +0000 +++ dicom3tools-1.0~20111213/appsrc/dcfile/dcuncat.cc 2011-12-13 12:02:03.000000000 +0000 @@ -496,7 +496,14 @@ bool ignorereaderrors=options.get("ignorereaderrors"); bool replaceSeriesNumberAndUID=!options.get("sameseries"); bool insertConcatenationAttributes=!options.get("noconcat"); + + int instanceNumberOffset = 0; bool replaceInstanceNumber=options.get("instancenumber"); + if (options.get("instancenumberstart",instanceNumberOffset)) { + --instanceNumberOffset; // if want to actually start from 1 as specified, offset needs to be 0 + replaceInstanceNumber=true; + } + bool replaceFrameIncrementPointerWithInstanceNumber=options.get("frameincrementpointerinstancenumber"); bool replaceVectors=options.get("vectorupdate"); bool unenhance=options.get("unenhance"); @@ -557,7 +564,7 @@ << dicom_output_options.usage() << " -framesper n" << " [-unenhance [-noprivateseq] [-noprivateattr]]" - << " [-instancenumber]" + << " [-instancenumber|[-instancenumberstart n]]" << " [-frameincrementpointerinstancenumber|vectorupdate]" << " [-sameseries]" << " [-noconcat]" @@ -683,7 +690,7 @@ if (replaceInstanceNumber) { list-=TagFromName(InstanceNumber); - list+=new IntegerStringAttribute(TagFromName(InstanceNumber),inConcatenationNumber); // will increment by from 1 for degenerate case of framesPerEachInstanceOfConcatenation == 1 + list+=new IntegerStringAttribute(TagFromName(InstanceNumber),Uint32(instanceNumberOffset + inConcatenationNumber)); // will increment by from 1 for degenerate case of framesPerEachInstanceOfConcatenation == 1 } Attribute *aFrameIncrementPointer = list[TagFromName(FrameIncrementPointer)]; @@ -799,7 +806,7 @@ { ostrstream ostr; if (dicom_output_options.filename) ostr << dicom_output_options.filename; - ostr << inConcatenationNumber << ends; + ostr << (instanceNumberOffset + inConcatenationNumber) << ends; // include offset to match instance number outputFileName=ostr.str(); } #ifdef USEBINARYFLAGFOROUTPUTOPENMODE diff -Nru dicom3tools-1.0~20111109/appsrc/dcfile/dcuncat.man dicom3tools-1.0~20111213/appsrc/dcfile/dcuncat.man --- dicom3tools-1.0~20111109/appsrc/dcfile/dcuncat.man 2011-11-09 17:32:20.000000000 +0000 +++ dicom3tools-1.0~20111213/appsrc/dcfile/dcuncat.man 2011-12-13 12:02:06.000000000 +0000 @@ -1,4 +1,4 @@ -.TH DCUNCAT 1 "9 November 2011" "DICOM PS3" "DICOM PS3 - Split into concatenation instances" +.TH DCUNCAT 1 "13 December 2011" "DICOM PS3" "DICOM PS3 - Split into concatenation instances" .SH NAME dcuncat \- ACR/NEMA DICOM PS3 ... DICOM PS3 - Split multiframe image into concatenation .SH SYNOPSIS @@ -21,6 +21,9 @@ .B \-instancenumber ] [ +.B \-instancenumberstart " n " +] +[ .B \-frameincrementpointerinstancenumber ] [ @@ -39,7 +42,8 @@ .LP .B dcuncat reads the named dicom multi frame input file, and splits it into a concatenation -of smaller instances. +of smaller instances, which will be written to files in the specified output path with the +InstanceNumber or InConcatenationNumber appended. .LP The concatenation instances will be placed in a new series generated from the old series number plus 7000, unless specified otherwise. @@ -61,7 +65,7 @@ .B \-unenhance .RS Convert enhanced IODs to old unenhanced by removing per-frame and shared functional group sequences and moving their contents to the top level dataset. Implies framesper of 1. -Also adds NumberOFFrames based on SOP Class. May be specified even if source not enhanced, to avoid (empty) functional group sequences being added. +Also adds NumberOfFrames based on SOP Class. May be specified even if source not enhanced, to avoid (empty) functional group sequences being added. .RE .TP .B \-noprivateseq @@ -83,7 +87,12 @@ .TP .B \-instancenumber .RS -Replace InstanceNumber with an incrementing value. +Replace InstanceNumber with an incrementing value starting with 1. +.RE +.TP +.B \-instancenumberstart n +.RS +Replace InstanceNumber with an incrementing value starting with n (do not need to specify \-instancenumber); will be reflected in the output filename as well. .RE .TP .B \-frameincrementpointerinstancenumber diff -Nru dicom3tools-1.0~20111109/CHANGES dicom3tools-1.0~20111213/CHANGES --- dicom3tools-1.0~20111109/CHANGES 2011-11-09 17:29:36.000000000 +0000 +++ dicom3tools-1.0~20111213/CHANGES 2011-12-13 12:08:35.000000000 +0000 @@ -1,3 +1,11 @@ +111213: appsrc/dcfile/dcuncat.cc: add option to replace instance number starting with a specific number to allow scripts to extend a series with successive invocations + +111212: libsrc/standard/condn.tpl/module,strval/base.tpl,dx.tpl: improve animal versus human conditions to check SRT homo sapiens, and make view position and body part examined human versus animal specific + +111212: libsrc/standard/elmdict/other.tpl: add more Sound private elements + +111117: libsrc/standard/strval/base.tpl: add CSD for 99NCIAIM + 111109: appsrc/dcfile/dcuncat.cc: add options to replace instance number, frame increment pointer and frame increment pointer vectors, as well as add number of frames during unenhance based on SOP class 111106: libsrc/standard/elmdict/other.tpl: add Vepro private elements diff -Nru dicom3tools-1.0~20111109/debian/changelog dicom3tools-1.0~20111213/debian/changelog --- dicom3tools-1.0~20111109/debian/changelog 2011-11-11 15:49:27.000000000 +0000 +++ dicom3tools-1.0~20111213/debian/changelog 2011-12-16 11:17:10.000000000 +0000 @@ -1,3 +1,11 @@ +dicom3tools (1.0~20111213-1) unstable; urgency=low + + * New upstream + - Improve human vs animal view position conditions + * Fix VCS urls + + -- Mathieu Malaterre Fri, 16 Dec 2011 11:50:18 +0100 + dicom3tools (1.0~20111109-1) unstable; urgency=low * New upstream diff -Nru dicom3tools-1.0~20111109/debian/control dicom3tools-1.0~20111213/debian/control --- dicom3tools-1.0~20111109/debian/control 2011-11-11 15:51:05.000000000 +0000 +++ dicom3tools-1.0~20111213/debian/control 2011-12-16 11:17:10.000000000 +0000 @@ -6,8 +6,8 @@ Priority: extra Build-Depends: debhelper (>= 8), xutils-dev, libx11-dev, libxext-dev Standards-Version: 3.9.2 -Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/dicom3tools/trunk/?rev=0&sc=0 -Vcs-Svn: svn://svn.debian.org/svn/debian-med/trunk/packages/dicom3tools/trunk/ +Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/dicom3tools/trunk/ +Vcs-Svn: svn://svn.debian.org/debian-med/trunk/packages/dicom3tools/trunk/ Homepage: http://www.dclunie.com/dicom3tools.html Package: dicom3tools diff -Nru dicom3tools-1.0~20111109/libsrc/standard/condn.tpl dicom3tools-1.0~20111213/libsrc/standard/condn.tpl --- dicom3tools-1.0~20111109/libsrc/standard/condn.tpl 2011-05-29 16:01:53.000000000 +0000 +++ dicom3tools-1.0~20111213/libsrc/standard/condn.tpl 2011-12-12 22:50:17.000000000 +0000 @@ -4196,18 +4196,38 @@ Element="ResponsiblePerson" Operator="And" ValuePresent="" ConditionEnd +Condition="IsHuman" + ( + Element="CodingSchemeDesignator" ElementPresentWithin="PatientSpeciesCodeSequence" StringValue="SRT" + Element="CodeValue" Operator="And" ElementPresentWithin="PatientSpeciesCodeSequence" StringValue="L-85B00" # homo sapiens + ) + ( + Element="PatientSpeciesDescription" Modifier="Not" ElementPresent="" + Element="PatientSpeciesCodeSequence" Operator="And" Modifier="Not" ElementPresent="" + Element="PatientBreedDescription" Operator="And" Modifier="Not" ElementPresent="" + Element="PatientBreedCodeSequence" Operator="And" Modifier="Not" ElementPresent="" + Element="BreedRegistrationSequence" Operator="And" Modifier="Not" ElementPresent="" + ) Operator="Or" +ConditionEnd + Condition="IsAnimal" - Element="PatientSpeciesDescription" ElementPresent="" - Element="PatientSpeciesCodeSequence" Operator="Or" ElementPresent="" - Element="PatientBreedDescription" Operator="Or" ElementPresent="" - Element="PatientBreedCodeSequence" Operator="Or" ElementPresent="" - Element="BreedRegistrationSequence" Operator="Or" ElementPresent="" + ( + Element="CodingSchemeDesignator" ElementPresentWithin="PatientSpeciesCodeSequence" StringValue="SRT" + Element="CodeValue" Operator="And" ElementPresentWithin="PatientSpeciesCodeSequence" StringValue="L-85B00" # homo sapiens + ) Modifier="Not" + ( + Element="PatientSpeciesDescription" ElementPresent="" + Element="PatientSpeciesCodeSequence" Operator="Or" ElementPresent="" + Element="PatientBreedDescription" Operator="Or" ElementPresent="" + Element="PatientBreedCodeSequence" Operator="Or" ElementPresent="" + Element="BreedRegistrationSequence" Operator="Or" ElementPresent="" + ) Operator="And" ConditionEnd Condition="IsAnimalAndPatientSpeciesCodeSequenceAbsent" Element="PatientSpeciesCodeSequence" Modifier="Not" ElementPresent="" ( - Element="PatientSpeciesDescription" ElementPresent="" + Element="PatientSpeciesDescription" ElementPresent="" Element="PatientBreedDescription" Operator="Or" ElementPresent="" Element="PatientBreedCodeSequence" Operator="Or" ElementPresent="" Element="BreedRegistrationSequence" Operator="Or" ElementPresent="" @@ -4217,7 +4237,7 @@ Condition="IsAnimalAndPatientSpeciesDescriptionAbsent" Element="PatientSpeciesDescription" Modifier="Not" ElementPresent="" ( - Element="PatientSpeciesCodeSequence" ElementPresent="" + Element="PatientSpeciesCodeSequence" ElementPresent="" Element="PatientBreedDescription" Operator="Or" ElementPresent="" Element="PatientBreedCodeSequence" Operator="Or" ElementPresent="" Element="BreedRegistrationSequence" Operator="Or" ElementPresent="" @@ -4227,7 +4247,7 @@ Condition="IsAnimalAndPatientBreedCodeSequenceEmpty" Element="PatientBreedCodeSequence" Modifier="Not" SequenceHasItems="" ( - Element="PatientSpeciesDescription" ElementPresent="" + Element="PatientSpeciesDescription" ElementPresent="" Element="PatientSpeciesCodeSequence" Operator="Or" ElementPresent="" Element="PatientBreedDescription" Operator="Or" ElementPresent="" Element="PatientBreedCodeSequence" Operator="Or" ElementPresent="" diff -Nru dicom3tools-1.0~20111109/libsrc/standard/elmdict/other.tpl dicom3tools-1.0~20111213/libsrc/standard/elmdict/other.tpl --- dicom3tools-1.0~20111109/libsrc/standard/elmdict/other.tpl 2011-11-06 18:12:07.000000000 +0000 +++ dicom3tools-1.0~20111213/libsrc/standard/elmdict/other.tpl 2011-12-12 12:21:47.000000000 +0000 @@ -646,6 +646,7 @@ (f001,001b) VERS="" VR="IS" VM="1" Owner="Sound Technologies" Keyword="TelemedExamID" Name="Telemed Exam ID" (f001,001c) VERS="" VR="LO" VM="1" Owner="Sound Technologies" Keyword="ExamCreatedByGuid" Name="Exam Created By Guid" (f001,001d) VERS="" VR="LO" VM="1" Owner="Sound Technologies" Keyword="ClientNameGuid" Name="Client Name Guid" +(f001,001e) VERS="" VR="LO" VM="1" Owner="Sound Technologies" Keyword="ReceptorBitsPerPixel" Name="Receptor Bits Per Pixel" (3711,0001) VERS="" VR="LO" VM="1" Owner="A.L.I. Technologies, Inc." Keyword="Filename" Name="Filename" (3711,0002) VERS="" VR="OB" VM="1" Owner="A.L.I. Technologies, Inc." Keyword="DataBlobOfAVisit" Name="Data Blob of a Visit" diff -Nru dicom3tools-1.0~20111109/libsrc/standard/module/base.tpl dicom3tools-1.0~20111213/libsrc/standard/module/base.tpl --- dicom3tools-1.0~20111109/libsrc/standard/module/base.tpl 2011-06-06 01:57:35.000000000 +0000 +++ dicom3tools-1.0~20111213/libsrc/standard/module/base.tpl 2011-12-12 22:09:24.000000000 +0000 @@ -506,7 +506,9 @@ InvokeMacro="CodeSequenceMacro" SequenceEnd SequenceEnd - Name="BodyPartExamined" Type="3" StringDefinedTerms="BodyPartExamined" + Name="BodyPartExamined" Type="3" + Verify="BodyPartExamined" Condition="IsHuman" StringDefinedTerms="BodyPartExaminedHuman" + Verify="BodyPartExamined" Condition="IsAnimal" StringDefinedTerms="BodyPartExaminedAnimal" Name="PatientPosition" Type="2C" StringDefinedTerms="PatientPosition" Condition="SOPClassIsCTOrMR" mbpo="true" Verify="PatientPosition" Condition="PatientPositionAndPatientOrientationCodeSequencePresent" ThenErrorMessage="May not be present when PatientOrientationCodeSequence is present" Name="SmallestPixelValueInSeries" Type="3" @@ -1059,8 +1061,12 @@ ModuleEnd Module="CRSeries" - Name="BodyPartExamined" Type="2" StringDefinedTerms="BodyPartExamined" - Name="ViewPosition" Type="2" StringDefinedTerms="ViewPosition" + Name="BodyPartExamined" Type="2" + Verify="BodyPartExamined" Condition="IsHuman" StringDefinedTerms="BodyPartExaminedHuman" + Verify="BodyPartExamined" Condition="IsAnimal" StringDefinedTerms="BodyPartExaminedAnimal" + Name="ViewPosition" Type="2" + Verify="ViewPosition" Condition="IsHuman" StringDefinedTerms="ViewPositionHuman" + Verify="ViewPosition" Condition="IsAnimal" StringDefinedTerms="ViewPositionAnimal" Name="FilterType" Type="3" Name="CollimatorGridName" Type="3" Name="FocalSpots" Type="3" diff -Nru dicom3tools-1.0~20111109/libsrc/standard/module/dx.tpl dicom3tools-1.0~20111213/libsrc/standard/module/dx.tpl --- dicom3tools-1.0~20111109/libsrc/standard/module/dx.tpl 2011-05-29 16:28:13.000000000 +0000 +++ dicom3tools-1.0~20111213/libsrc/standard/module/dx.tpl 2011-12-12 21:57:16.000000000 +0000 @@ -183,7 +183,9 @@ InvokeMacro="CodeSequenceMacro" BaselineContextID="4012" SequenceEnd Name="PatientPosition" Type="3" StringDefinedTerms="PatientPosition" - Name="ViewPosition" Type="3" StringDefinedTerms="ViewPosition" + Name="ViewPosition" Type="3" + Verify="ViewPosition" Condition="IsHuman" StringDefinedTerms="ViewPositionHuman" + Verify="ViewPosition" Condition="IsAnimal" StringDefinedTerms="ViewPositionAnimal" Sequence="ViewCodeSequence" Type="3" VM="1" InvokeMacro="CodeSequenceMacro" BaselineContextID="4010" Sequence="ViewModifierCodeSequence" Type="3" VM="0-n" diff -Nru dicom3tools-1.0~20111109/libsrc/standard/strval/base.tpl dicom3tools-1.0~20111213/libsrc/standard/strval/base.tpl --- dicom3tools-1.0~20111109/libsrc/standard/strval/base.tpl 2011-07-16 15:48:43.000000000 +0000 +++ dicom3tools-1.0~20111213/libsrc/standard/strval/base.tpl 2011-12-12 22:09:20.000000000 +0000 @@ -235,6 +235,7 @@ 99PMP = PixelMed Publishing, 99PMPMRMF = PixelMed Publishing NEMA MRMF, 99SDM = SNOMED DICOM Microglossary, + 99NCIAIM = NCI Annotation Imaging Markup, ACR = ACR Index for Radiological Diagnosis, ART = WHO Adverse Reaction terms, AS4 = ASTM, @@ -360,7 +361,7 @@ L = Left } -StringValues="BodyPartExamined" { +StringValues="BodyPartExaminedHuman" { ABDOMEN, ABDOMENPELVIS, ADRENAL, @@ -475,6 +476,57 @@ ZYGOMA } +StringValues="BodyPartExaminedAnimal" { + ABDOMEN, + LEGS, + ATLANTOAXIAL, + ATLANTOOCCIPITAL, + BLADDER, + CARPUS, + CSPINE, + CTSPINE, + CHEST, + CHESTABDOMEN, + TAIL, + COLON, + DIGIT, + DISTALPHALANX, + ELBOW, + WHOLEBODY, + ESOPHAGUS, + FEMUR, + FOREFETLOCK, + HINDFETLOCK, + FOREFOOT, + FRONTALSINUS, + HINDFOOT, + HIP, + HUMERUS, + LSPINE, + LSSPINE, + JAW, + METACARPUS, + METATARSUS, + NAVICULAR, + FOREPASTERN, + HINDPASTERN, + PATELLA, + PELVIS, + RADIUSULNA, + SSPINE, + SHOULDER, + SKULL, + STIFLE, + TARSUS, + TSPINE, + TLSPINE, + TIBIAFIBULA, + UGITRACT, + URETHRA, + URINARYTRACT, + WING +} + StringValues="Modality" { AU = Audio, BI = Biomagnetic Imaging, @@ -538,7 +590,7 @@ FFDL = Feet First Decubitus Right } -StringValues="ViewPosition" { +StringValues="ViewPositionHuman" { AP = Anterior Posterior, PA = Posterior Anterior, LL = Left Lateral, @@ -549,6 +601,89 @@ LLO = Left Lateral Oblique } +StringValues="ViewPositionAnimal" { + CDDI_CRPRO, + CD10DI_CRPRO, + CDCR, + DV, + DL_PAMO, + D35L_PAMO, + D40L_PAMO, + D60L_PAMO, + DL_PLMO, + D35L_PLMO, + D40L_PLMO, + D45L_PLMO, + D60L_PLMO, + DM_PALO, + D35M_PALO, + D40M_PALO, + D45M_PALO, + D60M_PALO, + DM_PLLO, + D35M_PLLO, + D40M_PLLO, + D45M_PLLO, + D60M_PLLO, + DPA, + DPL, + DPR_PADIO, + D65PR_PADIO, + DPR_PLDIO, + D65PR_PLDIO, + DR_VCDO, + D20R_VCDO, + LDPR_MPADIO, + L45D50PR_MPADIO, + LDPR_MPLDIO, + L45D50PR_MPLDIO, + LM, + LECD_RTRO, + LE30CD_RTRO, + LED_RTVO, + LE20D_RTVO, + LE45D_RTVO, + LER_RTCDO, + LE20R_RTCDO, + LEV_RTDO, + LE20V_RTDO, + LE45V_RTDO, + LERTL, + ML, + PAM_DLO, + PA45M_DLO, + PAPR_DDIO, + PA75PR_DDIO, + PLL_DMO, + PL60L_DMO, + PLPR_DDIO, + PL75PR_DDIO, + PRDI, + RTCD_LERO, + RT30CD_LERO, + RTD_LEVO, + RT20D_LEVO, + RT45D_LEVO, + RTR_LECDO, + RT20R_LECDO, + RTV_LEDO, + RT20V_LEDO, + RT45V_LEDO, + RTLEL, + RCD, + RD_CDVO, + R20D_CDVO, + RV_CDDO, + R30V_CDDO, + VLE_DRTO, + V30LE_DRTO, + VRT_DLEO, + V30RT_DLEO, + VD, + VR_DCDO, + V20R_DCDO +} + StringValues="CassetteSize" { 18CMX24CM, 8INX10IN, diff -Nru dicom3tools-1.0~20111109/VERSION dicom3tools-1.0~20111213/VERSION --- dicom3tools-1.0~20111109/VERSION 2011-11-09 17:48:51.000000000 +0000 +++ dicom3tools-1.0~20111213/VERSION 2011-12-13 12:09:15.000000000 +0000 @@ -1 +1 @@ -1.00.snapshot.20111109 +1.00.snapshot.20111213