*/
gdcmHeaderEntry::gdcmHeaderEntry(gdcmDictEntry* in) {
ImplicitVR = false;
+ voidArea = NULL; // unsecure memory area to hold 'non string' values
entry = in;
}
s << "[" << GetName()<< "]";
-
-
- if( (GetLength()<MAX_SIZE_PRINT_ELEMENT_VALUE) ||
- (printLevel>=3) ||
- (d2.find("gdcm::NotLoaded.") < d2.length()) )
- s << " [" << d2 << "]";
- else
- s << " [ gdcm::too long for print (" << GetLength() << ") ]";
-
+ if (voidArea != NULL) {
+ s << " [gdcm::Non String Data Loaded in Unsecure Area ("
+ << GetLength() << ") ]";
+ }
+
+ else {
+ if( (GetLength()<MAX_SIZE_PRINT_ELEMENT_VALUE) ||
+ (printLevel>=3) ||
+ (d2.find("gdcm::NotLoaded.") < d2.length()) )
+ s << " [" << d2 << "]";
+ else
+ s << " [gdcm::too long for print (" << GetLength() << ") ]";
+ }
+
// Display the UID value (instead of displaying the rough code)
if (g == 0x0002) { // Any more to be displayed ?
if ( (e == 0x0010) || (e == 0x0002) )
free(a);
return NULL;
}
+ cout << hex << Group << " " << Elem << "loaded" <<endl;
+ Element->SetPrintLevel(2);
+ Element->Print();
return a;
}
guint32 val_uint32;
guint16 val_uint16;
guint16 valZero =0;
+ void *voidArea;
std::vector<std::string> tokens;
// TODO : function CheckHeaderCoherence to be written
lgr = (*tag2)->GetReadLength();
val = (*tag2)->GetValue().c_str();
vr = (*tag2)->GetVR();
+ voidArea = (*tag2)->GetVoidArea();
+
if ( type == ACR )
{
if (gr < 0x0008) continue; // ignore pure DICOM V3 groups
if (vr == "SQ") continue; // no "value" to write for the SEQuences
if (gr == 0xfffe)continue;
+ if (voidArea != NULL) { // there is a 'non string' LUT, overlay, etc
+ fwrite ( voidArea,(size_t)lgr ,(size_t)1 ,_fp); // Elem value
+ continue;
+ }
+
if (vr == "US" || vr == "SS")
{
tokens.erase(tokens.begin(),tokens.end()); // clean any previous value
LoadEntryVoidArea(0x0028,0x1221); // Segmented Red Palette Color LUT Data
LoadEntryVoidArea(0x0028,0x1222); // Segmented Green Palette Color LUT Data
LoadEntryVoidArea(0x0028,0x1223); // Segmented Blue Palette Color LUT Data
- }
+ }
+ //FIXME : how to use it?
+ LoadEntryVoidArea(0x0028,0x3006); //LUT Data (CTX dependent)
// --------------------------------------------------------------
// Special Patch to allow gdcm to read ACR-LibIDO formated images
// * the 4 bytes of the first tag (0002, 0000),or (0002, 0001)
// i.e. a total of 136 bytes.
entCur = deb + 136;
- // FIXME
- // Use gdcmParser::dicom_vr to test all the possibilities
- // instead of just checking for UL, OB and UI !?
-
+
// FIXME : FIXME:
// Sometimes (see : gdcmData/icone.dcm) group 0x0002 *is* Explicit VR,
// but elem 0002,0010 (Transfert Syntax) tells us the file is *Implicit* VR.
// -and it is !-
- // The following test is *absolutely useless*, since everything *goes right*
- // with a *100 % wrong* assumption !!!
-
if( (memcmp(entCur, "UL", (size_t)2) == 0) ||
(memcmp(entCur, "OB", (size_t)2) == 0) ||
(memcmp(entCur, "UI", (size_t)2) == 0) ||
(memcmp(entCur, "CS", (size_t)2) == 0) ) // CS, to remove later
// when Write DCM *adds*
- // group 0000
+ // FIXME
+ // Use gdcmParser::dicom_vr to test all the possibilities
+ // instead of just checking for UL, OB and UI !? // group 0000
+
{
filetype = ExplicitVR;
dbg.Verbose(1, "gdcmParser::CheckSwap:",