Module: $RCSfile: gdcmFileHelper.cxx,v $
Language: C++
- Date: $Date: 2005/08/30 14:40:33 $
- Version: $Revision: 1.55 $
+ Date: $Date: 2005/10/07 09:54:53 $
+ Version: $Revision: 1.59 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
(checks user given pixels length)
FileInternal->Write(fileName,WriteType)
fp = opens file(fileName);
- ComputeGroup0002Length(writetype);
+ ComputeGroup0002Length( );
BitsAllocated 12->16
RemoveEntryNoDestroy(palettes, etc)
Document::WriteContent(fp, writetype);
ValEntry *e_0002_0013 = CopyValEntry(0x0002,0x0013);
std::string version = "GDCM ";
version += Util::GetVersion();
- e_0002_0013->SetValue("GDCM 1.1");
+ e_0002_0013->SetValue(version);
Archive->Push(e_0002_0013);
//'Source Application Entity Title' Not Mandatory
e_0008_0090->SetValue("");
Archive->Push(e_0008_0090);
}
-
+
+ // Pixel Spacing : defaulted to 1.0\1.0
+ ValEntry *e_0028_0030 = FileInternal->GetValEntry(0x0028, 0x0030);
+ if ( !e_0028_0030 )
+ {
+ e_0028_0030 = new ValEntry(
+ Global::GetDicts()->GetDefaultPubDict()->GetEntry(0x0028, 0x0030) );
+ e_0028_0030->SetValue("1.0\\1.0");
+ Archive->Push(e_0028_0030);
+ }
+
// Remove some inconstencies (probably some more will be added)
// if (0028 0008)Number of Frames exists
FileInternal->SetPrintLevel(PrintLevel);
FileInternal->Print(os);
- PixelReadConverter->SetPrintLevel(PrintLevel);
- PixelReadConverter->Print(os);
+ if ( FileInternal->IsReadable() )
+ {
+ PixelReadConverter->SetPrintLevel(PrintLevel);
+ PixelReadConverter->Print(os);
+ }
}
//-----------------------------------------------------------------------------