Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2004/06/28 09:51:02 $
- Version: $Revision: 1.37 $
+ Date: $Date: 2004/06/28 11:01:18 $
+ Version: $Revision: 1.38 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
" ValEntry (try promotion first).");
return false;
}
-
// Non even content must be padded with a space (020H).
- if((content.length())%2)
+ if((content.length())%2) {
content = content + '\0';
-
+ }
ValEntry->SetValue(content);
// Integers have a special treatement for their length:
Program: gdcm
Module: $RCSfile: gdcmHeader.cxx,v $
Language: C++
- Date: $Date: 2004/06/28 09:51:02 $
- Version: $Revision: 1.171 $
+ Date: $Date: 2004/06/28 11:01:18 $
+ Version: $Revision: 1.172 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/**
- * \brief Writes in a file all the Header Entries (Dicom Elements)
+ * \brief Performs some consistency checking on various 'File related'
+ * (as opposed to 'DicomDir related') entries
+ * then writes in a file all the (Dicom Elements) included the Pixels
* @param fp file pointer on an already open file
* @param filetype Type of the File to be written
* (ACR-NEMA, ExplicitVR, ImplicitVR)
- * \return Always true.
*/
void gdcmHeader::Write(FILE* fp,FileType filetype) {
// correct Pixel group Length if necessary
- //guint16 GrPixel = 0x7fe0;
- //guint16 NumPixel = 0x0010;
-
// TODO : create a gdcmHeader::Write method and move this part.
// (only gdcmHeader knows GrPixel, NumPixel)
// Drop Palette Color, if necessary
- // FIXME : Why is it always false ???
-
- // std::cout << "entry 0x0028,0x0002 " << GetEntryByNumber(0x0028,0x0002).c_str() << std::endl;
-
- /* if ( GetEntryByNumber(0x0028,0x0002).c_str() == "3" ) */{
+ if ( GetEntryByNumber(0x0028,0x0002).c_str()[0] == '3' ) {
// Drop 0028|1101, 0028|1102, 0028|1103
// Drop 0028|1201, 0028|1202, 0028|1203
}
gdcmDocument::Write(fp,filetype);
}
-// ----------- end move to gdcmHeader::Write -----------------
//-----------------------------------------------------------------------------
// Print
Program: gdcm
Module: $RCSfile: gdcmValEntry.cxx,v $
Language: C++
- Date: $Date: 2004/06/24 18:03:14 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2004/06/28 11:01:18 $
+ Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
tokens.clear();
return;
- }
+ }
+
fwrite (GetValue().c_str(), (size_t)lgr ,(size_t)1, fp); // Elem value
}