modulew.h

Go to the documentation of this file.
00001 // Automatically generated from template - EDITS WILL BE LOST
00002 
00003 // Generated by module.awk with options write modulew
00004 
00005 #ifndef __Header_modulew__
00006 #define __Header_modulew__
00007 
00008 void
00009 Macro_IconImageSequenceMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00010 {
00011         stream << "\tMacro <IconImageSequenceMacro>\n";
00012 
00013         if (SamplesPerPixel) {
00014                 stream << "\t\t";
00015                 SamplesPerPixel->write(stream,dict);
00016                 stream << "\n";
00017         }
00018         else
00019                 stream << "\t\tElement <SamplesPerPixel> not present\n";
00020 
00021         if (PhotometricInterpretation) {
00022                 stream << "\t\t";
00023                 PhotometricInterpretation->write(stream,dict);
00024                 stream << "\n";
00025         }
00026         else
00027                 stream << "\t\tElement <PhotometricInterpretation> not present\n";
00028 
00029         if (Rows) {
00030                 stream << "\t\t";
00031                 Rows->write(stream,dict);
00032                 stream << "\n";
00033         }
00034         else
00035                 stream << "\t\tElement <Rows> not present\n";
00036 
00037         if (Columns) {
00038                 stream << "\t\t";
00039                 Columns->write(stream,dict);
00040                 stream << "\n";
00041         }
00042         else
00043                 stream << "\t\tElement <Columns> not present\n";
00044 
00045         if (BitsAllocated) {
00046                 stream << "\t\t";
00047                 BitsAllocated->write(stream,dict);
00048                 stream << "\n";
00049         }
00050         else
00051                 stream << "\t\tElement <BitsAllocated> not present\n";
00052 
00053         if (BitsStored) {
00054                 stream << "\t\t";
00055                 BitsStored->write(stream,dict);
00056                 stream << "\n";
00057         }
00058         else
00059                 stream << "\t\tElement <BitsStored> not present\n";
00060 
00061         if (HighBit) {
00062                 stream << "\t\t";
00063                 HighBit->write(stream,dict);
00064                 stream << "\n";
00065         }
00066         else
00067                 stream << "\t\tElement <HighBit> not present\n";
00068 
00069         if (PixelRepresentation) {
00070                 stream << "\t\t";
00071                 PixelRepresentation->write(stream,dict);
00072                 stream << "\n";
00073         }
00074         else
00075                 stream << "\t\tElement <PixelRepresentation> not present\n";
00076 
00077         if (PixelData) {
00078                 stream << "\t\t";
00079                 PixelData->write(stream,dict);
00080                 stream << "\n";
00081         }
00082         else
00083                 stream << "\t\tElement <PixelData> not present\n";
00084 
00085         if (PlanarConfiguration) {
00086                 stream << "\t\t";
00087                 PlanarConfiguration->write(stream,dict);
00088                 stream << "\n";
00089         }
00090         else
00091                 stream << "\t\tElement <PlanarConfiguration> not present\n";
00092 
00093         if (PixelAspectRatio) {
00094                 stream << "\t\t";
00095                 PixelAspectRatio->write(stream,dict);
00096                 stream << "\n";
00097         }
00098         else
00099                 stream << "\t\tElement <PixelAspectRatio> not present\n";
00100 
00101         if (SmallestImagePixelValue) {
00102                 stream << "\t\t";
00103                 SmallestImagePixelValue->write(stream,dict);
00104                 stream << "\n";
00105         }
00106         else
00107                 stream << "\t\tElement <SmallestImagePixelValue> not present\n";
00108 
00109         if (LargestImagePixelValue) {
00110                 stream << "\t\t";
00111                 LargestImagePixelValue->write(stream,dict);
00112                 stream << "\n";
00113         }
00114         else
00115                 stream << "\t\tElement <LargestImagePixelValue> not present\n";
00116 
00117         if (RedPaletteColorLookupTableDescriptor) {
00118                 stream << "\t\t";
00119                 RedPaletteColorLookupTableDescriptor->write(stream,dict);
00120                 stream << "\n";
00121         }
00122         else
00123                 stream << "\t\tElement <RedPaletteColorLookupTableDescriptor> not present\n";
00124 
00125         if (GreenPaletteColorLookupTableDescriptor) {
00126                 stream << "\t\t";
00127                 GreenPaletteColorLookupTableDescriptor->write(stream,dict);
00128                 stream << "\n";
00129         }
00130         else
00131                 stream << "\t\tElement <GreenPaletteColorLookupTableDescriptor> not present\n";
00132 
00133         if (BluePaletteColorLookupTableDescriptor) {
00134                 stream << "\t\t";
00135                 BluePaletteColorLookupTableDescriptor->write(stream,dict);
00136                 stream << "\n";
00137         }
00138         else
00139                 stream << "\t\tElement <BluePaletteColorLookupTableDescriptor> not present\n";
00140 
00141         if (RedPaletteColorLookupTableData) {
00142                 stream << "\t\t";
00143                 RedPaletteColorLookupTableData->write(stream,dict);
00144                 stream << "\n";
00145         }
00146         else
00147                 stream << "\t\tElement <RedPaletteColorLookupTableData> not present\n";
00148 
00149         if (GreenPaletteColorLookupTableData) {
00150                 stream << "\t\t";
00151                 GreenPaletteColorLookupTableData->write(stream,dict);
00152                 stream << "\n";
00153         }
00154         else
00155                 stream << "\t\tElement <GreenPaletteColorLookupTableData> not present\n";
00156 
00157         if (BluePaletteColorLookupTableData) {
00158                 stream << "\t\t";
00159                 BluePaletteColorLookupTableData->write(stream,dict);
00160                 stream << "\n";
00161         }
00162         else
00163                 stream << "\t\tElement <BluePaletteColorLookupTableData> not present\n";
00164 
00165         if (ICCProfile) {
00166                 stream << "\t\t";
00167                 ICCProfile->write(stream,dict);
00168                 stream << "\n";
00169         }
00170         else
00171                 stream << "\t\tElement <ICCProfile> not present\n";
00172 
00173 }
00174 
00175 void
00176 Macro_CodeSequenceMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00177 {
00178         stream << "\tMacro <CodeSequenceMacro>\n";
00179 
00180         if (CodeValue) {
00181                 stream << "\t\t";
00182                 CodeValue->write(stream,dict);
00183                 stream << "\n";
00184         }
00185         else
00186                 stream << "\t\tElement <CodeValue> not present\n";
00187 
00188         if (CodingSchemeDesignator) {
00189                 stream << "\t\t";
00190                 CodingSchemeDesignator->write(stream,dict);
00191                 stream << "\n";
00192         }
00193         else
00194                 stream << "\t\tElement <CodingSchemeDesignator> not present\n";
00195 
00196         if (CodingSchemeVersion) {
00197                 stream << "\t\t";
00198                 CodingSchemeVersion->write(stream,dict);
00199                 stream << "\n";
00200         }
00201         else
00202                 stream << "\t\tElement <CodingSchemeVersion> not present\n";
00203 
00204         if (CodeMeaning) {
00205                 stream << "\t\t";
00206                 CodeMeaning->write(stream,dict);
00207                 stream << "\n";
00208         }
00209         else
00210                 stream << "\t\tElement <CodeMeaning> not present\n";
00211 
00212         if (ContextIdentifier) {
00213                 stream << "\t\t";
00214                 ContextIdentifier->write(stream,dict);
00215                 stream << "\n";
00216         }
00217         else
00218                 stream << "\t\tElement <ContextIdentifier> not present\n";
00219 
00220         if (ContextUID) {
00221                 stream << "\t\t";
00222                 ContextUID->write(stream,dict);
00223                 stream << "\n";
00224         }
00225         else
00226                 stream << "\t\tElement <ContextUID> not present\n";
00227 
00228         if (MappingResource) {
00229                 stream << "\t\t";
00230                 MappingResource->write(stream,dict);
00231                 stream << "\n";
00232         }
00233         else
00234                 stream << "\t\tElement <MappingResource> not present\n";
00235 
00236         if (ContextGroupVersion) {
00237                 stream << "\t\t";
00238                 ContextGroupVersion->write(stream,dict);
00239                 stream << "\n";
00240         }
00241         else
00242                 stream << "\t\tElement <ContextGroupVersion> not present\n";
00243 
00244         if (ContextGroupExtensionFlag) {
00245                 stream << "\t\t";
00246                 ContextGroupExtensionFlag->write(stream,dict);
00247                 stream << "\n";
00248         }
00249         else
00250                 stream << "\t\tElement <ContextGroupExtensionFlag> not present\n";
00251 
00252         if (ContextGroupLocalVersion) {
00253                 stream << "\t\t";
00254                 ContextGroupLocalVersion->write(stream,dict);
00255                 stream << "\n";
00256         }
00257         else
00258                 stream << "\t\tElement <ContextGroupLocalVersion> not present\n";
00259 
00260         if (ContextGroupExtensionCreatorUID) {
00261                 stream << "\t\t";
00262                 ContextGroupExtensionCreatorUID->write(stream,dict);
00263                 stream << "\n";
00264         }
00265         else
00266                 stream << "\t\tElement <ContextGroupExtensionCreatorUID> not present\n";
00267 
00268 }
00269 
00270 void
00271 Macro_CodeSequenceMeaningOptionalMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00272 {
00273         stream << "\tMacro <CodeSequenceMeaningOptionalMacro>\n";
00274 
00275         if (CodeValue) {
00276                 stream << "\t\t";
00277                 CodeValue->write(stream,dict);
00278                 stream << "\n";
00279         }
00280         else
00281                 stream << "\t\tElement <CodeValue> not present\n";
00282 
00283         if (CodingSchemeDesignator) {
00284                 stream << "\t\t";
00285                 CodingSchemeDesignator->write(stream,dict);
00286                 stream << "\n";
00287         }
00288         else
00289                 stream << "\t\tElement <CodingSchemeDesignator> not present\n";
00290 
00291         if (CodingSchemeVersion) {
00292                 stream << "\t\t";
00293                 CodingSchemeVersion->write(stream,dict);
00294                 stream << "\n";
00295         }
00296         else
00297                 stream << "\t\tElement <CodingSchemeVersion> not present\n";
00298 
00299         if (CodeMeaning) {
00300                 stream << "\t\t";
00301                 CodeMeaning->write(stream,dict);
00302                 stream << "\n";
00303         }
00304         else
00305                 stream << "\t\tElement <CodeMeaning> not present\n";
00306 
00307         if (ContextIdentifier) {
00308                 stream << "\t\t";
00309                 ContextIdentifier->write(stream,dict);
00310                 stream << "\n";
00311         }
00312         else
00313                 stream << "\t\tElement <ContextIdentifier> not present\n";
00314 
00315         if (ContextUID) {
00316                 stream << "\t\t";
00317                 ContextUID->write(stream,dict);
00318                 stream << "\n";
00319         }
00320         else
00321                 stream << "\t\tElement <ContextUID> not present\n";
00322 
00323         if (MappingResource) {
00324                 stream << "\t\t";
00325                 MappingResource->write(stream,dict);
00326                 stream << "\n";
00327         }
00328         else
00329                 stream << "\t\tElement <MappingResource> not present\n";
00330 
00331         if (ContextGroupVersion) {
00332                 stream << "\t\t";
00333                 ContextGroupVersion->write(stream,dict);
00334                 stream << "\n";
00335         }
00336         else
00337                 stream << "\t\tElement <ContextGroupVersion> not present\n";
00338 
00339         if (ContextGroupExtensionFlag) {
00340                 stream << "\t\t";
00341                 ContextGroupExtensionFlag->write(stream,dict);
00342                 stream << "\n";
00343         }
00344         else
00345                 stream << "\t\tElement <ContextGroupExtensionFlag> not present\n";
00346 
00347         if (ContextGroupLocalVersion) {
00348                 stream << "\t\t";
00349                 ContextGroupLocalVersion->write(stream,dict);
00350                 stream << "\n";
00351         }
00352         else
00353                 stream << "\t\tElement <ContextGroupLocalVersion> not present\n";
00354 
00355         if (ContextGroupExtensionCreatorUID) {
00356                 stream << "\t\t";
00357                 ContextGroupExtensionCreatorUID->write(stream,dict);
00358                 stream << "\n";
00359         }
00360         else
00361                 stream << "\t\tElement <ContextGroupExtensionCreatorUID> not present\n";
00362 
00363 }
00364 
00365 void
00366 Macro_CodeSequence99SDMMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00367 {
00368         stream << "\tMacro <CodeSequence99SDMMacro>\n";
00369 
00370         if (CodeValue) {
00371                 stream << "\t\t";
00372                 CodeValue->write(stream,dict);
00373                 stream << "\n";
00374         }
00375         else
00376                 stream << "\t\tElement <CodeValue> not present\n";
00377 
00378         if (CodingSchemeDesignator) {
00379                 stream << "\t\t";
00380                 CodingSchemeDesignator->write(stream,dict);
00381                 stream << "\n";
00382         }
00383         else
00384                 stream << "\t\tElement <CodingSchemeDesignator> not present\n";
00385 
00386         if (CodingSchemeVersion) {
00387                 stream << "\t\t";
00388                 CodingSchemeVersion->write(stream,dict);
00389                 stream << "\n";
00390         }
00391         else
00392                 stream << "\t\tElement <CodingSchemeVersion> not present\n";
00393 
00394         if (CodeMeaning) {
00395                 stream << "\t\t";
00396                 CodeMeaning->write(stream,dict);
00397                 stream << "\n";
00398         }
00399         else
00400                 stream << "\t\tElement <CodeMeaning> not present\n";
00401 
00402         if (ContextIdentifier) {
00403                 stream << "\t\t";
00404                 ContextIdentifier->write(stream,dict);
00405                 stream << "\n";
00406         }
00407         else
00408                 stream << "\t\tElement <ContextIdentifier> not present\n";
00409 
00410         if (ContextUID) {
00411                 stream << "\t\t";
00412                 ContextUID->write(stream,dict);
00413                 stream << "\n";
00414         }
00415         else
00416                 stream << "\t\tElement <ContextUID> not present\n";
00417 
00418         if (MappingResource) {
00419                 stream << "\t\t";
00420                 MappingResource->write(stream,dict);
00421                 stream << "\n";
00422         }
00423         else
00424                 stream << "\t\tElement <MappingResource> not present\n";
00425 
00426         if (ContextGroupVersion) {
00427                 stream << "\t\t";
00428                 ContextGroupVersion->write(stream,dict);
00429                 stream << "\n";
00430         }
00431         else
00432                 stream << "\t\tElement <ContextGroupVersion> not present\n";
00433 
00434         if (ContextGroupExtensionFlag) {
00435                 stream << "\t\t";
00436                 ContextGroupExtensionFlag->write(stream,dict);
00437                 stream << "\n";
00438         }
00439         else
00440                 stream << "\t\tElement <ContextGroupExtensionFlag> not present\n";
00441 
00442         if (ContextGroupLocalVersion) {
00443                 stream << "\t\t";
00444                 ContextGroupLocalVersion->write(stream,dict);
00445                 stream << "\n";
00446         }
00447         else
00448                 stream << "\t\tElement <ContextGroupLocalVersion> not present\n";
00449 
00450         if (ContextGroupExtensionCreatorUID) {
00451                 stream << "\t\t";
00452                 ContextGroupExtensionCreatorUID->write(stream,dict);
00453                 stream << "\n";
00454         }
00455         else
00456                 stream << "\t\tElement <ContextGroupExtensionCreatorUID> not present\n";
00457 
00458 }
00459 
00460 void
00461 Macro_PersonIdentificationMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00462 {
00463         stream << "\tMacro <PersonIdentificationMacro>\n";
00464 
00465         if (PersonIdentificationCodeSequence)
00466                 stream << "\t\tSequence <PersonIdentificationCodeSequence>\n";
00467         else
00468                 stream << "\t\tSequence <PersonIdentificationCodeSequence> not present\n";
00469         if (PersonIdentificationCodeSequence && strcmp(PersonIdentificationCodeSequence->getVR(),"SQ") == 0) {
00470                 AttributeList **array;
00471                 int n;
00472                 if ((n=PersonIdentificationCodeSequence->getLists(&array)) > 0) {
00473                         int i; for (i=0; i<n; ++i) {
00474                                 AttributeList *list=array[i];
00475                                         stream << "\t\tItem" << endl;
00476                                                         stream << "\t\t";
00477         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00478                                                         stream << "\t\t";
00479         stream << "\tEndMacro <CodeSequenceMacro>\n";
00480 
00481                         }
00482                 }
00483         }
00484         if (PersonAddress) {
00485                 stream << "\t\t";
00486                 PersonAddress->write(stream,dict);
00487                 stream << "\n";
00488         }
00489         else
00490                 stream << "\t\tElement <PersonAddress> not present\n";
00491 
00492         if (PersonTelephoneNumbers) {
00493                 stream << "\t\t";
00494                 PersonTelephoneNumbers->write(stream,dict);
00495                 stream << "\n";
00496         }
00497         else
00498                 stream << "\t\tElement <PersonTelephoneNumbers> not present\n";
00499 
00500         if (InstitutionName) {
00501                 stream << "\t\t";
00502                 InstitutionName->write(stream,dict);
00503                 stream << "\n";
00504         }
00505         else
00506                 stream << "\t\tElement <InstitutionName> not present\n";
00507 
00508         if (InstitutionAddress) {
00509                 stream << "\t\t";
00510                 InstitutionAddress->write(stream,dict);
00511                 stream << "\n";
00512         }
00513         else
00514                 stream << "\t\tElement <InstitutionAddress> not present\n";
00515 
00516         if (InstitutionCodeSequence)
00517                 stream << "\t\tSequence <InstitutionCodeSequence>\n";
00518         else
00519                 stream << "\t\tSequence <InstitutionCodeSequence> not present\n";
00520         if (InstitutionCodeSequence && strcmp(InstitutionCodeSequence->getVR(),"SQ") == 0) {
00521                 AttributeList **array;
00522                 int n;
00523                 if ((n=InstitutionCodeSequence->getLists(&array)) > 0) {
00524                         int i; for (i=0; i<n; ++i) {
00525                                 AttributeList *list=array[i];
00526                                         stream << "\t\tItem" << endl;
00527                                                         stream << "\t\t";
00528         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00529                                                         stream << "\t\t";
00530         stream << "\tEndMacro <CodeSequenceMacro>\n";
00531 
00532                         }
00533                 }
00534         }
00535 }
00536 
00537 void
00538 Macro_ContentItemMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00539 {
00540         stream << "\tMacro <ContentItemMacro>\n";
00541 
00542         if (ValueType) {
00543                 stream << "\t\t";
00544                 ValueType->write(stream,dict);
00545                 stream << "\n";
00546         }
00547         else
00548                 stream << "\t\tElement <ValueType> not present\n";
00549 
00550         if (ConceptNameCodeSequence)
00551                 stream << "\t\tSequence <ConceptNameCodeSequence>\n";
00552         else
00553                 stream << "\t\tSequence <ConceptNameCodeSequence> not present\n";
00554         if (ConceptNameCodeSequence && strcmp(ConceptNameCodeSequence->getVR(),"SQ") == 0) {
00555                 AttributeList **array;
00556                 int n;
00557                 if ((n=ConceptNameCodeSequence->getLists(&array)) > 0) {
00558                         int i; for (i=0; i<n; ++i) {
00559                                 AttributeList *list=array[i];
00560                                         stream << "\t\tItem" << endl;
00561                                                         stream << "\t\t";
00562         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00563                                                         stream << "\t\t";
00564         stream << "\tEndMacro <CodeSequenceMacro>\n";
00565 
00566                         }
00567                 }
00568         }
00569         if (DateTime) {
00570                 stream << "\t\t";
00571                 DateTime->write(stream,dict);
00572                 stream << "\n";
00573         }
00574         else
00575                 stream << "\t\tElement <DateTime> not present\n";
00576 
00577         if (Date) {
00578                 stream << "\t\t";
00579                 Date->write(stream,dict);
00580                 stream << "\n";
00581         }
00582         else
00583                 stream << "\t\tElement <Date> not present\n";
00584 
00585         if (Time) {
00586                 stream << "\t\t";
00587                 Time->write(stream,dict);
00588                 stream << "\n";
00589         }
00590         else
00591                 stream << "\t\tElement <Time> not present\n";
00592 
00593         if (PersonName) {
00594                 stream << "\t\t";
00595                 PersonName->write(stream,dict);
00596                 stream << "\n";
00597         }
00598         else
00599                 stream << "\t\tElement <PersonName> not present\n";
00600 
00601         if (UID) {
00602                 stream << "\t\t";
00603                 UID->write(stream,dict);
00604                 stream << "\n";
00605         }
00606         else
00607                 stream << "\t\tElement <UID> not present\n";
00608 
00609         if (TextValue) {
00610                 stream << "\t\t";
00611                 TextValue->write(stream,dict);
00612                 stream << "\n";
00613         }
00614         else
00615                 stream << "\t\tElement <TextValue> not present\n";
00616 
00617         if (ConceptCodeSequence)
00618                 stream << "\t\tSequence <ConceptCodeSequence>\n";
00619         else
00620                 stream << "\t\tSequence <ConceptCodeSequence> not present\n";
00621         if (ConceptCodeSequence && strcmp(ConceptCodeSequence->getVR(),"SQ") == 0) {
00622                 AttributeList **array;
00623                 int n;
00624                 if ((n=ConceptCodeSequence->getLists(&array)) > 0) {
00625                         int i; for (i=0; i<n; ++i) {
00626                                 AttributeList *list=array[i];
00627                                         stream << "\t\tItem" << endl;
00628                                                         stream << "\t\t";
00629         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00630                                                         stream << "\t\t";
00631         stream << "\tEndMacro <CodeSequenceMacro>\n";
00632 
00633                         }
00634                 }
00635         }
00636         if (NumericValue) {
00637                 stream << "\t\t";
00638                 NumericValue->write(stream,dict);
00639                 stream << "\n";
00640         }
00641         else
00642                 stream << "\t\tElement <NumericValue> not present\n";
00643 
00644         if (MeasurementUnitsCodeSequence)
00645                 stream << "\t\tSequence <MeasurementUnitsCodeSequence>\n";
00646         else
00647                 stream << "\t\tSequence <MeasurementUnitsCodeSequence> not present\n";
00648         if (MeasurementUnitsCodeSequence && strcmp(MeasurementUnitsCodeSequence->getVR(),"SQ") == 0) {
00649                 AttributeList **array;
00650                 int n;
00651                 if ((n=MeasurementUnitsCodeSequence->getLists(&array)) > 0) {
00652                         int i; for (i=0; i<n; ++i) {
00653                                 AttributeList *list=array[i];
00654                                         stream << "\t\tItem" << endl;
00655                                                         stream << "\t\t";
00656         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00657                                                         stream << "\t\t";
00658         stream << "\tEndMacro <CodeSequenceMacro>\n";
00659 
00660                         }
00661                 }
00662         }
00663 }
00664 
00665 void
00666 Macro_ImageSOPInstanceReferenceMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00667 {
00668         stream << "\tMacro <ImageSOPInstanceReferenceMacro>\n";
00669 
00670                                 stream << "\t";
00671         Macro_SOPInstanceReferenceMacro(list).write(stream,list,dict);
00672                                 stream << "\t";
00673         stream << "\tEndMacro <SOPInstanceReferenceMacro>\n";
00674 
00675         if (ReferencedFrameNumber) {
00676                 stream << "\t\t";
00677                 ReferencedFrameNumber->write(stream,dict);
00678                 stream << "\n";
00679         }
00680         else
00681                 stream << "\t\tElement <ReferencedFrameNumber> not present\n";
00682 
00683         if (ReferencedSegmentNumber) {
00684                 stream << "\t\t";
00685                 ReferencedSegmentNumber->write(stream,dict);
00686                 stream << "\n";
00687         }
00688         else
00689                 stream << "\t\tElement <ReferencedSegmentNumber> not present\n";
00690 
00691 }
00692 
00693 void
00694 Macro_SeriesAndInstanceReferenceMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00695 {
00696         stream << "\tMacro <SeriesAndInstanceReferenceMacro>\n";
00697 
00698         if (ReferencedSeriesSequence)
00699                 stream << "\t\tSequence <ReferencedSeriesSequence>\n";
00700         else
00701                 stream << "\t\tSequence <ReferencedSeriesSequence> not present\n";
00702         if (ReferencedSeriesSequence && strcmp(ReferencedSeriesSequence->getVR(),"SQ") == 0) {
00703                 AttributeList **array;
00704                 int n;
00705                 if ((n=ReferencedSeriesSequence->getLists(&array)) > 0) {
00706                         int i; for (i=0; i<n; ++i) {
00707                                 AttributeList *list=array[i];
00708                                         stream << "\t\tItem" << endl;
00709                                 Attribute *SeriesInstanceUID = (*list)[TagFromName(SeriesInstanceUID)];
00710                                 stream << "\t";
00711                                 if (SeriesInstanceUID) {
00712                                         stream << "\t\t";
00713                                         SeriesInstanceUID->write(stream,dict);
00714                                         stream << "\n";
00715                                 }
00716                                 else
00717                                         stream << "\t\tElement <SeriesInstanceUID> not present\n";
00718 
00719         Attribute *ReferencedInstanceSequence = (*list)[TagFromName(ReferencedInstanceSequence)];
00720                                 stream << "\t";
00721                                 if (ReferencedInstanceSequence)
00722                                         stream << "\t\tSequence <ReferencedInstanceSequence>\n";
00723                                 else
00724                                         stream << "\t\tSequence <ReferencedInstanceSequence> not present\n";
00725                                 if (ReferencedInstanceSequence && strcmp(ReferencedInstanceSequence->getVR(),"SQ") == 0) {
00726                                         AttributeList **array;
00727                                         int n;
00728                                         if ((n=ReferencedInstanceSequence->getLists(&array)) > 0) {
00729                                                 int i; for (i=0; i<n; ++i) {
00730                                                         AttributeList *list=array[i];
00731                                 stream << "\t";
00732                                                                 stream << "\t\tItem" << endl;
00733                                                                                 stream << "\t\t\t";
00734         Macro_SOPInstanceReferenceMacro(list).write(stream,list,dict);
00735                                                                                 stream << "\t\t\t";
00736         stream << "\tEndMacro <SOPInstanceReferenceMacro>\n";
00737 
00738                                                 }
00739                                         }
00740                                 }
00741                         }
00742                 }
00743         }
00744 }
00745 
00746 void
00747 Macro_PrimaryAnatomicStructureMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00748 {
00749         stream << "\tMacro <PrimaryAnatomicStructureMacro>\n";
00750 
00751         if (PrimaryAnatomicStructureSequence)
00752                 stream << "\t\tSequence <PrimaryAnatomicStructureSequence>\n";
00753         else
00754                 stream << "\t\tSequence <PrimaryAnatomicStructureSequence> not present\n";
00755         if (PrimaryAnatomicStructureSequence && strcmp(PrimaryAnatomicStructureSequence->getVR(),"SQ") == 0) {
00756                 AttributeList **array;
00757                 int n;
00758                 if ((n=PrimaryAnatomicStructureSequence->getLists(&array)) > 0) {
00759                         int i; for (i=0; i<n; ++i) {
00760                                 AttributeList *list=array[i];
00761                                         stream << "\t\tItem" << endl;
00762                                                         stream << "\t\t";
00763         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00764                                                         stream << "\t\t";
00765         stream << "\tEndMacro <CodeSequenceMacro>\n";
00766 
00767         Attribute *PrimaryAnatomicStructureModifierSequence = (*list)[TagFromName(PrimaryAnatomicStructureModifierSequence)];
00768                                 stream << "\t";
00769                                 if (PrimaryAnatomicStructureModifierSequence)
00770                                         stream << "\t\tSequence <PrimaryAnatomicStructureModifierSequence>\n";
00771                                 else
00772                                         stream << "\t\tSequence <PrimaryAnatomicStructureModifierSequence> not present\n";
00773                                 if (PrimaryAnatomicStructureModifierSequence && strcmp(PrimaryAnatomicStructureModifierSequence->getVR(),"SQ") == 0) {
00774                                         AttributeList **array;
00775                                         int n;
00776                                         if ((n=PrimaryAnatomicStructureModifierSequence->getLists(&array)) > 0) {
00777                                                 int i; for (i=0; i<n; ++i) {
00778                                                         AttributeList *list=array[i];
00779                                 stream << "\t";
00780                                                                 stream << "\t\tItem" << endl;
00781                                                                                 stream << "\t\t\t";
00782         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00783                                                                                 stream << "\t\t\t";
00784         stream << "\tEndMacro <CodeSequenceMacro>\n";
00785 
00786                                                 }
00787                                         }
00788                                 }
00789                         }
00790                 }
00791         }
00792 }
00793 
00794 void
00795 Macro_GeneralAnatomyMandatoryMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00796 {
00797         stream << "\tMacro <GeneralAnatomyMandatoryMacro>\n";
00798 
00799         if (AnatomicRegionSequence)
00800                 stream << "\t\tSequence <AnatomicRegionSequence>\n";
00801         else
00802                 stream << "\t\tSequence <AnatomicRegionSequence> not present\n";
00803         if (AnatomicRegionSequence && strcmp(AnatomicRegionSequence->getVR(),"SQ") == 0) {
00804                 AttributeList **array;
00805                 int n;
00806                 if ((n=AnatomicRegionSequence->getLists(&array)) > 0) {
00807                         int i; for (i=0; i<n; ++i) {
00808                                 AttributeList *list=array[i];
00809                                         stream << "\t\tItem" << endl;
00810                                                         stream << "\t\t";
00811         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00812                                                         stream << "\t\t";
00813         stream << "\tEndMacro <CodeSequenceMacro>\n";
00814 
00815         Attribute *AnatomicRegionModifierSequence = (*list)[TagFromName(AnatomicRegionModifierSequence)];
00816                                 stream << "\t";
00817                                 if (AnatomicRegionModifierSequence)
00818                                         stream << "\t\tSequence <AnatomicRegionModifierSequence>\n";
00819                                 else
00820                                         stream << "\t\tSequence <AnatomicRegionModifierSequence> not present\n";
00821                                 if (AnatomicRegionModifierSequence && strcmp(AnatomicRegionModifierSequence->getVR(),"SQ") == 0) {
00822                                         AttributeList **array;
00823                                         int n;
00824                                         if ((n=AnatomicRegionModifierSequence->getLists(&array)) > 0) {
00825                                                 int i; for (i=0; i<n; ++i) {
00826                                                         AttributeList *list=array[i];
00827                                 stream << "\t";
00828                                                                 stream << "\t\tItem" << endl;
00829                                                                                 stream << "\t\t\t";
00830         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00831                                                                                 stream << "\t\t\t";
00832         stream << "\tEndMacro <CodeSequenceMacro>\n";
00833 
00834                                                 }
00835                                         }
00836                                 }
00837                         }
00838                 }
00839         }
00840                                 stream << "\t";
00841         Macro_PrimaryAnatomicStructureMacro(list).write(stream,list,dict);
00842                                 stream << "\t";
00843         stream << "\tEndMacro <PrimaryAnatomicStructureMacro>\n";
00844 
00845         if (AnatomicRegionModifierSequence)
00846                 stream << "\t\tSequence <AnatomicRegionModifierSequence>\n";
00847         else
00848                 stream << "\t\tSequence <AnatomicRegionModifierSequence> not present\n";
00849         if (AnatomicRegionModifierSequence && strcmp(AnatomicRegionModifierSequence->getVR(),"SQ") == 0) {
00850                 AttributeList **array;
00851                 int n;
00852                 if ((n=AnatomicRegionModifierSequence->getLists(&array)) > 0) {
00853                         int i; for (i=0; i<n; ++i) {
00854                                 AttributeList *list=array[i];
00855                                         stream << "\t\tItem" << endl;
00856                         }
00857                 }
00858         }
00859         if (PrimaryAnatomicStructureModifierSequence)
00860                 stream << "\t\tSequence <PrimaryAnatomicStructureModifierSequence>\n";
00861         else
00862                 stream << "\t\tSequence <PrimaryAnatomicStructureModifierSequence> not present\n";
00863         if (PrimaryAnatomicStructureModifierSequence && strcmp(PrimaryAnatomicStructureModifierSequence->getVR(),"SQ") == 0) {
00864                 AttributeList **array;
00865                 int n;
00866                 if ((n=PrimaryAnatomicStructureModifierSequence->getLists(&array)) > 0) {
00867                         int i; for (i=0; i<n; ++i) {
00868                                 AttributeList *list=array[i];
00869                                         stream << "\t\tItem" << endl;
00870                         }
00871                 }
00872         }
00873 }
00874 
00875 void
00876 Macro_GeneralAnatomyRequiredMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00877 {
00878         stream << "\tMacro <GeneralAnatomyRequiredMacro>\n";
00879 
00880         if (AnatomicRegionSequence)
00881                 stream << "\t\tSequence <AnatomicRegionSequence>\n";
00882         else
00883                 stream << "\t\tSequence <AnatomicRegionSequence> not present\n";
00884         if (AnatomicRegionSequence && strcmp(AnatomicRegionSequence->getVR(),"SQ") == 0) {
00885                 AttributeList **array;
00886                 int n;
00887                 if ((n=AnatomicRegionSequence->getLists(&array)) > 0) {
00888                         int i; for (i=0; i<n; ++i) {
00889                                 AttributeList *list=array[i];
00890                                         stream << "\t\tItem" << endl;
00891                                                         stream << "\t\t";
00892         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00893                                                         stream << "\t\t";
00894         stream << "\tEndMacro <CodeSequenceMacro>\n";
00895 
00896         Attribute *AnatomicRegionModifierSequence = (*list)[TagFromName(AnatomicRegionModifierSequence)];
00897                                 stream << "\t";
00898                                 if (AnatomicRegionModifierSequence)
00899                                         stream << "\t\tSequence <AnatomicRegionModifierSequence>\n";
00900                                 else
00901                                         stream << "\t\tSequence <AnatomicRegionModifierSequence> not present\n";
00902                                 if (AnatomicRegionModifierSequence && strcmp(AnatomicRegionModifierSequence->getVR(),"SQ") == 0) {
00903                                         AttributeList **array;
00904                                         int n;
00905                                         if ((n=AnatomicRegionModifierSequence->getLists(&array)) > 0) {
00906                                                 int i; for (i=0; i<n; ++i) {
00907                                                         AttributeList *list=array[i];
00908                                 stream << "\t";
00909                                                                 stream << "\t\tItem" << endl;
00910                                                                                 stream << "\t\t\t";
00911         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00912                                                                                 stream << "\t\t\t";
00913         stream << "\tEndMacro <CodeSequenceMacro>\n";
00914 
00915                                                 }
00916                                         }
00917                                 }
00918                         }
00919                 }
00920         }
00921                                 stream << "\t";
00922         Macro_PrimaryAnatomicStructureMacro(list).write(stream,list,dict);
00923                                 stream << "\t";
00924         stream << "\tEndMacro <PrimaryAnatomicStructureMacro>\n";
00925 
00926         if (AnatomicRegionModifierSequence)
00927                 stream << "\t\tSequence <AnatomicRegionModifierSequence>\n";
00928         else
00929                 stream << "\t\tSequence <AnatomicRegionModifierSequence> not present\n";
00930         if (AnatomicRegionModifierSequence && strcmp(AnatomicRegionModifierSequence->getVR(),"SQ") == 0) {
00931                 AttributeList **array;
00932                 int n;
00933                 if ((n=AnatomicRegionModifierSequence->getLists(&array)) > 0) {
00934                         int i; for (i=0; i<n; ++i) {
00935                                 AttributeList *list=array[i];
00936                                         stream << "\t\tItem" << endl;
00937                         }
00938                 }
00939         }
00940         if (PrimaryAnatomicStructureModifierSequence)
00941                 stream << "\t\tSequence <PrimaryAnatomicStructureModifierSequence>\n";
00942         else
00943                 stream << "\t\tSequence <PrimaryAnatomicStructureModifierSequence> not present\n";
00944         if (PrimaryAnatomicStructureModifierSequence && strcmp(PrimaryAnatomicStructureModifierSequence->getVR(),"SQ") == 0) {
00945                 AttributeList **array;
00946                 int n;
00947                 if ((n=PrimaryAnatomicStructureModifierSequence->getLists(&array)) > 0) {
00948                         int i; for (i=0; i<n; ++i) {
00949                                 AttributeList *list=array[i];
00950                                         stream << "\t\tItem" << endl;
00951                         }
00952                 }
00953         }
00954 }
00955 
00956 void
00957 Macro_GeneralAnatomyOptionalMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
00958 {
00959         stream << "\tMacro <GeneralAnatomyOptionalMacro>\n";
00960 
00961         if (AnatomicRegionSequence)
00962                 stream << "\t\tSequence <AnatomicRegionSequence>\n";
00963         else
00964                 stream << "\t\tSequence <AnatomicRegionSequence> not present\n";
00965         if (AnatomicRegionSequence && strcmp(AnatomicRegionSequence->getVR(),"SQ") == 0) {
00966                 AttributeList **array;
00967                 int n;
00968                 if ((n=AnatomicRegionSequence->getLists(&array)) > 0) {
00969                         int i; for (i=0; i<n; ++i) {
00970                                 AttributeList *list=array[i];
00971                                         stream << "\t\tItem" << endl;
00972                                                         stream << "\t\t";
00973         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00974                                                         stream << "\t\t";
00975         stream << "\tEndMacro <CodeSequenceMacro>\n";
00976 
00977         Attribute *AnatomicRegionModifierSequence = (*list)[TagFromName(AnatomicRegionModifierSequence)];
00978                                 stream << "\t";
00979                                 if (AnatomicRegionModifierSequence)
00980                                         stream << "\t\tSequence <AnatomicRegionModifierSequence>\n";
00981                                 else
00982                                         stream << "\t\tSequence <AnatomicRegionModifierSequence> not present\n";
00983                                 if (AnatomicRegionModifierSequence && strcmp(AnatomicRegionModifierSequence->getVR(),"SQ") == 0) {
00984                                         AttributeList **array;
00985                                         int n;
00986                                         if ((n=AnatomicRegionModifierSequence->getLists(&array)) > 0) {
00987                                                 int i; for (i=0; i<n; ++i) {
00988                                                         AttributeList *list=array[i];
00989                                 stream << "\t";
00990                                                                 stream << "\t\tItem" << endl;
00991                                                                                 stream << "\t\t\t";
00992         Macro_CodeSequenceMacro(list).write(stream,list,dict);
00993                                                                                 stream << "\t\t\t";
00994         stream << "\tEndMacro <CodeSequenceMacro>\n";
00995 
00996                                                 }
00997                                         }
00998                                 }
00999                         }
01000                 }
01001         }
01002                                 stream << "\t";
01003         Macro_PrimaryAnatomicStructureMacro(list).write(stream,list,dict);
01004                                 stream << "\t";
01005         stream << "\tEndMacro <PrimaryAnatomicStructureMacro>\n";
01006 
01007         if (AnatomicRegionModifierSequence)
01008                 stream << "\t\tSequence <AnatomicRegionModifierSequence>\n";
01009         else
01010                 stream << "\t\tSequence <AnatomicRegionModifierSequence> not present\n";
01011         if (AnatomicRegionModifierSequence && strcmp(AnatomicRegionModifierSequence->getVR(),"SQ") == 0) {
01012                 AttributeList **array;
01013                 int n;
01014                 if ((n=AnatomicRegionModifierSequence->getLists(&array)) > 0) {
01015                         int i; for (i=0; i<n; ++i) {
01016                                 AttributeList *list=array[i];
01017                                         stream << "\t\tItem" << endl;
01018                         }
01019                 }
01020         }
01021         if (PrimaryAnatomicStructureModifierSequence)
01022                 stream << "\t\tSequence <PrimaryAnatomicStructureModifierSequence>\n";
01023         else
01024                 stream << "\t\tSequence <PrimaryAnatomicStructureModifierSequence> not present\n";
01025         if (PrimaryAnatomicStructureModifierSequence && strcmp(PrimaryAnatomicStructureModifierSequence->getVR(),"SQ") == 0) {
01026                 AttributeList **array;
01027                 int n;
01028                 if ((n=PrimaryAnatomicStructureModifierSequence->getLists(&array)) > 0) {
01029                         int i; for (i=0; i<n; ++i) {
01030                                 AttributeList *list=array[i];
01031                                         stream << "\t\tItem" << endl;
01032                         }
01033                 }
01034         }
01035 }
01036 
01037 void
01038 Macro_RequestAttributesMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
01039 {
01040         stream << "\tMacro <RequestAttributesMacro>\n";
01041 
01042         if (RequestedProcedureID) {
01043                 stream << "\t\t";
01044                 RequestedProcedureID->write(stream,dict);
01045                 stream << "\n";
01046         }
01047         else
01048                 stream << "\t\tElement <RequestedProcedureID> not present\n";
01049 
01050         if (AccessionNumber) {
01051                 stream << "\t\t";
01052                 AccessionNumber->write(stream,dict);
01053                 stream << "\n";
01054         }
01055         else
01056                 stream << "\t\tElement <AccessionNumber> not present\n";
01057 
01058         if (IssuerOfAccessionNumberSequence)
01059                 stream << "\t\tSequence <IssuerOfAccessionNumberSequence>\n";
01060         else
01061                 stream << "\t\tSequence <IssuerOfAccessionNumberSequence> not present\n";
01062         if (IssuerOfAccessionNumberSequence && strcmp(IssuerOfAccessionNumberSequence->getVR(),"SQ") == 0) {
01063                 AttributeList **array;
01064                 int n;
01065                 if ((n=IssuerOfAccessionNumberSequence->getLists(&array)) > 0) {
01066                         int i; for (i=0; i<n; ++i) {
01067                                 AttributeList *list=array[i];
01068                                         stream << "\t\tItem" << endl;
01069                                                         stream << "\t\t";
01070         Macro_HL7v2HierarchicDesignatorMacro(list).write(stream,list,dict);
01071                                                         stream << "\t\t";
01072         stream << "\tEndMacro <HL7v2HierarchicDesignatorMacro>\n";
01073 
01074                         }
01075                 }
01076         }
01077         if (StudyInstanceUID) {
01078                 stream << "\t\t";
01079                 StudyInstanceUID->write(stream,dict);
01080                 stream << "\n";
01081         }
01082         else
01083                 stream << "\t\tElement <StudyInstanceUID> not present\n";
01084 
01085         if (ReferencedStudySequence)
01086                 stream << "\t\tSequence <ReferencedStudySequence>\n";
01087         else
01088                 stream << "\t\tSequence <ReferencedStudySequence> not present\n";
01089         if (ReferencedStudySequence && strcmp(ReferencedStudySequence->getVR(),"SQ") == 0) {
01090                 AttributeList **array;
01091                 int n;
01092                 if ((n=ReferencedStudySequence->getLists(&array)) > 0) {
01093                         int i; for (i=0; i<n; ++i) {
01094                                 AttributeList *list=array[i];
01095                                         stream << "\t\tItem" << endl;
01096                                                         stream << "\t\t";
01097         Macro_SOPInstanceReferenceMacro(list).write(stream,list,dict);
01098                                                         stream << "\t\t";
01099         stream << "\tEndMacro <SOPInstanceReferenceMacro>\n";
01100 
01101                         }
01102                 }
01103         }
01104         if (RequestedProcedureDescription) {
01105                 stream << "\t\t";
01106                 RequestedProcedureDescription->write(stream,dict);
01107                 stream << "\n";
01108         }
01109         else
01110                 stream << "\t\tElement <RequestedProcedureDescription> not present\n";
01111 
01112         if (RequestedProcedureCodeSequence)
01113                 stream << "\t\tSequence <RequestedProcedureCodeSequence>\n";
01114         else
01115                 stream << "\t\tSequence <RequestedProcedureCodeSequence> not present\n";
01116         if (RequestedProcedureCodeSequence && strcmp(RequestedProcedureCodeSequence->getVR(),"SQ") == 0) {
01117                 AttributeList **array;
01118                 int n;
01119                 if ((n=RequestedProcedureCodeSequence->getLists(&array)) > 0) {
01120                         int i; for (i=0; i<n; ++i) {
01121                                 AttributeList *list=array[i];
01122                                         stream << "\t\tItem" << endl;
01123                                                         stream << "\t\t";
01124         Macro_CodeSequenceMacro(list).write(stream,list,dict);
01125                                                         stream << "\t\t";
01126         stream << "\tEndMacro <CodeSequenceMacro>\n";
01127 
01128                         }
01129                 }
01130         }
01131         if (ReasonForRequestedProcedure) {
01132                 stream << "\t\t";
01133                 ReasonForRequestedProcedure->write(stream,dict);
01134                 stream << "\n";
01135         }
01136         else
01137                 stream << "\t\tElement <ReasonForRequestedProcedure> not present\n";
01138 
01139         if (ReasonForRequestedProcedureCodeSequence)
01140                 stream << "\t\tSequence <ReasonForRequestedProcedureCodeSequence>\n";
01141         else
01142                 stream << "\t\tSequence <ReasonForRequestedProcedureCodeSequence> not present\n";
01143         if (ReasonForRequestedProcedureCodeSequence && strcmp(ReasonForRequestedProcedureCodeSequence->getVR(),"SQ") == 0) {
01144                 AttributeList **array;
01145                 int n;
01146                 if ((n=ReasonForRequestedProcedureCodeSequence->getLists(&array)) > 0) {
01147                         int i; for (i=0; i<n; ++i) {
01148                                 AttributeList *list=array[i];
01149                                         stream << "\t\tItem" << endl;
01150                                                         stream << "\t\t";
01151         Macro_CodeSequenceMacro(list).write(stream,list,dict);
01152                                                         stream << "\t\t";
01153         stream << "\tEndMacro <CodeSequenceMacro>\n";
01154 
01155                         }
01156                 }
01157         }
01158         if (ScheduledProcedureStepID) {
01159                 stream << "\t\t";
01160                 ScheduledProcedureStepID->write(stream,dict);
01161                 stream << "\n";
01162         }
01163         else
01164                 stream << "\t\tElement <ScheduledProcedureStepID> not present\n";
01165 
01166         if (ScheduledProcedureStepDescription) {
01167                 stream << "\t\t";
01168                 ScheduledProcedureStepDescription->write(stream,dict);
01169                 stream << "\n";
01170         }
01171         else
01172                 stream << "\t\tElement <ScheduledProcedureStepDescription> not present\n";
01173 
01174         if (ScheduledProtocolCodeSequence)
01175                 stream << "\t\tSequence <ScheduledProtocolCodeSequence>\n";
01176         else
01177                 stream << "\t\tSequence <ScheduledProtocolCodeSequence> not present\n";
01178         if (ScheduledProtocolCodeSequence && strcmp(ScheduledProtocolCodeSequence->getVR(),"SQ") == 0) {
01179                 AttributeList **array;
01180                 int n;
01181                 if ((n=ScheduledProtocolCodeSequence->getLists(&array)) > 0) {
01182                         int i; for (i=0; i<n; ++i) {
01183                                 AttributeList *list=array[i];
01184                                         stream << "\t\tItem" << endl;
01185                                                         stream << "\t\t";
01186         Macro_CodeSequenceMacro(list).write(stream,list,dict);
01187                                                         stream << "\t\t";
01188         stream << "\tEndMacro <CodeSequenceMacro>\n";
01189 
01190         Attribute *ProtocolContextSequence = (*list)[TagFromName(ProtocolContextSequence)];
01191                                 stream << "\t";
01192                                 if (ProtocolContextSequence)
01193                                         stream << "\t\tSequence <ProtocolContextSequence>\n";
01194                                 else
01195                                         stream << "\t\tSequence <ProtocolContextSequence> not present\n";
01196                                 if (ProtocolContextSequence && strcmp(ProtocolContextSequence->getVR(),"SQ") == 0) {
01197                                         AttributeList **array;
01198                                         int n;
01199                                         if ((n=ProtocolContextSequence->getLists(&array)) > 0) {
01200                                                 int i; for (i=0; i<n; ++i) {
01201                                                         AttributeList *list=array[i];
01202                                 stream << "\t";
01203                                                                 stream << "\t\tItem" << endl;
01204                                                                                 stream << "\t\t\t";
01205         Macro_ContentItemMacro(list).write(stream,list,dict);
01206                                                                                 stream << "\t\t\t";
01207         stream << "\tEndMacro <ContentItemMacro>\n";
01208 
01209         Attribute *ContentItemModifierSequence = (*list)[TagFromName(ContentItemModifierSequence)];
01210                                                         stream << "\t\t";
01211                                                         if (ContentItemModifierSequence)
01212                                                                 stream << "\t\tSequence <ContentItemModifierSequence>\n";
01213                                                         else
01214                                                                 stream << "\t\tSequence <ContentItemModifierSequence> not present\n";
01215                                                         if (ContentItemModifierSequence && strcmp(ContentItemModifierSequence->getVR(),"SQ") == 0) {
01216                                                                 AttributeList **array;
01217                                                                 int n;
01218                                                                 if ((n=ContentItemModifierSequence->getLists(&array)) > 0) {
01219                                                                         int i; for (i=0; i<n; ++i) {
01220                                                                                 AttributeList *list=array[i];
01221                                                         stream << "\t\t";
01222                                                                                         stream << "\t\tItem" << endl;
01223                                                                                                         stream << "\t\t\t\t";
01224         Macro_ContentItemMacro(list).write(stream,list,dict);
01225                                                                                                         stream << "\t\t\t\t";
01226         stream << "\tEndMacro <ContentItemMacro>\n";
01227 
01228                                                                         }
01229                                                                 }
01230                                                         }
01231                                                 }
01232                                         }
01233                                 }
01234                         }
01235                 }
01236         }
01237 }
01238 
01239 void
01240 Macro_BasicPixelSpacingCalibrationMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
01241 {
01242         stream << "\tMacro <BasicPixelSpacingCalibrationMacro>\n";
01243 
01244         if (PixelSpacing) {
01245                 stream << "\t\t";
01246                 PixelSpacing->write(stream,dict);
01247                 stream << "\n";
01248         }
01249         else
01250                 stream << "\t\tElement <PixelSpacing> not present\n";
01251 
01252         if (PixelSpacingCalibrationType) {
01253                 stream << "\t\t";
01254                 PixelSpacingCalibrationType->write(stream,dict);
01255                 stream << "\n";
01256         }
01257         else
01258                 stream << "\t\tElement <PixelSpacingCalibrationType> not present\n";
01259 
01260         if (PixelSpacingCalibrationDescription) {
01261                 stream << "\t\t";
01262                 PixelSpacingCalibrationDescription->write(stream,dict);
01263                 stream << "\n";
01264         }
01265         else
01266                 stream << "\t\tElement <PixelSpacingCalibrationDescription> not present\n";
01267 
01268 }
01269 
01270 void
01271 Macro_SOPInstanceReferenceMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
01272 {
01273         stream << "\tMacro <SOPInstanceReferenceMacro>\n";
01274 
01275         if (ReferencedSOPClassUID) {
01276                 stream << "\t\t";
01277                 ReferencedSOPClassUID->write(stream,dict);
01278                 stream << "\n";
01279         }
01280         else
01281                 stream << "\t\tElement <ReferencedSOPClassUID> not present\n";
01282 
01283         if (ReferencedSOPInstanceUID) {
01284                 stream << "\t\t";
01285                 ReferencedSOPInstanceUID->write(stream,dict);
01286                 stream << "\n";
01287         }
01288         else
01289                 stream << "\t\tElement <ReferencedSOPInstanceUID> not present\n";
01290 
01291 }
01292 
01293 void
01294 Macro_DisplayShutterMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
01295 {
01296         stream << "\tMacro <DisplayShutterMacro>\n";
01297 
01298         if (ShutterShape) {
01299                 stream << "\t\t";
01300                 ShutterShape->write(stream,dict);
01301                 stream << "\n";
01302         }
01303         else
01304                 stream << "\t\tElement <ShutterShape> not present\n";
01305 
01306         if (ShutterLeftVerticalEdge) {
01307                 stream << "\t\t";
01308                 ShutterLeftVerticalEdge->write(stream,dict);
01309                 stream << "\n";
01310         }
01311         else
01312                 stream << "\t\tElement <ShutterLeftVerticalEdge> not present\n";
01313 
01314         if (ShutterRightVerticalEdge) {
01315                 stream << "\t\t";
01316                 ShutterRightVerticalEdge->write(stream,dict);
01317                 stream << "\n";
01318         }
01319         else
01320                 stream << "\t\tElement <ShutterRightVerticalEdge> not present\n";
01321 
01322         if (ShutterUpperHorizontalEdge) {
01323                 stream << "\t\t";
01324                 ShutterUpperHorizontalEdge->write(stream,dict);
01325                 stream << "\n";
01326         }
01327         else
01328                 stream << "\t\tElement <ShutterUpperHorizontalEdge> not present\n";
01329 
01330         if (ShutterLowerHorizontalEdge) {
01331                 stream << "\t\t";
01332                 ShutterLowerHorizontalEdge->write(stream,dict);
01333                 stream << "\n";
01334         }
01335         else
01336                 stream << "\t\tElement <ShutterLowerHorizontalEdge> not present\n";
01337 
01338         if (CenterOfCircularShutter) {
01339                 stream << "\t\t";
01340                 CenterOfCircularShutter->write(stream,dict);
01341                 stream << "\n";
01342         }
01343         else
01344                 stream << "\t\tElement <CenterOfCircularShutter> not present\n";
01345 
01346         if (RadiusOfCircularShutter) {
01347                 stream << "\t\t";
01348                 RadiusOfCircularShutter->write(stream,dict);
01349                 stream << "\n";
01350         }
01351         else
01352                 stream << "\t\tElement <RadiusOfCircularShutter> not present\n";
01353 
01354         if (VerticesOfPolygonalShutter) {
01355                 stream << "\t\t";
01356                 VerticesOfPolygonalShutter->write(stream,dict);
01357                 stream << "\n";
01358         }
01359         else
01360                 stream << "\t\tElement <VerticesOfPolygonalShutter> not present\n";
01361 
01362         if (ShutterPresentationValue) {
01363                 stream << "\t\t";
01364                 ShutterPresentationValue->write(stream,dict);
01365                 stream << "\n";
01366         }
01367         else
01368                 stream << "\t\tElement <ShutterPresentationValue> not present\n";
01369 
01370         if (ShutterPresentationColorCIELabValue) {
01371                 stream << "\t\t";
01372                 ShutterPresentationColorCIELabValue->write(stream,dict);
01373                 stream << "\n";
01374         }
01375         else
01376                 stream << "\t\tElement <ShutterPresentationColorCIELabValue> not present\n";
01377 
01378 }
01379 
01380 void
01381 Macro_ContentIdentificationMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
01382 {
01383         stream << "\tMacro <ContentIdentificationMacro>\n";
01384 
01385         if (InstanceNumber) {
01386                 stream << "\t\t";
01387                 InstanceNumber->write(stream,dict);
01388                 stream << "\n";
01389         }
01390         else
01391                 stream << "\t\tElement <InstanceNumber> not present\n";
01392 
01393         if (ContentLabel) {
01394                 stream << "\t\t";
01395                 ContentLabel->write(stream,dict);
01396                 stream << "\n";
01397         }
01398         else
01399                 stream << "\t\tElement <ContentLabel> not present\n";
01400 
01401         if (ContentDescription) {
01402                 stream << "\t\t";
01403                 ContentDescription->write(stream,dict);
01404                 stream << "\n";
01405         }
01406         else
01407                 stream << "\t\tElement <ContentDescription> not present\n";
01408 
01409         if (ContentCreatorsName) {
01410                 stream << "\t\t";
01411                 ContentCreatorsName->write(stream,dict);
01412                 stream << "\n";
01413         }
01414         else
01415                 stream << "\t\tElement <ContentCreatorsName> not present\n";
01416 
01417         if (ContentCreatorsIdentificationCodeSequence)
01418                 stream << "\t\tSequence <ContentCreatorsIdentificationCodeSequence>\n";
01419         else
01420                 stream << "\t\tSequence <ContentCreatorsIdentificationCodeSequence> not present\n";
01421         if (ContentCreatorsIdentificationCodeSequence && strcmp(ContentCreatorsIdentificationCodeSequence->getVR(),"SQ") == 0) {
01422                 AttributeList **array;
01423                 int n;
01424                 if ((n=ContentCreatorsIdentificationCodeSequence->getLists(&array)) > 0) {
01425                         int i; for (i=0; i<n; ++i) {
01426                                 AttributeList *list=array[i];
01427                                         stream << "\t\tItem" << endl;
01428                                                         stream << "\t\t";
01429         Macro_PersonIdentificationMacro(list).write(stream,list,dict);
01430                                                         stream << "\t\t";
01431         stream << "\tEndMacro <PersonIdentificationMacro>\n";
01432 
01433                         }
01434                 }
01435         }
01436 }
01437 
01438 void
01439 Macro_HL7v2HierarchicDesignatorMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
01440 {
01441         stream << "\tMacro <HL7v2HierarchicDesignatorMacro>\n";
01442 
01443         if (LocalNamespaceEntityID) {
01444                 stream << "\t\t";
01445                 LocalNamespaceEntityID->write(stream,dict);
01446                 stream << "\n";
01447         }
01448         else
01449                 stream << "\t\tElement <LocalNamespaceEntityID> not present\n";
01450 
01451         if (UniversalEntityID) {
01452                 stream << "\t\t";
01453                 UniversalEntityID->write(stream,dict);
01454                 stream << "\n";
01455         }
01456         else
01457                 stream << "\t\tElement <UniversalEntityID> not present\n";
01458 
01459         if (UniversalEntityIDType) {
01460                 stream << "\t\t";
01461                 UniversalEntityIDType->write(stream,dict);
01462                 stream << "\n";
01463         }
01464         else
01465                 stream << "\t\tElement <UniversalEntityIDType> not present\n";
01466 
01467 }
01468 
01469 void
01470 Macro_IssuerOfPatientIDMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
01471 {
01472         stream << "\tMacro <IssuerOfPatientIDMacro>\n";
01473 
01474         if (IssuerOfPatientID) {
01475                 stream << "\t\t";
01476                 IssuerOfPatientID->write(stream,dict);
01477                 stream << "\n";
01478         }
01479         else
01480                 stream << "\t\tElement <IssuerOfPatientID> not present\n";
01481 
01482         if (IssuerOfPatientIDQualifiersSequence)
01483                 stream << "\t\tSequence <IssuerOfPatientIDQualifiersSequence>\n";
01484         else
01485                 stream << "\t\tSequence <IssuerOfPatientIDQualifiersSequence> not present\n";
01486         if (IssuerOfPatientIDQualifiersSequence && strcmp(IssuerOfPatientIDQualifiersSequence->getVR(),"SQ") == 0) {
01487                 AttributeList **array;
01488                 int n;
01489                 if ((n=IssuerOfPatientIDQualifiersSequence->getLists(&array)) > 0) {
01490                         int i; for (i=0; i<n; ++i) {
01491                                 AttributeList *list=array[i];
01492                                         stream << "\t\tItem" << endl;
01493                                 Attribute *UniversalEntityID = (*list)[TagFromName(UniversalEntityID)];
01494                                 stream << "\t";
01495                                 if (UniversalEntityID) {
01496                                         stream << "\t\t";
01497                                         UniversalEntityID->write(stream,dict);
01498                                         stream << "\n";
01499                                 }
01500                                 else
01501                                         stream << "\t\tElement <UniversalEntityID> not present\n";
01502 
01503                                 Attribute *UniversalEntityIDType = (*list)[TagFromName(UniversalEntityIDType)];
01504                                 stream << "\t";
01505                                 if (UniversalEntityIDType) {
01506                                         stream << "\t\t";
01507                                         UniversalEntityIDType->write(stream,dict);
01508                                         stream << "\n";
01509                                 }
01510                                 else
01511                                         stream << "\t\tElement <UniversalEntityIDType> not present\n";
01512 
01513                                 Attribute *IdentifierTypeCode = (*list)[TagFromName(IdentifierTypeCode)];
01514                                 stream << "\t";
01515                                 if (IdentifierTypeCode) {
01516                                         stream << "\t\t";
01517                                         IdentifierTypeCode->write(stream,dict);
01518                                         stream << "\n";
01519                                 }
01520                                 else
01521                                         stream << "\t\tElement <IdentifierTypeCode> not present\n";
01522 
01523         Attribute *AssigningFacilitySequence = (*list)[TagFromName(AssigningFacilitySequence)];
01524                                 stream << "\t";
01525                                 if (AssigningFacilitySequence)
01526                                         stream << "\t\tSequence <AssigningFacilitySequence>\n";
01527                                 else
01528                                         stream << "\t\tSequence <AssigningFacilitySequence> not present\n";
01529                                 if (AssigningFacilitySequence && strcmp(AssigningFacilitySequence->getVR(),"SQ") == 0) {
01530                                         AttributeList **array;
01531                                         int n;
01532                                         if ((n=AssigningFacilitySequence->getLists(&array)) > 0) {
01533                                                 int i; for (i=0; i<n; ++i) {
01534                                                         AttributeList *list=array[i];
01535                                 stream << "\t";
01536                                                                 stream << "\t\tItem" << endl;
01537                                                                                 stream << "\t\t\t";
01538         Macro_HL7v2HierarchicDesignatorMacro(list).write(stream,list,dict);
01539                                                                                 stream << "\t\t\t";
01540         stream << "\tEndMacro <HL7v2HierarchicDesignatorMacro>\n";
01541 
01542                                                 }
01543                                         }
01544                                 }
01545         Attribute *AssigningJurisdictionCodeSequence = (*list)[TagFromName(AssigningJurisdictionCodeSequence)];
01546                                 stream << "\t";
01547                                 if (AssigningJurisdictionCodeSequence)
01548                                         stream << "\t\tSequence <AssigningJurisdictionCodeSequence>\n";
01549                                 else
01550                                         stream << "\t\tSequence <AssigningJurisdictionCodeSequence> not present\n";
01551                                 if (AssigningJurisdictionCodeSequence && strcmp(AssigningJurisdictionCodeSequence->getVR(),"SQ") == 0) {
01552                                         AttributeList **array;
01553                                         int n;
01554                                         if ((n=AssigningJurisdictionCodeSequence->getLists(&array)) > 0) {
01555                                                 int i; for (i=0; i<n; ++i) {
01556                                                         AttributeList *list=array[i];
01557                                 stream << "\t";
01558                                                                 stream << "\t\tItem" << endl;
01559                                                                                 stream << "\t\t\t";
01560         Macro_CodeSequenceMacro(list).write(stream,list,dict);
01561                                                                                 stream << "\t\t\t";
01562         stream << "\tEndMacro <CodeSequenceMacro>\n";
01563 
01564                                                 }
01565                                         }
01566                                 }
01567         Attribute *AssigningAgencyOrDepartmentCodeSequence = (*list)[TagFromName(AssigningAgencyOrDepartmentCodeSequence)];
01568                                 stream << "\t";
01569                                 if (AssigningAgencyOrDepartmentCodeSequence)
01570                                         stream << "\t\tSequence <AssigningAgencyOrDepartmentCodeSequence>\n";
01571                                 else
01572                                         stream << "\t\tSequence <AssigningAgencyOrDepartmentCodeSequence> not present\n";
01573                                 if (AssigningAgencyOrDepartmentCodeSequence && strcmp(AssigningAgencyOrDepartmentCodeSequence->getVR(),"SQ") == 0) {
01574                                         AttributeList **array;
01575                                         int n;
01576                                         if ((n=AssigningAgencyOrDepartmentCodeSequence->getLists(&array)) > 0) {
01577                                                 int i; for (i=0; i<n; ++i) {
01578                                                         AttributeList *list=array[i];
01579                                 stream << "\t";
01580                                                                 stream << "\t\tItem" << endl;
01581                                                                                 stream << "\t\t\t";
01582         Macro_CodeSequenceMacro(list).write(stream,list,dict);
01583                                                                                 stream << "\t\t\t";
01584         stream << "\tEndMacro <CodeSequenceMacro>\n";
01585 
01586                                                 }
01587                                         }
01588                                 }
01589                         }
01590                 }
01591         }
01592 }
01593 
01594 void
01595 Macro_GeneralContributingSourcesMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
01596 {
01597         stream << "\tMacro <GeneralContributingSourcesMacro>\n";
01598 
01599         if (ContributingSOPInstancesReferenceSequence)
01600                 stream << "\t\tSequence <ContributingSOPInstancesReferenceSequence>\n";
01601         else
01602                 stream << "\t\tSequence <ContributingSOPInstancesReferenceSequence> not present\n";
01603         if (ContributingSOPInstancesReferenceSequence && strcmp(ContributingSOPInstancesReferenceSequence->getVR(),"SQ") == 0) {
01604                 AttributeList **array;
01605                 int n;
01606                 if ((n=ContributingSOPInstancesReferenceSequence->getLists(&array)) > 0) {
01607                         int i; for (i=0; i<n; ++i) {
01608                                 AttributeList *list=array[i];
01609                                         stream << "\t\tItem" << endl;
01610                                 Attribute *StudyInstanceUID = (*list)[TagFromName(StudyInstanceUID)];
01611                                 stream << "\t";
01612                                 if (StudyInstanceUID) {
01613                                         stream << "\t\t";
01614                                         StudyInstanceUID->write(stream,dict);
01615                                         stream << "\n";
01616                                 }
01617                                 else
01618                                         stream << "\t\tElement <StudyInstanceUID> not present\n";
01619 
01620         Attribute *ReferencedSeriesSequence = (*list)[TagFromName(ReferencedSeriesSequence)];
01621                                 stream << "\t";
01622                                 if (ReferencedSeriesSequence)
01623                                         stream << "\t\tSequence <ReferencedSeriesSequence>\n";
01624                                 else
01625                                         stream << "\t\tSequence <ReferencedSeriesSequence> not present\n";
01626                                 if (ReferencedSeriesSequence && strcmp(ReferencedSeriesSequence->getVR(),"SQ") == 0) {
01627                                         AttributeList **array;
01628                                         int n;
01629                                         if ((n=ReferencedSeriesSequence->getLists(&array)) > 0) {
01630                                                 int i; for (i=0; i<n; ++i) {
01631                                                         AttributeList *list=array[i];
01632                                 stream << "\t";
01633                                                                 stream << "\t\tItem" << endl;
01634                                                         Attribute *SeriesInstanceUID = (*list)[TagFromName(SeriesInstanceUID)];
01635                                                         stream << "\t\t";
01636                                                         if (SeriesInstanceUID) {
01637                                                                 stream << "\t\t";
01638                                                                 SeriesInstanceUID->write(stream,dict);
01639                                                                 stream << "\n";
01640                                                         }
01641                                                         else
01642                                                                 stream << "\t\tElement <SeriesInstanceUID> not present\n";
01643 
01644                                                         Attribute *SeriesNumber = (*list)[TagFromName(SeriesNumber)];
01645                                                         stream << "\t\t";
01646                                                         if (SeriesNumber) {
01647                                                                 stream << "\t\t";
01648                                                                 SeriesNumber->write(stream,dict);
01649                                                                 stream << "\n";
01650                                                         }
01651                                                         else
01652                                                                 stream << "\t\tElement <SeriesNumber> not present\n";
01653 
01654         Attribute *ReferencedInstanceSequence = (*list)[TagFromName(ReferencedInstanceSequence)];
01655                                                         stream << "\t\t";
01656                                                         if (ReferencedInstanceSequence)
01657                                                                 stream << "\t\tSequence <ReferencedInstanceSequence>\n";
01658                                                         else
01659                                                                 stream << "\t\tSequence <ReferencedInstanceSequence> not present\n";
01660                                                         if (ReferencedInstanceSequence && strcmp(ReferencedInstanceSequence->getVR(),"SQ") == 0) {
01661                                                                 AttributeList **array;
01662                                                                 int n;
01663                                                                 if ((n=ReferencedInstanceSequence->getLists(&array)) > 0) {
01664                                                                         int i; for (i=0; i<n; ++i) {
01665                                                                                 AttributeList *list=array[i];
01666                                                         stream << "\t\t";
01667                                                                                         stream << "\t\tItem" << endl;
01668                                                                                                         stream << "\t\t\t\t";
01669         Macro_SOPInstanceReferenceMacro(list).write(stream,list,dict);
01670                                                                                                         stream << "\t\t\t\t";
01671         stream << "\tEndMacro <SOPInstanceReferenceMacro>\n";
01672 
01673                                                                                 Attribute *InstanceNumber = (*list)[TagFromName(InstanceNumber)];
01674                                                                                 stream << "\t\t\t";
01675                                                                                 if (InstanceNumber) {
01676                                                                                         stream << "\t\t";
01677                                                                                         InstanceNumber->write(stream,dict);
01678                                                                                         stream << "\n";
01679                                                                                 }
01680                                                                                 else
01681                                                                                         stream << "\t\tElement <InstanceNumber> not present\n";
01682 
01683                                                                         }
01684                                                                 }
01685                                                         }
01686                                                 }
01687                                         }
01688                                 }
01689                         }
01690                 }
01691         }
01692         if (Manufacturer) {
01693                 stream << "\t\t";
01694                 Manufacturer->write(stream,dict);
01695                 stream << "\n";
01696         }
01697         else
01698                 stream << "\t\tElement <Manufacturer> not present\n";
01699 
01700         if (ManufacturerModelName) {
01701                 stream << "\t\t";
01702                 ManufacturerModelName->write(stream,dict);
01703                 stream << "\n";
01704         }
01705         else
01706                 stream << "\t\tElement <ManufacturerModelName> not present\n";
01707 
01708         if (DeviceSerialNumber) {
01709                 stream << "\t\t";
01710                 DeviceSerialNumber->write(stream,dict);
01711                 stream << "\n";
01712         }
01713         else
01714                 stream << "\t\tElement <DeviceSerialNumber> not present\n";
01715 
01716         if (SoftwareVersion) {
01717                 stream << "\t\t";
01718                 SoftwareVersion->write(stream,dict);
01719                 stream << "\n";
01720         }
01721         else
01722                 stream << "\t\tElement <SoftwareVersion> not present\n";
01723 
01724         if (AcquisitionDateTime) {
01725                 stream << "\t\t";
01726                 AcquisitionDateTime->write(stream,dict);
01727                 stream << "\n";
01728         }
01729         else
01730                 stream << "\t\tElement <AcquisitionDateTime> not present\n";
01731 
01732         if (StationName) {
01733                 stream << "\t\t";
01734                 StationName->write(stream,dict);
01735                 stream << "\n";
01736         }
01737         else
01738                 stream << "\t\tElement <StationName> not present\n";
01739 
01740         if (OperatorName) {
01741                 stream << "\t\t";
01742                 OperatorName->write(stream,dict);
01743                 stream << "\n";
01744         }
01745         else
01746                 stream << "\t\tElement <OperatorName> not present\n";
01747 
01748         if (OperatorIdentificationSequence)
01749                 stream << "\t\tSequence <OperatorIdentificationSequence>\n";
01750         else
01751                 stream << "\t\tSequence <OperatorIdentificationSequence> not present\n";
01752         if (OperatorIdentificationSequence && strcmp(OperatorIdentificationSequence->getVR(),"SQ") == 0) {
01753                 AttributeList **array;
01754                 int n;
01755                 if ((n=OperatorIdentificationSequence->getLists(&array)) > 0) {
01756                         int i; for (i=0; i<n; ++i) {
01757                                 AttributeList *list=array[i];
01758                                         stream << "\t\tItem" << endl;
01759                                                         stream << "\t\t";
01760         Macro_PersonIdentificationMacro(list).write(stream,list,dict);
01761                                                         stream << "\t\t";
01762         stream << "\tEndMacro <PersonIdentificationMacro>\n";
01763 
01764                         }
01765                 }
01766         }
01767         if (ProtocolName) {
01768                 stream << "\t\t";
01769                 ProtocolName->write(stream,dict);
01770                 stream << "\n";
01771         }
01772         else
01773                 stream << "\t\tElement <ProtocolName> not present\n";
01774 
01775         if (PerformedProtocolCodeSequence)
01776                 stream << "\t\tSequence <PerformedProtocolCodeSequence>\n";
01777         else
01778                 stream << "\t\tSequence <PerformedProtocolCodeSequence> not present\n";
01779         if (PerformedProtocolCodeSequence && strcmp(PerformedProtocolCodeSequence->getVR(),"SQ") == 0) {
01780                 AttributeList **array;
01781                 int n;
01782                 if ((n=PerformedProtocolCodeSequence->getLists(&array)) > 0) {
01783                         int i; for (i=0; i<n; ++i) {
01784                                 AttributeList *list=array[i];
01785                                         stream << "\t\tItem" << endl;
01786                                                         stream << "\t\t";
01787         Macro_CodeSequenceMacro(list).write(stream,list,dict);
01788                                                         stream << "\t\t";
01789         stream << "\tEndMacro <CodeSequenceMacro>\n";
01790 
01791                         }
01792                 }
01793         }
01794         if (AcquisitionProtocolName) {
01795                 stream << "\t\t";
01796                 AcquisitionProtocolName->write(stream,dict);
01797                 stream << "\n";
01798         }
01799         else
01800                 stream << "\t\tElement <AcquisitionProtocolName> not present\n";
01801 
01802 }
01803 
01804 void
01805 Macro_ContributingImageSourcesMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
01806 {
01807         stream << "\tMacro <ContributingImageSourcesMacro>\n";
01808 
01809         if (Rows) {
01810                 stream << "\t\t";
01811                 Rows->write(stream,dict);
01812                 stream << "\n";
01813         }
01814         else
01815                 stream << "\t\tElement <Rows> not present\n";
01816 
01817         if (Columns) {
01818                 stream << "\t\t";
01819                 Columns->write(stream,dict);
01820                 stream << "\n";
01821         }
01822         else
01823                 stream << "\t\tElement <Columns> not present\n";
01824 
01825         if (BitsStored) {
01826                 stream << "\t\t";
01827                 BitsStored->write(stream,dict);
01828                 stream << "\n";
01829         }
01830         else
01831                 stream << "\t\tElement <BitsStored> not present\n";
01832 
01833         if (LossyImageCompression) {
01834                 stream << "\t\t";
01835                 LossyImageCompression->write(stream,dict);
01836                 stream << "\n";
01837         }
01838         else
01839                 stream << "\t\tElement <LossyImageCompression> not present\n";
01840 
01841         if (LossyImageCompressionRatio) {
01842                 stream << "\t\t";
01843                 LossyImageCompressionRatio->write(stream,dict);
01844                 stream << "\n";
01845         }
01846         else
01847                 stream << "\t\tElement <LossyImageCompressionRatio> not present\n";
01848 
01849         if (LossyImageCompressionMethod) {
01850                 stream << "\t\t";
01851                 LossyImageCompressionMethod->write(stream,dict);
01852                 stream << "\n";
01853         }
01854         else
01855                 stream << "\t\tElement <LossyImageCompressionMethod> not present\n";
01856 
01857 }
01858 
01859 void
01860 Macro_PatientOrientationMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
01861 {
01862         stream << "\tMacro <PatientOrientationMacro>\n";
01863 
01864         if (PatientOrientationCodeSequence)
01865                 stream << "\t\tSequence <PatientOrientationCodeSequence>\n";
01866         else
01867                 stream << "\t\tSequence <PatientOrientationCodeSequence> not present\n";
01868         if (PatientOrientationCodeSequence && strcmp(PatientOrientationCodeSequence->getVR(),"SQ") == 0) {
01869                 AttributeList **array;
01870                 int n;
01871                 if ((n=PatientOrientationCodeSequence->getLists(&array)) > 0) {
01872                         int i; for (i=0; i<n; ++i) {
01873                                 AttributeList *list=array[i];
01874                                         stream << "\t\tItem" << endl;
01875                                                         stream << "\t\t";
01876         Macro_CodeSequenceMacro(list).write(stream,list,dict);
01877                                                         stream << "\t\t";
01878         stream << "\tEndMacro <CodeSequenceMacro>\n";
01879 
01880         Attribute *PatientOrientationModifierCodeSequence = (*list)[TagFromName(PatientOrientationModifierCodeSequence)];
01881                                 stream << "\t";
01882                                 if (PatientOrientationModifierCodeSequence)
01883                                         stream << "\t\tSequence <PatientOrientationModifierCodeSequence>\n";
01884                                 else
01885                                         stream << "\t\tSequence <PatientOrientationModifierCodeSequence> not present\n";
01886                                 if (PatientOrientationModifierCodeSequence && strcmp(PatientOrientationModifierCodeSequence->getVR(),"SQ") == 0) {
01887                                         AttributeList **array;
01888                                         int n;
01889                                         if ((n=PatientOrientationModifierCodeSequence->getLists(&array)) > 0) {
01890                                                 int i; for (i=0; i<n; ++i) {
01891                                                         AttributeList *list=array[i];
01892                                 stream << "\t";
01893                                                                 stream << "\t\tItem" << endl;
01894                                                                                 stream << "\t\t\t";
01895         Macro_CodeSequenceMacro(list).write(stream,list,dict);
01896                                                                                 stream << "\t\t\t";
01897         stream << "\tEndMacro <CodeSequenceMacro>\n";
01898 
01899                                                 }
01900                                         }
01901                                 }
01902                         }
01903                 }
01904         }
01905         if (PatientGantryRelationshipCodeSequence)
01906                 stream << "\t\tSequence <PatientGantryRelationshipCodeSequence>\n";
01907         else
01908                 stream << "\t\tSequence <PatientGantryRelationshipCodeSequence> not present\n";
01909         if (PatientGantryRelationshipCodeSequence && strcmp(PatientGantryRelationshipCodeSequence->getVR(),"SQ") == 0) {
01910                 AttributeList **array;
01911                 int n;
01912                 if ((n=PatientGantryRelationshipCodeSequence->getLists(&array)) > 0) {
01913                         int i; for (i=0; i<n; ++i) {
01914                                 AttributeList *list=array[i];
01915                                         stream << "\t\tItem" << endl;
01916                                                         stream << "\t\t";
01917         Macro_CodeSequenceMacro(list).write(stream,list,dict);
01918                                                         stream << "\t\t";
01919         stream << "\tEndMacro <CodeSequenceMacro>\n";
01920 
01921                         }
01922                 }
01923         }
01924 }
01925 
01926 void
01927 Macro_PerformedProcedureStepSummaryMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
01928 {
01929         stream << "\tMacro <PerformedProcedureStepSummaryMacro>\n";
01930 
01931         if (PerformedProcedureStepID) {
01932                 stream << "\t\t";
01933                 PerformedProcedureStepID->write(stream,dict);
01934                 stream << "\n";
01935         }
01936         else
01937                 stream << "\t\tElement <PerformedProcedureStepID> not present\n";
01938 
01939         if (PerformedProcedureStepStartDate) {
01940                 stream << "\t\t";
01941                 PerformedProcedureStepStartDate->write(stream,dict);
01942                 stream << "\n";
01943         }
01944         else
01945                 stream << "\t\tElement <PerformedProcedureStepStartDate> not present\n";
01946 
01947         if (PerformedProcedureStepStartTime) {
01948                 stream << "\t\t";
01949                 PerformedProcedureStepStartTime->write(stream,dict);
01950                 stream << "\n";
01951         }
01952         else
01953                 stream << "\t\tElement <PerformedProcedureStepStartTime> not present\n";
01954 
01955         if (PerformedProcedureStepDescription) {
01956                 stream << "\t\t";
01957                 PerformedProcedureStepDescription->write(stream,dict);
01958                 stream << "\n";
01959         }
01960         else
01961                 stream << "\t\tElement <PerformedProcedureStepDescription> not present\n";
01962 
01963         if (PerformedProtocolCodeSequence)
01964                 stream << "\t\tSequence <PerformedProtocolCodeSequence>\n";
01965         else
01966                 stream << "\t\tSequence <PerformedProtocolCodeSequence> not present\n";
01967         if (PerformedProtocolCodeSequence && strcmp(PerformedProtocolCodeSequence->getVR(),"SQ") == 0) {
01968                 AttributeList **array;
01969                 int n;
01970                 if ((n=PerformedProtocolCodeSequence->getLists(&array)) > 0) {
01971                         int i; for (i=0; i<n; ++i) {
01972                                 AttributeList *list=array[i];
01973                                         stream << "\t\tItem" << endl;
01974                                                         stream << "\t\t";
01975         Macro_CodeSequenceMacro(list).write(stream,list,dict);
01976                                                         stream << "\t\t";
01977         stream << "\tEndMacro <CodeSequenceMacro>\n";
01978 
01979         Attribute *ProtocolContextSequence = (*list)[TagFromName(ProtocolContextSequence)];
01980                                 stream << "\t";
01981                                 if (ProtocolContextSequence)
01982                                         stream << "\t\tSequence <ProtocolContextSequence>\n";
01983                                 else
01984                                         stream << "\t\tSequence <ProtocolContextSequence> not present\n";
01985                                 if (ProtocolContextSequence && strcmp(ProtocolContextSequence->getVR(),"SQ") == 0) {
01986                                         AttributeList **array;
01987                                         int n;
01988                                         if ((n=ProtocolContextSequence->getLists(&array)) > 0) {
01989                                                 int i; for (i=0; i<n; ++i) {
01990                                                         AttributeList *list=array[i];
01991                                 stream << "\t";
01992                                                                 stream << "\t\tItem" << endl;
01993                                                                                 stream << "\t\t\t";
01994         Macro_ContentItemMacro(list).write(stream,list,dict);
01995                                                                                 stream << "\t\t\t";
01996         stream << "\tEndMacro <ContentItemMacro>\n";
01997 
01998         Attribute *ContentItemModifierSequence = (*list)[TagFromName(ContentItemModifierSequence)];
01999                                                         stream << "\t\t";
02000                                                         if (ContentItemModifierSequence)
02001                                                                 stream << "\t\tSequence <ContentItemModifierSequence>\n";
02002                                                         else
02003                                                                 stream << "\t\tSequence <ContentItemModifierSequence> not present\n";
02004                                                         if (ContentItemModifierSequence && strcmp(ContentItemModifierSequence->getVR(),"SQ") == 0) {
02005                                                                 AttributeList **array;
02006                                                                 int n;
02007                                                                 if ((n=ContentItemModifierSequence->getLists(&array)) > 0) {
02008                                                                         int i; for (i=0; i<n; ++i) {
02009                                                                                 AttributeList *list=array[i];
02010                                                         stream << "\t\t";
02011                                                                                         stream << "\t\tItem" << endl;
02012                                                                                                         stream << "\t\t\t\t";
02013         Macro_ContentItemMacro(list).write(stream,list,dict);
02014                                                                                                         stream << "\t\t\t\t";
02015         stream << "\tEndMacro <ContentItemMacro>\n";
02016 
02017                                                                         }
02018                                                                 }
02019                                                         }
02020                                                 }
02021                                         }
02022                                 }
02023                         }
02024                 }
02025         }
02026         if (CommentsOnPerformedProcedureStep) {
02027                 stream << "\t\t";
02028                 CommentsOnPerformedProcedureStep->write(stream,dict);
02029                 stream << "\n";
02030         }
02031         else
02032                 stream << "\t\tElement <CommentsOnPerformedProcedureStep> not present\n";
02033 
02034 }
02035 
02036 void
02037 Module_Patient::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
02038 {
02039         stream << "\tModule <Patient>\n";
02040 
02041         if (PatientName) {
02042                 stream << "\t\t";
02043                 PatientName->write(stream,dict);
02044                 stream << "\n";
02045         }
02046         else
02047                 stream << "\t\tElement <PatientName> not present\n";
02048 
02049         if (PatientID) {
02050                 stream << "\t\t";
02051                 PatientID->write(stream,dict);
02052                 stream << "\n";
02053         }
02054         else
02055                 stream << "\t\tElement <PatientID> not present\n";
02056 
02057                                 stream << "\t";
02058         Macro_IssuerOfPatientIDMacro(list).write(stream,list,dict);
02059                                 stream << "\t";
02060         stream << "\tEndMacro <IssuerOfPatientIDMacro>\n";
02061 
02062         if (PatientBirthDate) {
02063                 stream << "\t\t";
02064                 PatientBirthDate->write(stream,dict);
02065                 stream << "\n";
02066         }
02067         else
02068                 stream << "\t\tElement <PatientBirthDate> not present\n";
02069 
02070         if (PatientSex) {
02071                 stream << "\t\t";
02072                 PatientSex->write(stream,dict);
02073                 stream << "\n";
02074         }
02075         else
02076                 stream << "\t\tElement <PatientSex> not present\n";
02077 
02078         if (ReferencedPatientSequence)
02079                 stream << "\t\tSequence <ReferencedPatientSequence>\n";
02080         else
02081                 stream << "\t\tSequence <ReferencedPatientSequence> not present\n";
02082         if (ReferencedPatientSequence && strcmp(ReferencedPatientSequence->getVR(),"SQ") == 0) {
02083                 AttributeList **array;
02084                 int n;
02085                 if ((n=ReferencedPatientSequence->getLists(&array)) > 0) {
02086                         int i; for (i=0; i<n; ++i) {
02087                                 AttributeList *list=array[i];
02088                                         stream << "\t\tItem" << endl;
02089                                                         stream << "\t\t";
02090         Macro_SOPInstanceReferenceMacro(list).write(stream,list,dict);
02091                                                         stream << "\t\t";
02092         stream << "\tEndMacro <SOPInstanceReferenceMacro>\n";
02093 
02094                         }
02095                 }
02096         }
02097         if (PatientBirthTime) {
02098                 stream << "\t\t";
02099                 PatientBirthTime->write(stream,dict);
02100                 stream << "\n";
02101         }
02102         else
02103                 stream << "\t\tElement <PatientBirthTime> not present\n";
02104 
02105         if (OtherPatientID) {
02106                 stream << "\t\t";
02107                 OtherPatientID->write(stream,dict);
02108                 stream << "\n";
02109         }
02110         else
02111                 stream << "\t\tElement <OtherPatientID> not present\n";
02112 
02113         if (OtherPatientIDSequence)
02114                 stream << "\t\tSequence <OtherPatientIDSequence>\n";
02115         else
02116                 stream << "\t\tSequence <OtherPatientIDSequence> not present\n";
02117         if (OtherPatientIDSequence && strcmp(OtherPatientIDSequence->getVR(),"SQ") == 0) {
02118                 AttributeList **array;
02119                 int n;
02120                 if ((n=OtherPatientIDSequence->getLists(&array)) > 0) {
02121                         int i; for (i=0; i<n; ++i) {
02122                                 AttributeList *list=array[i];
02123                                         stream << "\t\tItem" << endl;
02124                                 Attribute *PatientID = (*list)[TagFromName(PatientID)];
02125                                 stream << "\t";
02126                                 if (PatientID) {
02127                                         stream << "\t\t";
02128                                         PatientID->write(stream,dict);
02129                                         stream << "\n";
02130                                 }
02131                                 else
02132                                         stream << "\t\tElement <PatientID> not present\n";
02133 
02134                                                         stream << "\t\t";
02135         Macro_IssuerOfPatientIDMacro(list).write(stream,list,dict);
02136                                                         stream << "\t\t";
02137         stream << "\tEndMacro <IssuerOfPatientIDMacro>\n";
02138 
02139                                 Attribute *TypeOfPatientID = (*list)[TagFromName(TypeOfPatientID)];
02140                                 stream << "\t";
02141                                 if (TypeOfPatientID) {
02142                                         stream << "\t\t";
02143                                         TypeOfPatientID->write(stream,dict);
02144                                         stream << "\n";
02145                                 }
02146                                 else
02147                                         stream << "\t\tElement <TypeOfPatientID> not present\n";
02148 
02149                         }
02150                 }
02151         }
02152         if (OtherPatientName) {
02153                 stream << "\t\t";
02154                 OtherPatientName->write(stream,dict);
02155                 stream << "\n";
02156         }
02157         else
02158                 stream << "\t\tElement <OtherPatientName> not present\n";
02159 
02160         if (EthnicGroup) {
02161                 stream << "\t\t";
02162                 EthnicGroup->write(stream,dict);
02163                 stream << "\n";
02164         }
02165         else
02166                 stream << "\t\tElement <EthnicGroup> not present\n";
02167 
02168         if (PatientComments) {
02169                 stream << "\t\t";
02170                 PatientComments->write(stream,dict);
02171                 stream << "\n";
02172         }
02173         else
02174                 stream << "\t\tElement <PatientComments> not present\n";
02175 
02176         if (PatientSpeciesDescription) {
02177                 stream << "\t\t";
02178                 PatientSpeciesDescription->write(stream,dict);
02179                 stream << "\n";
02180         }
02181         else
02182                 stream << "\t\tElement <PatientSpeciesDescription> not present\n";
02183 
02184         if (PatientSpeciesCodeSequence)
02185                 stream << "\t\tSequence <PatientSpeciesCodeSequence>\n";
02186         else
02187                 stream << "\t\tSequence <PatientSpeciesCodeSequence> not present\n";
02188         if (PatientSpeciesCodeSequence && strcmp(PatientSpeciesCodeSequence->getVR(),"SQ") == 0) {
02189                 AttributeList **array;
02190                 int n;
02191                 if ((n=PatientSpeciesCodeSequence->getLists(&array)) > 0) {
02192                         int i; for (i=0; i<n; ++i) {
02193                                 AttributeList *list=array[i];
02194                                         stream << "\t\tItem" << endl;
02195                                                         stream << "\t\t";
02196         Macro_CodeSequenceMacro(list).write(stream,list,dict);
02197                                                         stream << "\t\t";
02198         stream << "\tEndMacro <CodeSequenceMacro>\n";
02199 
02200                         }
02201                 }
02202         }
02203         if (PatientBreedDescription) {
02204                 stream << "\t\t";
02205                 PatientBreedDescription->write(stream,dict);
02206                 stream << "\n";
02207         }
02208         else
02209                 stream << "\t\tElement <PatientBreedDescription> not present\n";
02210 
02211         if (PatientBreedCodeSequence)
02212                 stream << "\t\tSequence <PatientBreedCodeSequence>\n";
02213         else
02214                 stream << "\t\tSequence <PatientBreedCodeSequence> not present\n";
02215         if (PatientBreedCodeSequence && strcmp(PatientBreedCodeSequence->getVR(),"SQ") == 0) {
02216                 AttributeList **array;
02217                 int n;
02218                 if ((n=PatientBreedCodeSequence->getLists(&array)) > 0) {
02219                         int i; for (i=0; i<n; ++i) {
02220                                 AttributeList *list=array[i];
02221                                         stream << "\t\tItem" << endl;
02222                                                         stream << "\t\t";
02223         Macro_CodeSequenceMacro(list).write(stream,list,dict);
02224                                                         stream << "\t\t";
02225         stream << "\tEndMacro <CodeSequenceMacro>\n";
02226 
02227                         }
02228                 }
02229         }
02230         if (BreedRegistrationSequence)
02231                 stream << "\t\tSequence <BreedRegistrationSequence>\n";
02232         else
02233                 stream << "\t\tSequence <BreedRegistrationSequence> not present\n";
02234         if (BreedRegistrationSequence && strcmp(BreedRegistrationSequence->getVR(),"SQ") == 0) {
02235                 AttributeList **array;
02236                 int n;
02237                 if ((n=BreedRegistrationSequence->getLists(&array)) > 0) {
02238                         int i; for (i=0; i<n; ++i) {
02239                                 AttributeList *list=array[i];
02240                                         stream << "\t\tItem" << endl;
02241                                 Attribute *BreedRegistrationNumber = (*list)[TagFromName(BreedRegistrationNumber)];
02242                                 stream << "\t";
02243                                 if (BreedRegistrationNumber) {
02244                                         stream << "\t\t";
02245                                         BreedRegistrationNumber->write(stream,dict);
02246                                         stream << "\n";
02247                                 }
02248                                 else
02249                                         stream << "\t\tElement <BreedRegistrationNumber> not present\n";
02250 
02251         Attribute *BreedRegistryCodeSequence = (*list)[TagFromName(BreedRegistryCodeSequence)];
02252                                 stream << "\t";
02253                                 if (BreedRegistryCodeSequence)
02254                                         stream << "\t\tSequence <BreedRegistryCodeSequence>\n";
02255                                 else
02256                                         stream << "\t\tSequence <BreedRegistryCodeSequence> not present\n";
02257                                 if (BreedRegistryCodeSequence && strcmp(BreedRegistryCodeSequence->getVR(),"SQ") == 0) {
02258                                         AttributeList **array;
02259                                         int n;
02260                                         if ((n=BreedRegistryCodeSequence->getLists(&array)) > 0) {
02261                                                 int i; for (i=0; i<n; ++i) {
02262                                                         AttributeList *list=array[i];
02263                                 stream << "\t";
02264                                                                 stream << "\t\tItem" << endl;
02265                                                                                 stream << "\t\t\t";
02266         Macro_CodeSequenceMacro(list).write(stream,list,dict);
02267                                                                                 stream << "\t\t\t";
02268         stream << "\tEndMacro <CodeSequenceMacro>\n";
02269 
02270                                                 }
02271                                         }
02272                                 }
02273                         }
02274                 }
02275         }
02276         if (ResponsiblePerson) {
02277                 stream << "\t\t";
02278                 ResponsiblePerson->write(stream,dict);
02279                 stream << "\n";
02280         }
02281         else
02282                 stream << "\t\tElement <ResponsiblePerson> not present\n";
02283 
02284         if (ResponsiblePersonRole) {
02285                 stream << "\t\t";
02286                 ResponsiblePersonRole->write(stream,dict);
02287                 stream << "\n";
02288         }
02289         else
02290                 stream << "\t\tElement <ResponsiblePersonRole> not present\n";
02291 
02292         if (ResponsibleOrganization) {
02293                 stream << "\t\t";
02294                 ResponsibleOrganization->write(stream,dict);
02295                 stream << "\n";
02296         }
02297         else
02298                 stream << "\t\tElement <ResponsibleOrganization> not present\n";
02299 
02300         if (PatientIdentityRemoved) {
02301                 stream << "\t\t";
02302                 PatientIdentityRemoved->write(stream,dict);
02303                 stream << "\n";
02304         }
02305         else
02306                 stream << "\t\tElement <PatientIdentityRemoved> not present\n";
02307 
02308         if (DeidentificationMethod) {
02309                 stream << "\t\t";
02310                 DeidentificationMethod->write(stream,dict);
02311                 stream << "\n";
02312         }
02313         else
02314                 stream << "\t\tElement <DeidentificationMethod> not present\n";
02315 
02316         if (DeidentificationMethodCodeSequence)
02317                 stream << "\t\tSequence <DeidentificationMethodCodeSequence>\n";
02318         else
02319                 stream << "\t\tSequence <DeidentificationMethodCodeSequence> not present\n";
02320         if (DeidentificationMethodCodeSequence && strcmp(DeidentificationMethodCodeSequence->getVR(),"SQ") == 0) {
02321                 AttributeList **array;
02322                 int n;
02323                 if ((n=DeidentificationMethodCodeSequence->getLists(&array)) > 0) {
02324                         int i; for (i=0; i<n; ++i) {
02325                                 AttributeList *list=array[i];
02326                                         stream << "\t\tItem" << endl;
02327                                                         stream << "\t\t";
02328         Macro_CodeSequenceMacro(list).write(stream,list,dict);
02329                                                         stream << "\t\t";
02330         stream << "\tEndMacro <CodeSequenceMacro>\n";
02331 
02332                         }
02333                 }
02334         }
02335 }
02336 
02337 void
02338 Module_ClinicalTrialSubject::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
02339 {
02340         stream << "\tModule <ClinicalTrialSubject>\n";
02341 
02342         if (ClinicalTrialSponsorName) {
02343                 stream << "\t\t";
02344                 ClinicalTrialSponsorName->write(stream,dict);
02345                 stream << "\n";
02346         }
02347         else
02348                 stream << "\t\tElement <ClinicalTrialSponsorName> not present\n";
02349 
02350         if (ClinicalTrialProtocolID) {
02351                 stream << "\t\t";
02352                 ClinicalTrialProtocolID->write(stream,dict);
02353                 stream << "\n";
02354         }
02355         else
02356                 stream << "\t\tElement <ClinicalTrialProtocolID> not present\n";
02357 
02358         if (ClinicalTrialProtocolName) {
02359                 stream << "\t\t";
02360                 ClinicalTrialProtocolName->write(stream,dict);
02361                 stream << "\n";
02362         }
02363         else
02364                 stream << "\t\tElement <ClinicalTrialProtocolName> not present\n";
02365 
02366         if (ClinicalTrialSiteID) {
02367                 stream << "\t\t";
02368                 ClinicalTrialSiteID->write(stream,dict);
02369                 stream << "\n";
02370         }
02371         else
02372                 stream << "\t\tElement <ClinicalTrialSiteID> not present\n";
02373 
02374         if (ClinicalTrialSiteName) {
02375                 stream << "\t\t";
02376                 ClinicalTrialSiteName->write(stream,dict);
02377                 stream << "\n";
02378         }
02379         else
02380                 stream << "\t\tElement <ClinicalTrialSiteName> not present\n";
02381 
02382         if (ClinicalTrialSubjectID) {
02383                 stream << "\t\t";
02384                 ClinicalTrialSubjectID->write(stream,dict);
02385                 stream << "\n";
02386         }
02387         else
02388                 stream << "\t\tElement <ClinicalTrialSubjectID> not present\n";
02389 
02390         if (ClinicalTrialSubjectReadingID) {
02391                 stream << "\t\t";
02392                 ClinicalTrialSubjectReadingID->write(stream,dict);
02393                 stream << "\n";
02394         }
02395         else
02396                 stream << "\t\tElement <ClinicalTrialSubjectReadingID> not present\n";
02397 
02398 }
02399 
02400 void
02401 Module_GeneralStudy::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
02402 {
02403         stream << "\tModule <GeneralStudy>\n";
02404 
02405         if (StudyInstanceUID) {
02406                 stream << "\t\t";
02407                 StudyInstanceUID->write(stream,dict);
02408                 stream << "\n";
02409         }
02410         else
02411                 stream << "\t\tElement <StudyInstanceUID> not present\n";
02412 
02413         if (StudyDate) {
02414                 stream << "\t\t";
02415                 StudyDate->write(stream,dict);
02416                 stream << "\n";
02417         }
02418         else
02419                 stream << "\t\tElement <StudyDate> not present\n";
02420 
02421         if (StudyTime) {
02422                 stream << "\t\t";
02423                 StudyTime->write(stream,dict);
02424                 stream << "\n";
02425         }
02426         else
02427                 stream << "\t\tElement <StudyTime> not present\n";
02428 
02429         if (ReferringPhysicianName) {
02430                 stream << "\t\t";
02431                 ReferringPhysicianName->write(stream,dict);
02432                 stream << "\n";
02433         }
02434         else
02435                 stream << "\t\tElement <ReferringPhysicianName> not present\n";
02436 
02437         if (ReferringPhysicianIdentificationSequence)
02438                 stream << "\t\tSequence <ReferringPhysicianIdentificationSequence>\n";
02439         else
02440                 stream << "\t\tSequence <ReferringPhysicianIdentificationSequence> not present\n";
02441         if (ReferringPhysicianIdentificationSequence && strcmp(ReferringPhysicianIdentificationSequence->getVR(),"SQ") == 0) {
02442                 AttributeList **array;
02443                 int n;
02444                 if ((n=ReferringPhysicianIdentificationSequence->getLists(&array)) > 0) {
02445                         int i; for (i=0; i<n; ++i) {
02446                                 AttributeList *list=array[i];
02447                                         stream << "\t\tItem" << endl;
02448                                                         stream << "\t\t";
02449         Macro_PersonIdentificationMacro(list).write(stream,list,dict);
02450                                                         stream << "\t\t";
02451         stream << "\tEndMacro <PersonIdentificationMacro>\n";
02452 
02453                         }
02454                 }
02455         }
02456         if (StudyID) {
02457                 stream << "\t\t";
02458                 StudyID->write(stream,dict);
02459                 stream << "\n";
02460         }
02461         else
02462                 stream << "\t\tElement <StudyID> not present\n";
02463 
02464         if (AccessionNumber) {
02465                 stream << "\t\t";
02466                 AccessionNumber->write(stream,dict);
02467                 stream << "\n";
02468         }
02469         else
02470                 stream << "\t\tElement <AccessionNumber> not present\n";
02471 
02472         if (IssuerOfAccessionNumberSequence)
02473                 stream << "\t\tSequence <IssuerOfAccessionNumberSequence>\n";
02474         else
02475                 stream << "\t\tSequence <IssuerOfAccessionNumberSequence> not present\n";
02476         if (IssuerOfAccessionNumberSequence && strcmp(IssuerOfAccessionNumberSequence->getVR(),"SQ") == 0) {
02477                 AttributeList **array;
02478                 int n;
02479                 if ((n=IssuerOfAccessionNumberSequence->getLists(&array)) > 0) {
02480                         int i; for (i=0; i<n; ++i) {
02481                                 AttributeList *list=array[i];
02482                                         stream << "\t\tItem" << endl;
02483                                                         stream << "\t\t";
02484         Macro_HL7v2HierarchicDesignatorMacro(list).write(stream,list,dict);
02485                                                         stream << "\t\t";
02486         stream << "\tEndMacro <HL7v2HierarchicDesignatorMacro>\n";
02487 
02488                         }
02489                 }
02490         }
02491         if (StudyDescription) {
02492                 stream << "\t\t";
02493                 StudyDescription->write(stream,dict);
02494                 stream << "\n";
02495         }
02496         else
02497                 stream << "\t\tElement <StudyDescription> not present\n";
02498 
02499         if (PhysicianOfRecord) {
02500                 stream << "\t\t";
02501                 PhysicianOfRecord->write(stream,dict);
02502                 stream << "\n";
02503         }
02504         else
02505                 stream << "\t\tElement <PhysicianOfRecord> not present\n";
02506 
02507         if (PhysicianOfRecordIdentificationSequence)
02508                 stream << "\t\tSequence <PhysicianOfRecordIdentificationSequence>\n";
02509         else
02510                 stream << "\t\tSequence <PhysicianOfRecordIdentificationSequence> not present\n";
02511         if (PhysicianOfRecordIdentificationSequence && strcmp(PhysicianOfRecordIdentificationSequence->getVR(),"SQ") == 0) {
02512                 AttributeList **array;
02513                 int n;
02514                 if ((n=PhysicianOfRecordIdentificationSequence->getLists(&array)) > 0) {
02515                         int i; for (i=0; i<n; ++i) {
02516                                 AttributeList *list=array[i];
02517                                         stream << "\t\tItem" << endl;
02518                                                         stream << "\t\t";
02519         Macro_PersonIdentificationMacro(list).write(stream,list,dict);
02520                                                         stream << "\t\t";
02521         stream << "\tEndMacro <PersonIdentificationMacro>\n";
02522 
02523                         }
02524                 }
02525         }
02526         if (PhysicianReadingStudy) {
02527                 stream << "\t\t";
02528                 PhysicianReadingStudy->write(stream,dict);
02529                 stream << "\n";
02530         }
02531         else
02532                 stream << "\t\tElement <PhysicianReadingStudy> not present\n";
02533 
02534         if (PhysicianReadingStudyIdentificationSequence)
02535                 stream << "\t\tSequence <PhysicianReadingStudyIdentificationSequence>\n";
02536         else
02537                 stream << "\t\tSequence <PhysicianReadingStudyIdentificationSequence> not present\n";
02538         if (PhysicianReadingStudyIdentificationSequence && strcmp(PhysicianReadingStudyIdentificationSequence->getVR(),"SQ") == 0) {
02539                 AttributeList **array;
02540                 int n;
02541                 if ((n=PhysicianReadingStudyIdentificationSequence->getLists(&array)) > 0) {
02542                         int i; for (i=0; i<n; ++i) {
02543                                 AttributeList *list=array[i];
02544                                         stream << "\t\tItem" << endl;
02545                                                         stream << "\t\t";
02546         Macro_PersonIdentificationMacro(list).write(stream,list,dict);
02547                                                         stream << "\t\t";
02548         stream << "\tEndMacro <PersonIdentificationMacro>\n";
02549 
02550                         }
02551                 }
02552         }
02553         if (ReferencedStudySequence)
02554                 stream << "\t\tSequence <ReferencedStudySequence>\n";
02555         else
02556                 stream << "\t\tSequence <ReferencedStudySequence> not present\n";
02557         if (ReferencedStudySequence && strcmp(ReferencedStudySequence->getVR(),"SQ") == 0) {
02558                 AttributeList **array;
02559                 int n;
02560                 if ((n=ReferencedStudySequence->getLists(&array)) > 0) {
02561                         int i; for (i=0; i<n; ++i) {
02562                                 AttributeList *list=array[i];
02563                                         stream << "\t\tItem" << endl;
02564                                                         stream << "\t\t";
02565         Macro_SOPInstanceReferenceMacro(list).write(stream,list,dict);
02566                                                         stream << "\t\t";
02567         stream << "\tEndMacro <SOPInstanceReferenceMacro>\n";
02568 
02569                         }
02570                 }
02571         }
02572         if (ProcedureCodeSequence)
02573                 stream << "\t\tSequence <ProcedureCodeSequence>\n";
02574         else
02575                 stream << "\t\tSequence <ProcedureCodeSequence> not present\n";
02576         if (ProcedureCodeSequence && strcmp(ProcedureCodeSequence->getVR(),"SQ") == 0) {
02577                 AttributeList **array;
02578                 int n;
02579                 if ((n=ProcedureCodeSequence->getLists(&array)) > 0) {
02580                         int i; for (i=0; i<n; ++i) {
02581                                 AttributeList *list=array[i];
02582                                         stream << "\t\tItem" << endl;
02583                                                         stream << "\t\t";
02584         Macro_CodeSequenceMacro(list).write(stream,list,dict);
02585                                                         stream << "\t\t";
02586         stream << "\tEndMacro <CodeSequenceMacro>\n";
02587 
02588                         }
02589                 }
02590         }
02591 }
02592 
02593 void
02594 Module_PatientStudy::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
02595 {
02596         stream << "\tModule <PatientStudy>\n";
02597 
02598         if (AdmittingDiagnosesDescription) {
02599                 stream << "\t\t";
02600                 AdmittingDiagnosesDescription->write(stream,dict);
02601                 stream << "\n";
02602         }
02603         else
02604                 stream << "\t\tElement <AdmittingDiagnosesDescription> not present\n";
02605 
02606         if (AdmittingDiagnosesCodeSequence)
02607                 stream << "\t\tSequence <AdmittingDiagnosesCodeSequence>\n";
02608         else
02609                 stream << "\t\tSequence <AdmittingDiagnosesCodeSequence> not present\n";
02610         if (AdmittingDiagnosesCodeSequence && strcmp(AdmittingDiagnosesCodeSequence->getVR(),"SQ") == 0) {
02611                 AttributeList **array;
02612                 int n;
02613                 if ((n=AdmittingDiagnosesCodeSequence->getLists(&array)) > 0) {
02614                         int i; for (i=0; i<n; ++i) {
02615                                 AttributeList *list=array[i];
02616                                         stream << "\t\tItem" << endl;
02617                                                         stream << "\t\t";
02618         Macro_CodeSequenceMacro(list).write(stream,list,dict);
02619                                                         stream << "\t\t";
02620         stream << "\tEndMacro <CodeSequenceMacro>\n";
02621 
02622                         }
02623                 }
02624         }
02625         if (PatientAge) {
02626                 stream << "\t\t";
02627                 PatientAge->write(stream,dict);
02628                 stream << "\n";
02629         }
02630         else
02631                 stream << "\t\tElement <PatientAge> not present\n";
02632 
02633         if (PatientSize) {
02634                 stream << "\t\t";
02635                 PatientSize->write(stream,dict);
02636                 stream << "\n";
02637         }
02638         else
02639                 stream << "\t\tElement <PatientSize> not present\n";
02640 
02641         if (PatientWeight) {
02642                 stream << "\t\t";
02643                 PatientWeight->write(stream,dict);
02644                 stream << "\n";
02645         }
02646         else
02647                 stream << "\t\tElement <PatientWeight> not present\n";
02648 
02649         if (Occupation) {
02650                 stream << "\t\t";
02651                 Occupation->write(stream,dict);
02652                 stream << "\n";
02653         }
02654         else
02655                 stream << "\t\tElement <Occupation> not present\n";
02656 
02657         if (AdditionalPatientHistory) {
02658                 stream << "\t\t";
02659                 AdditionalPatientHistory->write(stream,dict);
02660                 stream << "\n";
02661         }
02662         else
02663                 stream << "\t\tElement <AdditionalPatientHistory> not present\n";
02664 
02665         if (AdmissionID) {
02666                 stream << "\t\t";
02667                 AdmissionID->write(stream,dict);
02668                 stream << "\n";
02669         }
02670         else
02671                 stream << "\t\tElement <AdmissionID> not present\n";
02672 
02673         if (IssuerOfAdmissionID) {
02674                 stream << "\t\t";
02675                 IssuerOfAdmissionID->write(stream,dict);
02676                 stream << "\n";
02677         }
02678         else
02679                 stream << "\t\tElement <IssuerOfAdmissionID> not present\n";
02680 
02681         if (IssuerOfAdmissionIDSequence)
02682                 stream << "\t\tSequence <IssuerOfAdmissionIDSequence>\n";
02683         else
02684                 stream << "\t\tSequence <IssuerOfAdmissionIDSequence> not present\n";
02685         if (IssuerOfAdmissionIDSequence && strcmp(IssuerOfAdmissionIDSequence->getVR(),"SQ") == 0) {
02686                 AttributeList **array;
02687                 int n;
02688                 if ((n=IssuerOfAdmissionIDSequence->getLists(&array)) > 0) {
02689                         int i; for (i=0; i<n; ++i) {
02690                                 AttributeList *list=array[i];
02691                                         stream << "\t\tItem" << endl;
02692                                                         stream << "\t\t";
02693         Macro_HL7v2HierarchicDesignatorMacro(list).write(stream,list,dict);
02694                                                         stream << "\t\t";
02695         stream << "\tEndMacro <HL7v2HierarchicDesignatorMacro>\n";
02696 
02697                         }
02698                 }
02699         }
02700         if (ServiceEpisodeID) {
02701                 stream << "\t\t";
02702                 ServiceEpisodeID->write(stream,dict);
02703                 stream << "\n";
02704         }
02705         else
02706                 stream << "\t\tElement <ServiceEpisodeID> not present\n";
02707 
02708         if (IssuerOfServiceEpisodeIDSequence)
02709                 stream << "\t\tSequence <IssuerOfServiceEpisodeIDSequence>\n";
02710         else
02711                 stream << "\t\tSequence <IssuerOfServiceEpisodeIDSequence> not present\n";
02712         if (IssuerOfServiceEpisodeIDSequence && strcmp(IssuerOfServiceEpisodeIDSequence->getVR(),"SQ") == 0) {
02713                 AttributeList **array;
02714                 int n;
02715                 if ((n=IssuerOfServiceEpisodeIDSequence->getLists(&array)) > 0) {
02716                         int i; for (i=0; i<n; ++i) {
02717                                 AttributeList *list=array[i];
02718                                         stream << "\t\tItem" << endl;
02719                                                         stream << "\t\t";
02720         Macro_HL7v2HierarchicDesignatorMacro(list).write(stream,list,dict);
02721                                                         stream << "\t\t";
02722         stream << "\tEndMacro <HL7v2HierarchicDesignatorMacro>\n";
02723 
02724                         }
02725                 }
02726         }
02727         if (ServiceEpisodeDescription) {
02728                 stream << "\t\t";
02729                 ServiceEpisodeDescription->write(stream,dict);
02730                 stream << "\n";
02731         }
02732         else
02733                 stream << "\t\tElement <ServiceEpisodeDescription> not present\n";
02734 
02735         if (PatientSexNeutered) {
02736                 stream << "\t\t";
02737                 PatientSexNeutered->write(stream,dict);
02738                 stream << "\n";
02739         }
02740         else
02741                 stream << "\t\tElement <PatientSexNeutered> not present\n";
02742 
02743 }
02744 
02745 void
02746 Module_ClinicalTrialStudy::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
02747 {
02748         stream << "\tModule <ClinicalTrialStudy>\n";
02749 
02750         if (ClinicalTrialTimePointID) {
02751                 stream << "\t\t";
02752                 ClinicalTrialTimePointID->write(stream,dict);
02753                 stream << "\n";
02754         }
02755         else
02756                 stream << "\t\tElement <ClinicalTrialTimePointID> not present\n";
02757 
02758         if (ClinicalTrialTimePointDescription) {
02759                 stream << "\t\t";
02760                 ClinicalTrialTimePointDescription->write(stream,dict);
02761                 stream << "\n";
02762         }
02763         else
02764                 stream << "\t\tElement <ClinicalTrialTimePointDescription> not present\n";
02765 
02766 }
02767 
02768 void
02769 Module_GeneralSeries::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
02770 {
02771         stream << "\tModule <GeneralSeries>\n";
02772 
02773         if (Modality) {
02774                 stream << "\t\t";
02775                 Modality->write(stream,dict);
02776                 stream << "\n";
02777         }
02778         else
02779                 stream << "\t\tElement <Modality> not present\n";
02780 
02781         if (SeriesInstanceUID) {
02782                 stream << "\t\t";
02783                 SeriesInstanceUID->write(stream,dict);
02784                 stream << "\n";
02785         }
02786         else
02787                 stream << "\t\tElement <SeriesInstanceUID> not present\n";
02788 
02789         if (SeriesNumber) {
02790                 stream << "\t\t";
02791                 SeriesNumber->write(stream,dict);
02792                 stream << "\n";
02793         }
02794         else
02795                 stream << "\t\tElement <SeriesNumber> not present\n";
02796 
02797         if (Laterality) {
02798                 stream << "\t\t";
02799                 Laterality->write(stream,dict);
02800                 stream << "\n";
02801         }
02802         else
02803                 stream << "\t\tElement <Laterality> not present\n";
02804 
02805         if (SeriesDate) {
02806                 stream << "\t\t";
02807                 SeriesDate->write(stream,dict);
02808                 stream << "\n";
02809         }
02810         else
02811                 stream << "\t\tElement <SeriesDate> not present\n";
02812 
02813         if (SeriesTime) {
02814                 stream << "\t\t";
02815                 SeriesTime->write(stream,dict);
02816                 stream << "\n";
02817         }
02818         else
02819                 stream << "\t\tElement <SeriesTime> not present\n";
02820 
02821         if (PerformingPhysicianName) {
02822                 stream << "\t\t";
02823                 PerformingPhysicianName->write(stream,dict);
02824                 stream << "\n";
02825         }
02826         else
02827                 stream << "\t\tElement <PerformingPhysicianName> not present\n";
02828 
02829         if (PerformingPhysicianIdentificationSequence)
02830                 stream << "\t\tSequence <PerformingPhysicianIdentificationSequence>\n";
02831         else
02832                 stream << "\t\tSequence <PerformingPhysicianIdentificationSequence> not present\n";
02833         if (PerformingPhysicianIdentificationSequence && strcmp(PerformingPhysicianIdentificationSequence->getVR(),"SQ") == 0) {
02834                 AttributeList **array;
02835                 int n;
02836                 if ((n=PerformingPhysicianIdentificationSequence->getLists(&array)) > 0) {
02837                         int i; for (i=0; i<n; ++i) {
02838                                 AttributeList *list=array[i];
02839                                         stream << "\t\tItem" << endl;
02840                                                         stream << "\t\t";
02841         Macro_PersonIdentificationMacro(list).write(stream,list,dict);
02842                                                         stream << "\t\t";
02843         stream << "\tEndMacro <PersonIdentificationMacro>\n";
02844 
02845                         }
02846                 }
02847         }
02848         if (ProtocolName) {
02849                 stream << "\t\t";
02850                 ProtocolName->write(stream,dict);
02851                 stream << "\n";
02852         }
02853         else
02854                 stream << "\t\tElement <ProtocolName> not present\n";
02855 
02856         if (SeriesDescription) {
02857                 stream << "\t\t";
02858                 SeriesDescription->write(stream,dict);
02859                 stream << "\n";
02860         }
02861         else
02862                 stream << "\t\tElement <SeriesDescription> not present\n";
02863 
02864         if (OperatorName) {
02865                 stream << "\t\t";
02866                 OperatorName->write(stream,dict);
02867                 stream << "\n";
02868         }
02869         else
02870                 stream << "\t\tElement <OperatorName> not present\n";
02871 
02872         if (OperatorIdentificationSequence)
02873                 stream << "\t\tSequence <OperatorIdentificationSequence>\n";
02874         else
02875                 stream << "\t\tSequence <OperatorIdentificationSequence> not present\n";
02876         if (OperatorIdentificationSequence && strcmp(OperatorIdentificationSequence->getVR(),"SQ") == 0) {
02877                 AttributeList **array;
02878                 int n;
02879                 if ((n=OperatorIdentificationSequence->getLists(&array)) > 0) {
02880                         int i; for (i=0; i<n; ++i) {
02881                                 AttributeList *list=array[i];
02882                                         stream << "\t\tItem" << endl;
02883                                                         stream << "\t\t";
02884         Macro_PersonIdentificationMacro(list).write(stream,list,dict);
02885                                                         stream << "\t\t";
02886         stream << "\tEndMacro <PersonIdentificationMacro>\n";
02887 
02888                         }
02889                 }
02890         }
02891         if (ReferencedPerformedProcedureStepSequence)
02892                 stream << "\t\tSequence <ReferencedPerformedProcedureStepSequence>\n";
02893         else
02894                 stream << "\t\tSequence <ReferencedPerformedProcedureStepSequence> not present\n";
02895         if (ReferencedPerformedProcedureStepSequence && strcmp(ReferencedPerformedProcedureStepSequence->getVR(),"SQ") == 0) {
02896                 AttributeList **array;
02897                 int n;
02898                 if ((n=ReferencedPerformedProcedureStepSequence->getLists(&array)) > 0) {
02899                         int i; for (i=0; i<n; ++i) {
02900                                 AttributeList *list=array[i];
02901                                         stream << "\t\tItem" << endl;
02902                                                         stream << "\t\t";
02903         Macro_SOPInstanceReferenceMacro(list).write(stream,list,dict);
02904                                                         stream << "\t\t";
02905         stream << "\tEndMacro <SOPInstanceReferenceMacro>\n";
02906 
02907                         }
02908                 }
02909         }
02910         if (RelatedSeriesSequence)
02911                 stream << "\t\tSequence <RelatedSeriesSequence>\n";
02912         else
02913                 stream << "\t\tSequence <RelatedSeriesSequence> not present\n";
02914         if (RelatedSeriesSequence && strcmp(RelatedSeriesSequence->getVR(),"SQ") == 0) {
02915                 AttributeList **array;
02916                 int n;
02917                 if ((n=RelatedSeriesSequence->getLists(&array)) > 0) {
02918                         int i; for (i=0; i<n; ++i) {
02919                                 AttributeList *list=array[i];
02920                                         stream << "\t\tItem" << endl;
02921                                 Attribute *StudyInstanceUID = (*list)[TagFromName(StudyInstanceUID)];
02922                                 stream << "\t";
02923                                 if (StudyInstanceUID) {
02924                                         stream << "\t\t";
02925                                         StudyInstanceUID->write(stream,dict);
02926                                         stream << "\n";
02927                                 }
02928                                 else
02929                                         stream << "\t\tElement <StudyInstanceUID> not present\n";
02930 
02931                                 Attribute *SeriesInstanceUID = (*list)[TagFromName(SeriesInstanceUID)];
02932                                 stream << "\t";
02933                                 if (SeriesInstanceUID) {
02934                                         stream << "\t\t";
02935                                         SeriesInstanceUID->write(stream,dict);
02936                                         stream << "\n";
02937                                 }
02938                                 else
02939                                         stream << "\t\tElement <SeriesInstanceUID> not present\n";
02940 
02941         Attribute *PurposeOfReferenceCodeSequence = (*list)[TagFromName(PurposeOfReferenceCodeSequence)];
02942                                 stream << "\t";
02943                                 if (PurposeOfReferenceCodeSequence)
02944                                         stream << "\t\tSequence <PurposeOfReferenceCodeSequence>\n";
02945                                 else
02946                                         stream << "\t\tSequence <PurposeOfReferenceCodeSequence> not present\n";
02947                                 if (PurposeOfReferenceCodeSequence && strcmp(PurposeOfReferenceCodeSequence->getVR(),"SQ") == 0) {
02948                                         AttributeList **array;
02949                                         int n;
02950                                         if ((n=PurposeOfReferenceCodeSequence->getLists(&array)) > 0) {
02951                                                 int i; for (i=0; i<n; ++i) {
02952                                                         AttributeList *list=array[i];
02953                                 stream << "\t";
02954                                                                 stream << "\t\tItem" << endl;
02955                                                                                 stream << "\t\t\t";
02956         Macro_CodeSequenceMacro(list).write(stream,list,dict);
02957                                                                                 stream << "\t\t\t";
02958         stream << "\tEndMacro <CodeSequenceMacro>\n";
02959 
02960                                                 }
02961                                         }
02962                                 }
02963                         }
02964                 }
02965         }
02966         if (BodyPartExamined) {
02967                 stream << "\t\t";
02968                 BodyPartExamined->write(stream,dict);
02969                 stream << "\n";
02970         }
02971         else
02972                 stream << "\t\tElement <BodyPartExamined> not present\n";
02973 
02974         if (PatientPosition) {
02975                 stream << "\t\t";
02976                 PatientPosition->write(stream,dict);
02977                 stream << "\n";
02978         }
02979         else
02980                 stream << "\t\tElement <PatientPosition> not present\n";
02981 
02982         if (SmallestPixelValueInSeries) {
02983                 stream << "\t\t";
02984                 SmallestPixelValueInSeries->write(stream,dict);
02985                 stream << "\n";
02986         }
02987         else
02988                 stream << "\t\tElement <SmallestPixelValueInSeries> not present\n";
02989 
02990         if (LargestPixelValueInSeries) {
02991                 stream << "\t\t";
02992                 LargestPixelValueInSeries->write(stream,dict);
02993                 stream << "\n";
02994         }
02995         else
02996                 stream << "\t\tElement <LargestPixelValueInSeries> not present\n";
02997 
02998         if (RequestAttributesSequence)
02999                 stream << "\t\tSequence <RequestAttributesSequence>\n";
03000         else
03001                 stream << "\t\tSequence <RequestAttributesSequence> not present\n";
03002         if (RequestAttributesSequence && strcmp(RequestAttributesSequence->getVR(),"SQ") == 0) {
03003                 AttributeList **array;
03004                 int n;
03005                 if ((n=RequestAttributesSequence->getLists(&array)) > 0) {
03006                         int i; for (i=0; i<n; ++i) {
03007                                 AttributeList *list=array[i];
03008                                         stream << "\t\tItem" << endl;
03009                                                         stream << "\t\t";
03010         Macro_RequestAttributesMacro(list).write(stream,list,dict);
03011                                                         stream << "\t\t";
03012         stream << "\tEndMacro <RequestAttributesMacro>\n";
03013 
03014                         }
03015                 }
03016         }
03017                                 stream << "\t";
03018         Macro_PerformedProcedureStepSummaryMacro(list).write(stream,list,dict);
03019                                 stream << "\t";
03020         stream << "\tEndMacro <PerformedProcedureStepSummaryMacro>\n";
03021 
03022 }
03023 
03024 void
03025 Module_ClinicalTrialSeries::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
03026 {
03027         stream << "\tModule <ClinicalTrialSeries>\n";
03028 
03029         if (ClinicalTrialCoordinatingCenterName) {
03030                 stream << "\t\t";
03031                 ClinicalTrialCoordinatingCenterName->write(stream,dict);
03032                 stream << "\n";
03033         }
03034         else
03035                 stream << "\t\tElement <ClinicalTrialCoordinatingCenterName> not present\n";
03036 
03037         if (ClinicalTrialSeriesID) {
03038                 stream << "\t\t";
03039                 ClinicalTrialSeriesID->write(stream,dict);
03040                 stream << "\n";
03041         }
03042         else
03043                 stream << "\t\tElement <ClinicalTrialSeriesID> not present\n";
03044 
03045         if (ClinicalTrialSeriesDescription) {
03046                 stream << "\t\t";
03047                 ClinicalTrialSeriesDescription->write(stream,dict);
03048                 stream << "\n";
03049         }
03050         else
03051                 stream << "\t\tElement <ClinicalTrialSeriesDescription> not present\n";
03052 
03053 }
03054 
03055 void
03056 Module_EnhancedSeries::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
03057 {
03058         stream << "\tModule <EnhancedSeries>\n";
03059 
03060         if (SeriesNumber) {
03061                 stream << "\t\t";
03062                 SeriesNumber->write(stream,dict);
03063                 stream << "\n";
03064         }
03065         else
03066                 stream << "\t\tElement <SeriesNumber> not present\n";
03067 
03068         if (ReferencedPerformedProcedureStepSequence)
03069                 stream << "\t\tSequence <ReferencedPerformedProcedureStepSequence>\n";
03070         else
03071                 stream << "\t\tSequence <ReferencedPerformedProcedureStepSequence> not present\n";
03072         if (ReferencedPerformedProcedureStepSequence && strcmp(ReferencedPerformedProcedureStepSequence->getVR(),"SQ") == 0) {
03073                 AttributeList **array;
03074                 int n;
03075                 if ((n=ReferencedPerformedProcedureStepSequence->getLists(&array)) > 0) {
03076                         int i; for (i=0; i<n; ++i) {
03077                                 AttributeList *list=array[i];
03078                                         stream << "\t\tItem" << endl;
03079                                                         stream << "\t\t";
03080         Macro_SOPInstanceReferenceMacro(list).write(stream,list,dict);
03081                                                         stream << "\t\t";
03082         stream << "\tEndMacro <SOPInstanceReferenceMacro>\n";
03083 
03084                         }
03085                 }
03086         }
03087 }
03088 
03089 void
03090 Module_FrameOfReference::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
03091 {
03092         stream << "\tModule <FrameOfReference>\n";
03093 
03094         if (FrameOfReferenceUID) {
03095                 stream << "\t\t";
03096                 FrameOfReferenceUID->write(stream,dict);
03097                 stream << "\n";
03098         }
03099         else
03100                 stream << "\t\tElement <FrameOfReferenceUID> not present\n";
03101 
03102         if (PositionReferenceIndicator) {
03103                 stream << "\t\t";
03104                 PositionReferenceIndicator->write(stream,dict);
03105                 stream << "\n";
03106         }
03107         else
03108                 stream << "\t\tElement <PositionReferenceIndicator> not present\n";
03109 
03110 }
03111 
03112 void
03113 Module_GeneralEquipment::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
03114 {
03115         stream << "\tModule <GeneralEquipment>\n";
03116 
03117         if (Manufacturer) {
03118                 stream << "\t\t";
03119                 Manufacturer->write(stream,dict);
03120                 stream << "\n";
03121         }
03122         else
03123                 stream << "\t\tElement <Manufacturer> not present\n";
03124 
03125         if (InstitutionName) {
03126                 stream << "\t\t";
03127                 InstitutionName->write(stream,dict);
03128                 stream << "\n";
03129         }
03130         else
03131                 stream << "\t\tElement <InstitutionName> not present\n";
03132 
03133         if (InstitutionAddress) {
03134                 stream << "\t\t";
03135                 InstitutionAddress->write(stream,dict);
03136                 stream << "\n";
03137         }
03138         else
03139                 stream << "\t\tElement <InstitutionAddress> not present\n";
03140 
03141         if (StationName) {
03142                 stream << "\t\t";
03143                 StationName->write(stream,dict);
03144                 stream << "\n";
03145         }
03146         else
03147                 stream << "\t\tElement <StationName> not present\n";
03148 
03149         if (InstitutionalDepartmentName) {
03150                 stream << "\t\t";
03151                 InstitutionalDepartmentName->write(stream,dict);
03152                 stream << "\n";
03153         }
03154         else
03155                 stream << "\t\tElement <InstitutionalDepartmentName> not present\n";
03156 
03157         if (ManufacturerModelName) {
03158                 stream << "\t\t";
03159                 ManufacturerModelName->write(stream,dict);
03160                 stream << "\n";
03161         }
03162         else
03163                 stream << "\t\tElement <ManufacturerModelName> not present\n";
03164 
03165         if (DeviceSerialNumber) {
03166                 stream << "\t\t";
03167                 DeviceSerialNumber->write(stream,dict);
03168                 stream << "\n";
03169         }
03170         else
03171                 stream << "\t\tElement <DeviceSerialNumber> not present\n";
03172 
03173         if (SoftwareVersion) {
03174                 stream << "\t\t";
03175                 SoftwareVersion->write(stream,dict);
03176                 stream << "\n";
03177         }
03178         else
03179                 stream << "\t\tElement <SoftwareVersion> not present\n";
03180 
03181         if (GantryID) {
03182                 stream << "\t\t";
03183                 GantryID->write(stream,dict);
03184                 stream << "\n";
03185         }
03186         else
03187                 stream << "\t\tElement <GantryID> not present\n";
03188 
03189         if (SpatialResolution) {
03190                 stream << "\t\t";
03191                 SpatialResolution->write(stream,dict);
03192                 stream << "\n";
03193         }
03194         else
03195                 stream << "\t\tElement <SpatialResolution> not present\n";
03196 
03197         if (DateOfLastCalibration) {
03198                 stream << "\t\t";
03199                 DateOfLastCalibration->write(stream,dict);
03200                 stream << "\n";
03201         }
03202         else
03203                 stream << "\t\tElement <DateOfLastCalibration> not present\n";
03204 
03205         if (TimeOfLastCalibration) {
03206                 stream << "\t\t";
03207                 TimeOfLastCalibration->write(stream,dict);
03208                 stream << "\n";
03209         }
03210         else
03211                 stream << "\t\tElement <TimeOfLastCalibration> not present\n";
03212 
03213         if (PixelPaddingValue) {
03214                 stream << "\t\t";
03215                 PixelPaddingValue->write(stream,dict);
03216                 stream << "\n";
03217         }
03218         else
03219                 stream << "\t\tElement <PixelPaddingValue> not present\n";
03220 
03221 }
03222 
03223 void
03224 Module_EnhancedGeneralEquipment::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
03225 {
03226         stream << "\tModule <EnhancedGeneralEquipment>\n";
03227 
03228         if (Manufacturer) {
03229                 stream << "\t\t";
03230                 Manufacturer->write(stream,dict);
03231                 stream << "\n";
03232         }
03233         else
03234                 stream << "\t\tElement <Manufacturer> not present\n";
03235 
03236         if (ManufacturerModelName) {
03237                 stream << "\t\t";
03238                 ManufacturerModelName->write(stream,dict);
03239                 stream << "\n";
03240         }
03241         else
03242                 stream << "\t\tElement <ManufacturerModelName> not present\n";
03243 
03244         if (DeviceSerialNumber) {
03245                 stream << "\t\t";
03246                 DeviceSerialNumber->write(stream,dict);
03247                 stream << "\n";
03248         }
03249         else
03250                 stream << "\t\tElement <DeviceSerialNumber> not present\n";
03251 
03252         if (SoftwareVersion) {
03253                 stream << "\t\t";
03254                 SoftwareVersion->write(stream,dict);
03255                 stream << "\n";
03256         }
03257         else
03258                 stream << "\t\tElement <SoftwareVersion> not present\n";
03259 
03260 }
03261 
03262 void
03263 Module_GeneralImage::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
03264 {
03265         stream << "\tModule <GeneralImage>\n";
03266 
03267         if (InstanceNumber) {
03268                 stream << "\t\t";
03269                 InstanceNumber->write(stream,dict);
03270                 stream << "\n";
03271         }
03272         else
03273                 stream << "\t\tElement <InstanceNumber> not present\n";
03274 
03275         if (PatientOrientation) {
03276                 stream << "\t\t";
03277                 PatientOrientation->write(stream,dict);
03278                 stream << "\n";
03279         }
03280         else
03281                 stream << "\t\tElement <PatientOrientation> not present\n";
03282 
03283         if (ContentDate) {
03284                 stream << "\t\t";
03285                 ContentDate->write(stream,dict);
03286                 stream << "\n";
03287         }
03288         else
03289                 stream << "\t\tElement <ContentDate> not present\n";
03290 
03291         if (ContentTime) {
03292                 stream << "\t\t";
03293                 ContentTime->write(stream,dict);
03294                 stream << "\n";
03295         }
03296         else
03297                 stream << "\t\tElement <ContentTime> not present\n";
03298 
03299         if (ImageType) {
03300                 stream << "\t\t";
03301                 ImageType->write(stream,dict);
03302                 stream << "\n";
03303         }
03304         else
03305                 stream << "\t\tElement <ImageType> not present\n";
03306 
03307         if (AcquisitionNumber) {
03308                 stream << "\t\t";
03309                 AcquisitionNumber->write(stream,dict);
03310                 stream << "\n";
03311         }
03312         else
03313                 stream << "\t\tElement <AcquisitionNumber> not present\n";
03314 
03315         if (AcquisitionDate) {
03316                 stream << "\t\t";
03317                 AcquisitionDate->write(stream,dict);
03318                 stream << "\n";
03319         }
03320         else
03321                 stream << "\t\tElement <AcquisitionDate> not present\n";
03322 
03323         if (AcquisitionTime) {
03324                 stream << "\t\t";
03325                 AcquisitionTime->write(stream,dict);
03326                 stream << "\n";
03327         }
03328         else
03329                 stream << "\t\tElement <AcquisitionTime> not present\n";
03330 
03331         if (AcquisitionDateTime) {
03332                 stream << "\t\t";
03333                 AcquisitionDateTime->write(stream,dict);
03334                 stream << "\n";
03335         }
03336         else
03337                 stream << "\t\tElement <AcquisitionDateTime> not present\n";
03338 
03339         if (ReferencedImageSequence)
03340                 stream << "\t\tSequence <ReferencedImageSequence>\n";
03341         else
03342                 stream << "\t\tSequence <ReferencedImageSequence> not present\n";
03343         if (ReferencedImageSequence && strcmp(ReferencedImageSequence->getVR(),"SQ") == 0) {
03344                 AttributeList **array;
03345                 int n;
03346                 if ((n=ReferencedImageSequence->getLists(&array)) > 0) {
03347                         int i; for (i=0; i<n; ++i) {
03348                                 AttributeList *list=array[i];
03349                                         stream << "\t\tItem" << endl;
03350                                                         stream << "\t\t";
03351         Macro_ImageSOPInstanceReferenceMacro(list).write(stream,list,dict);
03352                                                         stream << "\t\t";
03353         stream << "\tEndMacro <ImageSOPInstanceReferenceMacro>\n";
03354 
03355         Attribute *PurposeOfReferenceCodeSequence = (*list)[TagFromName(PurposeOfReferenceCodeSequence)];
03356                                 stream << "\t";
03357                                 if (PurposeOfReferenceCodeSequence)
03358                                         stream << "\t\tSequence <PurposeOfReferenceCodeSequence>\n";
03359                                 else
03360                                         stream << "\t\tSequence <PurposeOfReferenceCodeSequence> not present\n";
03361                                 if (PurposeOfReferenceCodeSequence && strcmp(PurposeOfReferenceCodeSequence->getVR(),"SQ") == 0) {
03362                                         AttributeList **array;
03363                                         int n;
03364                                         if ((n=PurposeOfReferenceCodeSequence->getLists(&array)) > 0) {
03365                                                 int i; for (i=0; i<n; ++i) {
03366                                                         AttributeList *list=array[i];
03367                                 stream << "\t";
03368                                                                 stream << "\t\tItem" << endl;
03369                                                                                 stream << "\t\t\t";
03370         Macro_CodeSequenceMacro(list).write(stream,list,dict);
03371                                                                                 stream << "\t\t\t";
03372         stream << "\tEndMacro <CodeSequenceMacro>\n";
03373 
03374                                                 }
03375                                         }
03376                                 }
03377                         }
03378                 }
03379         }
03380         if (DerivationDescription) {
03381                 stream << "\t\t";
03382                 DerivationDescription->write(stream,dict);
03383                 stream << "\n";
03384         }
03385         else
03386                 stream << "\t\tElement <DerivationDescription> not present\n";
03387 
03388         if (DerivationCodeSequence)
03389                 stream << "\t\tSequence <DerivationCodeSequence>\n";
03390         else
03391                 stream << "\t\tSequence <DerivationCodeSequence> not present\n";
03392         if (DerivationCodeSequence && strcmp(DerivationCodeSequence->getVR(),"SQ") == 0) {
03393                 AttributeList **array;
03394                 int n;
03395                 if ((n=DerivationCodeSequence->getLists(&array)) > 0) {
03396                         int i; for (i=0; i<n; ++i) {
03397                                 AttributeList *list=array[i];
03398                                         stream << "\t\tItem" << endl;
03399                                                         stream << "\t\t";
03400         Macro_CodeSequenceMacro(list).write(stream,list,dict);
03401                                                         stream << "\t\t";
03402         stream << "\tEndMacro <CodeSequenceMacro>\n";
03403 
03404                         }
03405                 }
03406         }
03407         if (SourceImageSequence)
03408                 stream << "\t\tSequence <SourceImageSequence>\n";
03409         else
03410                 stream << "\t\tSequence <SourceImageSequence> not present\n";
03411         if (SourceImageSequence && strcmp(SourceImageSequence->getVR(),"SQ") == 0) {
03412                 AttributeList **array;
03413                 int n;
03414                 if ((n=SourceImageSequence->getLists(&array)) > 0) {
03415                         int i; for (i=0; i<n; ++i) {
03416                                 AttributeList *list=array[i];
03417                                         stream << "\t\tItem" << endl;
03418                                                         stream << "\t\t";
03419         Macro_ImageSOPInstanceReferenceMacro(list).write(stream,list,dict);
03420                                                         stream << "\t\t";
03421         stream << "\tEndMacro <ImageSOPInstanceReferenceMacro>\n";
03422 
03423         Attribute *PurposeOfReferenceCodeSequence = (*list)[TagFromName(PurposeOfReferenceCodeSequence)];
03424                                 stream << "\t";
03425                                 if (PurposeOfReferenceCodeSequence)
03426                                         stream << "\t\tSequence <PurposeOfReferenceCodeSequence>\n";
03427                                 else
03428                                         stream << "\t\tSequence <PurposeOfReferenceCodeSequence> not present\n";
03429                                 if (PurposeOfReferenceCodeSequence && strcmp(PurposeOfReferenceCodeSequence->getVR(),"SQ") == 0) {
03430                                         AttributeList **array;
03431                                         int n;
03432                                         if ((n=PurposeOfReferenceCodeSequence->getLists(&array)) > 0) {
03433                                                 int i; for (i=0; i<n; ++i) {
03434                                                         AttributeList *list=array[i];
03435                                 stream << "\t";
03436                                                                 stream << "\t\tItem" << endl;
03437                                                                                 stream << "\t\t\t";
03438         Macro_CodeSequenceMacro(list).write(stream,list,dict);
03439                                                                                 stream << "\t\t\t";
03440         stream << "\tEndMacro <CodeSequenceMacro>\n";
03441 
03442                                                 }
03443                                         }
03444                                 }
03445                                 Attribute *SpatialLocationsPreserved = (*list)[TagFromName(SpatialLocationsPreserved)];
03446                                 stream << "\t";
03447                                 if (SpatialLocationsPreserved) {
03448                                         stream << "\t\t";
03449                                         SpatialLocationsPreserved->write(stream,dict);
03450                                         stream << "\n";
03451                                 }
03452                                 else
03453                                         stream << "\t\tElement <SpatialLocationsPreserved> not present\n";
03454 
03455                                 Attribute *PatientOrientation = (*list)[TagFromName(PatientOrientation)];
03456                                 stream << "\t";
03457                                 if (PatientOrientation) {
03458                                         stream << "\t\t";
03459                                         PatientOrientation->write(stream,dict);
03460                                         stream << "\n";
03461                                 }
03462                                 else
03463                                         stream << "\t\tElement <PatientOrientation> not present\n";
03464 
03465                         }
03466                 }
03467         }
03468         if (ReferencedInstanceSequence)
03469                 stream << "\t\tSequence <ReferencedInstanceSequence>\n";
03470         else
03471                 stream << "\t\tSequence <ReferencedInstanceSequence> not present\n";
03472         if (ReferencedInstanceSequence && strcmp(ReferencedInstanceSequence->getVR(),"SQ") == 0) {
03473                 AttributeList **array;
03474                 int n;
03475                 if ((n=ReferencedInstanceSequence->getLists(&array)) > 0) {
03476                         int i; for (i=0; i<n; ++i) {
03477                                 AttributeList *list=array[i];
03478                                         stream << "\t\tItem" << endl;
03479                                                         stream << "\t\t";
03480         Macro_SOPInstanceReferenceMacro(list).write(stream,list,dict);
03481                                                         stream << "\t\t";
03482         stream << "\tEndMacro <SOPInstanceReferenceMacro>\n";
03483 
03484         Attribute *PurposeOfReferenceCodeSequence = (*list)[TagFromName(PurposeOfReferenceCodeSequence)];
03485                                 stream << "\t";
03486                                 if (PurposeOfReferenceCodeSequence)
03487                                         stream << "\t\tSequence <PurposeOfReferenceCodeSequence>\n";
03488                                 else
03489                                         stream << "\t\tSequence <PurposeOfReferenceCodeSequence> not present\n";
03490                                 if (PurposeOfReferenceCodeSequence && strcmp(PurposeOfReferenceCodeSequence->getVR(),"SQ") == 0) {
03491                                         AttributeList **array;
03492                                         int n;
03493                                         if ((n=PurposeOfReferenceCodeSequence->getLists(&array)) > 0) {
03494                                                 int i; for (i=0; i<n; ++i) {
03495                                                         AttributeList *list=array[i];
03496                                 stream << "\t";
03497                                                                 stream << "\t\tItem" << endl;
03498                                                                                 stream << "\t\t\t";
03499         Macro_CodeSequenceMacro(list).write(stream,list,dict);
03500                                                                                 stream << "\t\t\t";
03501         stream << "\tEndMacro <CodeSequenceMacro>\n";
03502 
03503                                                 }
03504                                         }
03505                                 }
03506                         }
03507                 }
03508         }
03509         if (ImagesInAcquisition) {
03510                 stream << "\t\t";
03511                 ImagesInAcquisition->write(stream,dict);
03512                 stream << "\n";
03513         }
03514         else
03515                 stream << "\t\tElement <ImagesInAcquisition> not present\n";
03516 
03517         if (ImageComments) {
03518                 stream << "\t\t";
03519                 ImageComments->write(stream,dict);
03520                 stream << "\n";
03521         }
03522         else
03523                 stream << "\t\tElement <ImageComments> not present\n";
03524 
03525         if (QualityControlImage) {
03526                 stream << "\t\t";
03527                 QualityControlImage->write(stream,dict);
03528                 stream << "\n";
03529         }
03530         else
03531                 stream << "\t\tElement <QualityControlImage> not present\n";
03532 
03533         if (BurnedInAnnotation) {
03534                 stream << "\t\t";
03535                 BurnedInAnnotation->write(stream,dict);
03536                 stream << "\n";
03537         }
03538         else
03539                 stream << "\t\tElement <BurnedInAnnotation> not present\n";
03540 
03541         if (LossyImageCompression) {
03542                 stream << "\t\t";
03543                 LossyImageCompression->write(stream,dict);
03544                 stream << "\n";
03545         }
03546         else
03547                 stream << "\t\tElement <LossyImageCompression> not present\n";
03548 
03549         if (LossyImageCompressionRatio) {
03550                 stream << "\t\t";
03551                 LossyImageCompressionRatio->write(stream,dict);
03552                 stream << "\n";
03553         }
03554         else
03555                 stream << "\t\tElement <LossyImageCompressionRatio> not present\n";
03556 
03557         if (LossyImageCompressionMethod) {
03558                 stream << "\t\t";
03559                 LossyImageCompressionMethod->write(stream,dict);
03560                 stream << "\n";
03561         }
03562         else
03563                 stream << "\t\tElement <LossyImageCompressionMethod> not present\n";
03564 
03565         if (IconImageSequence)
03566                 stream << "\t\tSequence <IconImageSequence>\n";
03567         else
03568                 stream << "\t\tSequence <IconImageSequence> not present\n";
03569         if (IconImageSequence && strcmp(IconImageSequence->getVR(),"SQ") == 0) {
03570                 AttributeList **array;
03571                 int n;
03572                 if ((n=IconImageSequence->getLists(&array)) > 0) {
03573                         int i; for (i=0; i<n; ++i) {
03574                                 AttributeList *list=array[i];
03575                                         stream << "\t\tItem" << endl;
03576                                                         stream << "\t\t";
03577         Macro_IconImageSequenceMacro(list).write(stream,list,dict);
03578                                                         stream << "\t\t";
03579         stream << "\tEndMacro <IconImageSequenceMacro>\n";
03580 
03581                         }
03582                 }
03583         }
03584         if (PresentationLUTShape) {
03585                 stream << "\t\t";
03586                 PresentationLUTShape->write(stream,dict);
03587                 stream << "\n";
03588         }
03589         else
03590                 stream << "\t\tElement <PresentationLUTShape> not present\n";
03591 
03592         if (IrradiationEventUID) {
03593                 stream << "\t\t";
03594                 IrradiationEventUID->write(stream,dict);
03595                 stream << "\n";
03596         }
03597         else
03598                 stream << "\t\tElement <IrradiationEventUID> not present\n";
03599 
03600 }
03601 
03602 void
03603 Module_ImagePlane::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
03604 {
03605         stream << "\tModule <ImagePlane>\n";
03606 
03607         if (PixelSpacing) {
03608                 stream << "\t\t";
03609                 PixelSpacing->write(stream,dict);
03610                 stream << "\n";
03611         }
03612         else
03613                 stream << "\t\tElement <PixelSpacing> not present\n";
03614 
03615         if (ImageOrientationPatient) {
03616                 stream << "\t\t";
03617                 ImageOrientationPatient->write(stream,dict);
03618                 stream << "\n";
03619         }
03620         else
03621                 stream << "\t\tElement <ImageOrientationPatient> not present\n";
03622 
03623         if (ImagePositionPatient) {
03624                 stream << "\t\t";
03625                 ImagePositionPatient->write(stream,dict);
03626                 stream << "\n";
03627         }
03628         else
03629                 stream << "\t\tElement <ImagePositionPatient> not present\n";
03630 
03631         if (SliceThickness) {
03632                 stream << "\t\t";
03633                 SliceThickness->write(stream,dict);
03634                 stream << "\n";
03635         }
03636         else
03637                 stream << "\t\tElement <SliceThickness> not present\n";
03638 
03639         if (SliceLocation) {
03640                 stream << "\t\t";
03641                 SliceLocation->write(stream,dict);
03642                 stream << "\n";
03643         }
03644         else
03645                 stream << "\t\tElement <SliceLocation> not present\n";
03646 
03647 }
03648 
03649 void
03650 Macro_ImagePixelMacro::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
03651 {
03652         stream << "\tMacro <ImagePixelMacro>\n";
03653 
03654         if (SamplesPerPixel) {
03655                 stream << "\t\t";
03656                 SamplesPerPixel->write(stream,dict);
03657                 stream << "\n";
03658         }
03659         else
03660                 stream << "\t\tElement <SamplesPerPixel> not present\n";
03661 
03662         if (PhotometricInterpretation) {
03663                 stream << "\t\t";
03664                 PhotometricInterpretation->write(stream,dict);
03665                 stream << "\n";
03666         }
03667         else
03668                 stream << "\t\tElement <PhotometricInterpretation> not present\n";
03669 
03670         if (Rows) {
03671                 stream << "\t\t";
03672                 Rows->write(stream,dict);
03673                 stream << "\n";
03674         }
03675         else
03676                 stream << "\t\tElement <Rows> not present\n";
03677 
03678         if (Columns) {
03679                 stream << "\t\t";
03680                 Columns->write(stream,dict);
03681                 stream << "\n";
03682         }
03683         else
03684                 stream << "\t\tElement <Columns> not present\n";
03685 
03686         if (BitsAllocated) {
03687                 stream << "\t\t";
03688                 BitsAllocated->write(stream,dict);
03689                 stream << "\n";
03690         }
03691         else
03692                 stream << "\t\tElement <BitsAllocated> not present\n";
03693 
03694         if (BitsStored) {
03695                 stream << "\t\t";
03696                 BitsStored->write(stream,dict);
03697                 stream << "\n";
03698         }
03699         else
03700                 stream << "\t\tElement <BitsStored> not present\n";
03701 
03702         if (HighBit) {
03703                 stream << "\t\t";
03704                 HighBit->write(stream,dict);
03705                 stream << "\n";
03706         }
03707         else
03708                 stream << "\t\tElement <HighBit> not present\n";
03709 
03710         if (PixelRepresentation) {
03711                 stream << "\t\t";
03712                 PixelRepresentation->write(stream,dict);
03713                 stream << "\n";
03714         }
03715         else
03716                 stream << "\t\tElement <PixelRepresentation> not present\n";
03717 
03718         if (PixelData) {
03719                 stream << "\t\t";
03720                 PixelData->write(stream,dict);
03721                 stream << "\n";
03722         }
03723         else
03724                 stream << "\t\tElement <PixelData> not present\n";
03725 
03726         if (PlanarConfiguration) {
03727                 stream << "\t\t";
03728                 PlanarConfiguration->write(stream,dict);
03729                 stream << "\n";
03730         }
03731         else
03732                 stream << "\t\tElement <PlanarConfiguration> not present\n";
03733 
03734         if (PixelAspectRatio) {
03735                 stream << "\t\t";
03736                 PixelAspectRatio->write(stream,dict);
03737                 stream << "\n";
03738         }
03739         else
03740                 stream << "\t\tElement <PixelAspectRatio> not present\n";
03741 
03742         if (SmallestImagePixelValue) {
03743                 stream << "\t\t";
03744                 SmallestImagePixelValue->write(stream,dict);
03745                 stream << "\n";
03746         }
03747         else
03748                 stream << "\t\tElement <SmallestImagePixelValue> not present\n";
03749 
03750         if (LargestImagePixelValue) {
03751                 stream << "\t\t";
03752                 LargestImagePixelValue->write(stream,dict);
03753                 stream << "\n";
03754         }
03755         else
03756                 stream << "\t\tElement <LargestImagePixelValue> not present\n";
03757 
03758         if (RedPaletteColorLookupTableDescriptor) {
03759                 stream << "\t\t";
03760                 RedPaletteColorLookupTableDescriptor->write(stream,dict);
03761                 stream << "\n";
03762         }
03763         else
03764                 stream << "\t\tElement <RedPaletteColorLookupTableDescriptor> not present\n";
03765 
03766         if (GreenPaletteColorLookupTableDescriptor) {
03767                 stream << "\t\t";
03768                 GreenPaletteColorLookupTableDescriptor->write(stream,dict);
03769                 stream << "\n";
03770         }
03771         else
03772                 stream << "\t\tElement <GreenPaletteColorLookupTableDescriptor> not present\n";
03773 
03774         if (BluePaletteColorLookupTableDescriptor) {
03775                 stream << "\t\t";
03776                 BluePaletteColorLookupTableDescriptor->write(stream,dict);
03777                 stream << "\n";
03778         }
03779         else
03780                 stream << "\t\tElement <BluePaletteColorLookupTableDescriptor> not present\n";
03781 
03782         if (RedPaletteColorLookupTableData) {
03783                 stream << "\t\t";
03784                 RedPaletteColorLookupTableData->write(stream,dict);
03785                 stream << "\n";
03786         }
03787         else
03788                 stream << "\t\tElement <RedPaletteColorLookupTableData> not present\n";
03789 
03790         if (GreenPaletteColorLookupTableData) {
03791                 stream << "\t\t";
03792                 GreenPaletteColorLookupTableData->write(stream,dict);
03793                 stream << "\n";
03794         }
03795         else
03796                 stream << "\t\tElement <GreenPaletteColorLookupTableData> not present\n";
03797 
03798         if (BluePaletteColorLookupTableData) {
03799                 stream << "\t\t";
03800                 BluePaletteColorLookupTableData->write(stream,dict);
03801                 stream << "\n";
03802         }
03803         else
03804                 stream << "\t\tElement <BluePaletteColorLookupTableData> not present\n";
03805 
03806         if (ICCProfile) {
03807                 stream << "\t\t";
03808                 ICCProfile->write(stream,dict);
03809                 stream << "\n";
03810         }
03811         else
03812                 stream << "\t\tElement <ICCProfile> not present\n";
03813 
03814 }
03815 
03816 void
03817 Module_ImagePixel::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
03818 {
03819         stream << "\tModule <ImagePixel>\n";
03820 
03821                                 stream << "\t";
03822         Macro_ImagePixelMacro(list).write(stream,list,dict);
03823                                 stream << "\t";
03824         stream << "\tEndMacro <ImagePixelMacro>\n";
03825 
03826         if (PixelDataProviderURL) {
03827                 stream << "\t\t";
03828                 PixelDataProviderURL->write(stream,dict);
03829                 stream << "\n";
03830         }
03831         else
03832                 stream << "\t\tElement <PixelDataProviderURL> not present\n";
03833 
03834         if (PixelPaddingRangeLimit) {
03835                 stream << "\t\t";
03836                 PixelPaddingRangeLimit->write(stream,dict);
03837                 stream << "\n";
03838         }
03839         else
03840                 stream << "\t\tElement <PixelPaddingRangeLimit> not present\n";
03841 
03842 }
03843 
03844 void
03845 Module_ContrastBolus::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
03846 {
03847         stream << "\tModule <ContrastBolus>\n";
03848 
03849         if (ContrastBolusAgent) {
03850                 stream << "\t\t";
03851                 ContrastBolusAgent->write(stream,dict);
03852                 stream << "\n";
03853         }
03854         else
03855                 stream << "\t\tElement <ContrastBolusAgent> not present\n";
03856 
03857         if (ContrastBolusAgentSequence)
03858                 stream << "\t\tSequence <ContrastBolusAgentSequence>\n";
03859         else
03860                 stream << "\t\tSequence <ContrastBolusAgentSequence> not present\n";
03861         if (ContrastBolusAgentSequence && strcmp(ContrastBolusAgentSequence->getVR(),"SQ") == 0) {
03862                 AttributeList **array;
03863                 int n;
03864                 if ((n=ContrastBolusAgentSequence->getLists(&array)) > 0) {
03865                         int i; for (i=0; i<n; ++i) {
03866                                 AttributeList *list=array[i];
03867                                         stream << "\t\tItem" << endl;
03868                                                         stream << "\t\t";
03869         Macro_CodeSequenceMacro(list).write(stream,list,dict);
03870                                                         stream << "\t\t";
03871         stream << "\tEndMacro <CodeSequenceMacro>\n";
03872 
03873                         }
03874                 }
03875         }
03876         if (ContrastBolusRoute) {
03877                 stream << "\t\t";
03878                 ContrastBolusRoute->write(stream,dict);
03879                 stream << "\n";
03880         }
03881         else
03882                 stream << "\t\tElement <ContrastBolusRoute> not present\n";
03883 
03884         if (ContrastBolusAdministrationRouteSequence)
03885                 stream << "\t\tSequence <ContrastBolusAdministrationRouteSequence>\n";
03886         else
03887                 stream << "\t\tSequence <ContrastBolusAdministrationRouteSequence> not present\n";
03888         if (ContrastBolusAdministrationRouteSequence && strcmp(ContrastBolusAdministrationRouteSequence->getVR(),"SQ") == 0) {
03889                 AttributeList **array;
03890                 int n;
03891                 if ((n=ContrastBolusAdministrationRouteSequence->getLists(&array)) > 0) {
03892                         int i; for (i=0; i<n; ++i) {
03893                                 AttributeList *list=array[i];
03894                                         stream << "\t\tItem" << endl;
03895                                                         stream << "\t\t";
03896         Macro_CodeSequenceMacro(list).write(stream,list,dict);
03897                                                         stream << "\t\t";
03898         stream << "\tEndMacro <CodeSequenceMacro>\n";
03899 
03900         Attribute *AdditionalDrugSequence = (*list)[TagFromName(AdditionalDrugSequence)];
03901                                 stream << "\t";
03902                                 if (AdditionalDrugSequence)
03903                                         stream << "\t\tSequence <AdditionalDrugSequence>\n";
03904                                 else
03905                                         stream << "\t\tSequence <AdditionalDrugSequence> not present\n";
03906                                 if (AdditionalDrugSequence && strcmp(AdditionalDrugSequence->getVR(),"SQ") == 0) {
03907                                         AttributeList **array;
03908                                         int n;
03909                                         if ((n=AdditionalDrugSequence->getLists(&array)) > 0) {
03910                                                 int i; for (i=0; i<n; ++i) {
03911                                                         AttributeList *list=array[i];
03912                                 stream << "\t";
03913                                                                 stream << "\t\tItem" << endl;
03914                                                                                 stream << "\t\t\t";
03915         Macro_CodeSequenceMacro(list).write(stream,list,dict);
03916                                                                                 stream << "\t\t\t";
03917         stream << "\tEndMacro <CodeSequenceMacro>\n";
03918 
03919                                                 }
03920                                         }
03921                                 }
03922                         }
03923                 }
03924         }
03925         if (ContrastBolusVolume) {
03926                 stream << "\t\t";
03927                 ContrastBolusVolume->write(stream,dict);
03928                 stream << "\n";
03929         }
03930         else
03931                 stream << "\t\tElement <ContrastBolusVolume> not present\n";
03932 
03933         if (ContrastBolusStartTime) {
03934                 stream << "\t\t";
03935                 ContrastBolusStartTime->write(stream,dict);
03936                 stream << "\n";
03937         }
03938         else
03939                 stream << "\t\tElement <ContrastBolusStartTime> not present\n";
03940 
03941         if (ContrastBolusStopTime) {
03942                 stream << "\t\t";
03943                 ContrastBolusStopTime->write(stream,dict);
03944                 stream << "\n";
03945         }
03946         else
03947                 stream << "\t\tElement <ContrastBolusStopTime> not present\n";
03948 
03949         if (ContrastBolusTotalDose) {
03950                 stream << "\t\t";
03951                 ContrastBolusTotalDose->write(stream,dict);
03952                 stream << "\n";
03953         }
03954         else
03955                 stream << "\t\tElement <ContrastBolusTotalDose> not present\n";
03956 
03957         if (ContrastFlowRate) {
03958                 stream << "\t\t";
03959                 ContrastFlowRate->write(stream,dict);
03960                 stream << "\n";
03961         }
03962         else
03963                 stream << "\t\tElement <ContrastFlowRate> not present\n";
03964 
03965         if (ContrastFlowDuration) {
03966                 stream << "\t\t";
03967                 ContrastFlowDuration->write(stream,dict);
03968                 stream << "\n";
03969         }
03970         else
03971                 stream << "\t\tElement <ContrastFlowDuration> not present\n";
03972 
03973         if (ContrastBolusIngredient) {
03974                 stream << "\t\t";
03975                 ContrastBolusIngredient->write(stream,dict);
03976                 stream << "\n";
03977         }
03978         else
03979                 stream << "\t\tElement <ContrastBolusIngredient> not present\n";
03980 
03981         if (ContrastBolusIngredientConcentration) {
03982                 stream << "\t\t";
03983                 ContrastBolusIngredientConcentration->write(stream,dict);
03984                 stream << "\n";
03985         }
03986         else
03987                 stream << "\t\tElement <ContrastBolusIngredientConcentration> not present\n";
03988 
03989 }
03990 
03991 void
03992 Module_EnhancedContrastBolus::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
03993 {
03994         stream << "\tModule <EnhancedContrastBolus>\n";
03995 
03996         if (ContrastBolusAgentSequence)
03997                 stream << "\t\tSequence <ContrastBolusAgentSequence>\n";
03998         else
03999                 stream << "\t\tSequence <ContrastBolusAgentSequence> not present\n";
04000         if (ContrastBolusAgentSequence && strcmp(ContrastBolusAgentSequence->getVR(),"SQ") == 0) {
04001                 AttributeList **array;
04002                 int n;
04003                 if ((n=ContrastBolusAgentSequence->getLists(&array)) > 0) {
04004                         int i; for (i=0; i<n; ++i) {
04005                                 AttributeList *list=array[i];
04006                                         stream << "\t\tItem" << endl;
04007                                                         stream << "\t\t";
04008         Macro_CodeSequenceMacro(list).write(stream,list,dict);
04009                                                         stream << "\t\t";
04010         stream << "\tEndMacro <CodeSequenceMacro>\n";
04011 
04012                                 Attribute *ContrastBolusAgentNumber = (*list)[TagFromName(ContrastBolusAgentNumber)];
04013                                 stream << "\t";
04014                                 if (ContrastBolusAgentNumber) {
04015                                         stream << "\t\t";
04016                                         ContrastBolusAgentNumber->write(stream,dict);
04017                                         stream << "\n";
04018                                 }
04019                                 else
04020                                         stream << "\t\tElement <ContrastBolusAgentNumber> not present\n";
04021 
04022         Attribute *ContrastBolusAdministrationRouteSequence = (*list)[TagFromName(ContrastBolusAdministrationRouteSequence)];
04023                                 stream << "\t";
04024                                 if (ContrastBolusAdministrationRouteSequence)
04025                                         stream << "\t\tSequence <ContrastBolusAdministrationRouteSequence>\n";
04026                                 else
04027                                         stream << "\t\tSequence <ContrastBolusAdministrationRouteSequence> not present\n";
04028                                 if (ContrastBolusAdministrationRouteSequence && strcmp(ContrastBolusAdministrationRouteSequence->getVR(),"SQ") == 0) {
04029                                         AttributeList **array;
04030                                         int n;
04031                                         if ((n=ContrastBolusAdministrationRouteSequence->getLists(&array)) > 0) {
04032                                                 int i; for (i=0; i<n; ++i) {
04033                                                         AttributeList *list=array[i];
04034                                 stream << "\t";
04035                                                                 stream << "\t\tItem" << endl;
04036                                                                                 stream << "\t\t\t";
04037         Macro_CodeSequenceMacro(list).write(stream,list,dict);
04038                                                                                 stream << "\t\t\t";
04039         stream << "\tEndMacro <CodeSequenceMacro>\n";
04040 
04041                                                 }
04042                                         }
04043                                 }
04044         Attribute *ContrastBolusIngredientCodeSequence = (*list)[TagFromName(ContrastBolusIngredientCodeSequence)];
04045                                 stream << "\t";
04046                                 if (ContrastBolusIngredientCodeSequence)
04047                                         stream << "\t\tSequence <ContrastBolusIngredientCodeSequence>\n";
04048                                 else
04049                                         stream << "\t\tSequence <ContrastBolusIngredientCodeSequence> not present\n";
04050                                 if (ContrastBolusIngredientCodeSequence && strcmp(ContrastBolusIngredientCodeSequence->getVR(),"SQ") == 0) {
04051                                         AttributeList **array;
04052                                         int n;
04053                                         if ((n=ContrastBolusIngredientCodeSequence->getLists(&array)) > 0) {
04054                                                 int i; for (i=0; i<n; ++i) {
04055                                                         AttributeList *list=array[i];
04056                                 stream << "\t";
04057                                                                 stream << "\t\tItem" << endl;
04058                                                                                 stream << "\t\t\t";
04059         Macro_CodeSequenceMacro(list).write(stream,list,dict);
04060                                                                                 stream << "\t\t\t";
04061         stream << "\tEndMacro <CodeSequenceMacro>\n";
04062 
04063                                                 }
04064                                         }
04065                                 }
04066                                 Attribute *ContrastBolusVolume = (*list)[TagFromName(ContrastBolusVolume)];
04067                                 stream << "\t";
04068                                 if (ContrastBolusVolume) {
04069                                         stream << "\t\t";
04070                                         ContrastBolusVolume->write(stream,dict);
04071                                         stream << "\n";
04072                                 }
04073                                 else
04074                                         stream << "\t\tElement <ContrastBolusVolume> not present\n";
04075 
04076                                 Attribute *ContrastBolusIngredientConcentration = (*list)[TagFromName(ContrastBolusIngredientConcentration)];
04077                                 stream << "\t";
04078                                 if (ContrastBolusIngredientConcentration) {
04079                                         stream << "\t\t";
04080                                         ContrastBolusIngredientConcentration->write(stream,dict);
04081                                         stream << "\n";
04082                                 }
04083                                 else
04084                                         stream << "\t\tElement <ContrastBolusIngredientConcentration> not present\n";
04085 
04086                                 Attribute *ContrastBolusIngredientOpaque = (*list)[TagFromName(ContrastBolusIngredientOpaque)];
04087                                 stream << "\t";
04088                                 if (ContrastBolusIngredientOpaque) {
04089                                         stream << "\t\t";
04090                                         ContrastBolusIngredientOpaque->write(stream,dict);
04091                                         stream << "\n";
04092                                 }
04093                                 else
04094                                         stream << "\t\tElement <ContrastBolusIngredientOpaque> not present\n";
04095 
04096         Attribute *ContrastAdministrationProfileSequence = (*list)[TagFromName(ContrastAdministrationProfileSequence)];
04097                                 stream << "\t";
04098                                 if (ContrastAdministrationProfileSequence)
04099                                         stream << "\t\tSequence <ContrastAdministrationProfileSequence>\n";
04100                                 else
04101                                         stream << "\t\tSequence <ContrastAdministrationProfileSequence> not present\n";
04102                                 if (ContrastAdministrationProfileSequence && strcmp(ContrastAdministrationProfileSequence->getVR(),"SQ") == 0) {
04103                                         AttributeList **array;
04104                                         int n;
04105                                         if ((n=ContrastAdministrationProfileSequence->getLists(&array)) > 0) {
04106                                                 int i; for (i=0; i<n; ++i) {
04107                                                         AttributeList *list=array[i];
04108                                 stream << "\t";
04109                                                                 stream << "\t\tItem" << endl;
04110                                                         Attribute *ContrastBolusVolume = (*list)[TagFromName(ContrastBolusVolume)];
04111                                                         stream << "\t\t";
04112                                                         if (ContrastBolusVolume) {
04113                                                                 stream << "\t\t";
04114                                                                 ContrastBolusVolume->write(stream,dict);
04115                                                                 stream << "\n";
04116                                                         }
04117                                                         else
04118                                                                 stream << "\t\tElement <ContrastBolusVolume> not present\n";
04119 
04120                                                         Attribute *ContrastBolusStartTime = (*list)[TagFromName(ContrastBolusStartTime)];
04121                                                         stream << "\t\t";
04122                                                         if (ContrastBolusStartTime) {
04123                                                                 stream << "\t\t";
04124                                                                 ContrastBolusStartTime->write(stream,dict);
04125                                                                 stream << "\n";
04126                                                         }
04127                                                         else
04128                                                                 stream << "\t\tElement <ContrastBolusStartTime> not present\n";
04129 
04130                                                         Attribute *ContrastBolusStopTime = (*list)[TagFromName(ContrastBolusStopTime)];
04131                                                         stream << "\t\t";
04132                                                         if (ContrastBolusStopTime) {
04133                                                                 stream << "\t\t";
04134                                                                 ContrastBolusStopTime->write(stream,dict);
04135                                                                 stream << "\n";
04136                                                         }
04137                                                         else
04138                                                                 stream << "\t\tElement <ContrastBolusStopTime> not present\n";
04139 
04140                                                         Attribute *ContrastFlowRate = (*list)[TagFromName(ContrastFlowRate)];
04141                                                         stream << "\t\t";
04142                                                         if (ContrastFlowRate) {
04143                                                                 stream << "\t\t";
04144                                                                 ContrastFlowRate->write(stream,dict);
04145                                                                 stream << "\n";
04146                                                         }
04147                                                         else
04148                                                                 stream << "\t\tElement <ContrastFlowRate> not present\n";
04149 
04150                                                         Attribute *ContrastFlowDuration = (*list)[TagFromName(ContrastFlowDuration)];
04151                                                         stream << "\t\t";
04152                                                         if (ContrastFlowDuration) {
04153                                                                 stream << "\t\t";
04154                                                                 ContrastFlowDuration->write(stream,dict);
04155                                                                 stream << "\n";
04156                                                         }
04157                                                         else
04158                                                                 stream << "\t\tElement <ContrastFlowDuration> not present\n";
04159 
04160                                                 }
04161                                         }
04162                                 }
04163                         }
04164                 }
04165         }
04166 }
04167 
04168 void
04169 Module_Cine::write(TextOutputStream& stream,AttributeList *list,ElementDictionary *dict) const
04170 {
04171         stream << "\tModule <Cine>\n";
04172 
04173         if (PreferredPlaybackSequencing) {
04174                 stream << "\t\t";
04175                 PreferredPlaybackSequencing->write(stream,dict);
04176                 stream << "\n";
04177         }
04178         else
04179                 stream << "\t\tElement <PreferredPlaybackSequencing> not present\n";
04180 
04181         if (FrameTime) {
04182                 stream << "\t\t";
04183                 FrameTime->write(stream,dict);
04184                 stream << "\n";
04185         }
04186         else
04187                 stream << "\t\tElement <FrameTime> not present\n";
04188 
04189         if (FrameTimeVector) {
04190                 stream << "\t\t";
04191                 FrameTimeVector->write(stream,dict);
04192                 stream << "\n";
04193         }
04194         else
04195                 stream << "\t\tElement <FrameTimeVector> not present\n";
04196 
04197         if (StartTrim) {
04198                 stream << "\t\t";
04199                 StartTrim->write(stream,dict);
04200                 stream << "\n";
04201         }
04202         else
04203                 stream << "\t\tElement <StartTrim> not present\n";
04204 
04205         if (StopTrim) {
04206                 stream << "\t\t";
04207                 StopTrim->write(stream,dict);
04208                 stream << "\n";
04209         }
04210         else
04211                 stream << "\t\tElement <StopTrim> not present\n";
04212 
04213         if (RecommendedDisplayFrameRate) {
04214                 stream << "\t\t";
04215                 RecommendedDisplayFrameRate->write(stream,dict);
04216                 stream << "\n";
04217         }
04218         else
04219                 stream << "\t\tElement <RecommendedDisplayFrameRate> not present\n";
04220 
04221         if (CineRate) {
04222                 stream << "\t\t";
04223                 CineRate->write(stream,dict);
04224                 stream << "\n";
04225         }
04226         else
04227                 stream << "\t\tElement <CineRate> not present\n";
04228 
04229         if (FrameDelay) {
04230                 stream << "\t\t";
04231                 FrameDelay->write(stream,dict);
04232                 stream << "\n";
04233         }
04234         else
04235                 stream << "\t\tElement <FrameDelay> not present\n";
04236 
04237         if (ImageTriggerDelay) {
04238                 stream << "\t\t";
04239                 ImageTriggerDelay->write(stream,dict);
04240                 stream << "\n";
04241         }
04242         else
04243                 stream << "\t\tElement <ImageTriggerDelay> not present\n";
04244 
04245         if (EffectiveDuration) {
04246                 stream << "\t\t";
04247                 EffectiveDuration->write(stream,dict);
04248                 stream << "\n";
04249         }
04250         else
04251                 stream << "\t\tElement <EffectiveDuration> not present\n";
04252 
04253         if (ActualFrameDuration) {
04254                 stream << "\t\t";
04255                 ActualFrameDuration->write(stream,dict);
04256                 stream << "\n";
04257         }
04258         else
04259                 stream << "\t\tElement <ActualFrameDuration> not present\n";
04260 
04261         if (MultiplexedAudioChannelsDescriptionCodeSequence)
04262                 stream << "\t\tSequence <MultiplexedAudioChannelsDescriptionCodeSequence>\n";
04263         else
04264                 stream << "\t\tSequence <MultiplexedAudioChannelsDescriptionCodeSequence> not present\n";
04265         if (MultiplexedAudioChannelsDescriptionCodeSequence && strcmp(MultiplexedAudioChannelsDescriptionCodeSequence->getVR(),"SQ") == 0) {
04266                 AttributeList **array;
04267                 int n;
04268                 if ((n=MultiplexedAudioChannelsDescriptionCodeSequence->getLists(&array)) > 0) {
04269                         int i; for (i=0; i<n; ++i) {
04270                                 AttributeList *list=array[i];
04271                                         stream << "\t\tItem" << endl;
04272                                 Attribute *ChannelIdentificationCode = (*list)[TagFromName(ChannelIdentificationCode)];
04273                                 stream << "\t";
04274                                 if (ChannelIdentificationCode) {
04275                                         stream << "\t\t";
04276                                         ChannelIdentificationCode->write(stream,dict);
04277                                         stream << "\n";
04278                                 }
04279                                 else
04280                                         stream << "\t\tElement <ChannelIdentificationCode> not present\n";
04281 
04282                                 Attribute *ChannelMode = (*list)[TagFromName(ChannelMode)];
04283                                 stream << "\t";
04284                                 if (ChannelMode) {
04285                                         stream << "\t\t";
04286                                         ChannelMode->write(stream,dict);
04287                                         stream << "\n";
04288                                 }
04289                                 else
04290                                         stream << "\t\tElement <ChannelMode> not present\n";
04291 
04292         Attribute *ChannelSourceSequence = (*list)[TagFromName(ChannelSourceSequence)];
04293                                 stream << "\t";
04294                                 if (ChannelSourceSequence)
04295                                         stream << "\t\tSequence <ChannelSourceSequence>\n";
04296                                 else
04297                                         stream << "\t\tSequence <ChannelSourceSequence> not present\n";
04298                                 if (ChannelSourceSequence && strcmp(ChannelSourceSequenc