Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/06/10 14:05:38 $
- Version: $Revision: 1.245 $
+ Date: $Date: 2005/06/23 09:20:23 $
+ Version: $Revision: 1.250 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string PhotometricInterpretation = GetEntryValue(0x0028,0x0004);
if( PhotometricInterpretation == "PALETTE COLOR " )
{
- LoadEntryBinArea(0x0028,0x1200); // gray LUT
- /// FIXME FIXME FIXME
+ // FIXME
+ // Probabely this line should be outside the 'if'
+ // Try to find an image sample holding a 'gray LUT'
+ LoadEntryBinArea(0x0028,0x1200); // gray LUT
+
+ /// FIXME
/// The tags refered by the three following lines used to be CORRECTLY
/// defined as having an US Value Representation in the public
/// dictionary. BUT the semantics implied by the three following
LoadEntryBinArea(0x0028,0x1222);
// Segmented Blue Palette Color LUT Data
LoadEntryBinArea(0x0028,0x1223);
- }
+ }
+
//FIXME later : how to use it?
- LoadEntryBinArea(0x0028,0x3006); //LUT Data (CTX dependent)
+ SeqEntry *modLutSeq = GetSeqEntry(0x0028,0x3000);
+ if ( modLutSeq !=0 )
+ {
+ SQItem *sqi= modLutSeq->GetFirstSQItem();
+ if ( sqi != 0 )
+ {
+ BinEntry *b = sqi->GetBinEntry(0x0028,0x3006);
+ if ( b != 0 )
+ {
+ if ( b->GetLength() != 0 )
+ {
+ LoadEntryBinArea(b); //LUT Data (CTX dependent)
+ }
+ }
+ }
+ }
CloseFile();
{
newValue = Util::DicomString(str, length+1);
gdcmWarningMacro("Warning: bad length: " << length <<
- " ,For string :" << newValue.c_str());
+ " For string :" << newValue.c_str());
// Since we change the length of string update it length
//entry->SetReadLength(length+1);
}
{
if ( Fp->fail() || Fp->eof())
{
- gdcmWarningMacro("Unread element value");
+ if ( Fp->fail() )
+ gdcmWarningMacro("--> fail");
+
+ gdcmWarningMacro("Unread element value " << valEntry->GetKey()
+ << " lgt : " << valEntry->GetReadLength()
+ << " at " << std::hex << valEntry->GetOffset());
valEntry->SetValue(GDCM_UNREAD);
return;
}
}
else
{
- gdcmErrorMacro( "Should have a ValEntry, here !");
+ gdcmWarningMacro("Should have a ValEntry, here ! " << valEntry->GetKey()
+ << " lgt : " << valEntry->GetReadLength()
+ << " at " << std::hex << valEntry->GetOffset());
}
}
*/
void Document::SwitchByteSwapCode()
{
- gdcmWarningMacro( "Switching Byte Swap code from "<< SwapCode);
+ gdcmWarningMacro( "Switching Byte Swap code from "<< SwapCode
+ << " at :" <<std::hex << Fp->tellg() );
if ( SwapCode == 1234 )
{
SwapCode = 4321;