1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
/*
** Electronic Radiology Laboratory
** Mallinckrodt Institute of Radiology
** Washington University School of Medicine
**
** Module Name(s): format
** formatieList
** formatmodList
** formatattrList
**
** Author, Date: Stephen M. Moore
**
** Intent: This function converts binary string to ASCII
**
** Last Updates: Chander L. Sabharwal, 27-June-94
**
** Source File: $RCSfile: format.c,v $
**
** Revision: $Revision: 1.4 $
**
** Status: $State: Exp $
**
*/
static char rcsid[] = "$Revision: 1.4 $ $RCSfile: format.c,v $";
#include <stdio.h>
#ifdef GCCSUNOS
#include <stddef.h>
#endif
#include "dicom.h"
#include "condition.h"
#include "condition.h"
#include "tbl.h"
#include "lst.h"
#include "dicom.h"
#include "dicom_uids.h"
#include "dicom_objects.h"
#include "dicom_ie.h"
void copyWtext(char *t);
CTNBOOLEAN
errorstackP(unsigned long v, char *mes);
CTNBOOLEAN
clearStack;
/* Return value from DUL and ACR routines */
CONDITION cond;
char *info;
/* formatieList
** Purpose:
** This function converts binary string of information entity(IE) list
** to character string.
**
** Parameter Dictionary:
** index increments information entity list
** buff character array to store ASCII string
**
** Return Values:
** none
**
** Notes:
**
** Algorithm:
** Description of the algorithm (optional) and any other notes.
*/
void
formatieList(IE_INFORMATIONENTITY * ieIE, int index, char *buff)
{
(void) sprintf(buff, "%-32s", ieIE->ieDescription);
}
/* formatmodList
** Purpose:
** This function converts binary string of module list
** to character string.
**
** Parameter Dictionary:
** index increments module list
** buff character array to store ASCII string
**
** Return Values:
** none
**
** Notes:
**
** Algorithm:
** Description of the algorithm (optional) and any other notes.
*/
void
formatmodieList(IE_MODULE * ieModule, int index, char *buff)
{
(void) sprintf(buff, "%-48s", ieModule->moduleDescription);
}
/* formatattrList
** Purpose:
** This function converts binary string of attribute list
** to character string.
**
** Parameter Dictionary:
** index increments attribute list
** buff character array to store ASCII string
**
** Return Values:
** none
**
** Notes:
**
** Algorithm:
** Description of the algorithm (optional) and any other notes.
*/
void
formatattrieList(IE_ATTRIBUTE * ieAttr, int index, char *buff)
{
cond = DCM_LookupElement(&ieAttr->element);
if (cond != DCM_NORMAL) {
/** COND_DumpConditions();
printf(" DCM_LookupElement not worked\n");**/
(void) COND_ExtractConditions(errorstackP);
copyWtext(info);
(void) COND_PopCondition(clearStack);
free(info);
}
(void) sprintf(buff, "%-64s", ieAttr->element.description);
}
|