It is DCOM image format..
I m new in DICOM
-
FILE *fp1;
-
char *c, *d;
-
c = new char[8];
-
d = c;
-
fp1=fopen("C:\\xyz.dcm","r");
-
ZeroMemory(c , 8);
-
for(int i=128;i<=132;i++)
-
{
-
fseek(fp1,i,SEEK_SET);
-
*d =(char)fgetc(fp1);
-
d++;
-
}
-
CString s = c;
-
-
i m using this code.
Actually my file contains fillowing type of code
44 49 43 4d 02 00 00 00 - 55 4c 04 00 82 00 00 00
first 128 bytes are 0 and 44 is 129th byte
in hex format 44 49 43 4d is DICM called as tag..
55 4c is UL which is value type...
04 00 is value length which must be swaped as 00 04 tat is 4
& the next valu is of 4 bytes tat is 00 00 00 82 after swapping
I want to display tags and their values tat is
DICM & 82
How to travrese through this file where tag length is 4 bytes,Value type is of 2 bytes, value length is of 2 bytes, and value is no of bytes as value length.which is fixed...
please give me some example if u have any to traverse DCOM file...