Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2006/04/11 16:03:26 $
- Version: $Revision: 1.318 $
+ Date: $Date: 2006/06/08 13:37:33 $
+ Version: $Revision: 1.321 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
*/
VRKey PixelVR;
- // 8 bits allocated is a 'O Bytes' , as well as 24 (old ACR-NEMA RGB)
- // more than 8 (i.e 12, 16) is a 'O Words'
+ // 8 bits allocated is a 'OB(ytes)' , as well as 24 (old ACR-NEMA RGB)
+ // more than 8 (i.e 12, 16) is a 'OW(ords)'
if ( GetBitsAllocated() == 8 || GetBitsAllocated() == 24 )
PixelVR = "OB";
else
{
float xspacing = 1.0;
uint32_t nbValue;
+
+/*
+It *SHOULD* first find the IOD and then deduce which tags to read
+Eg: Cross section this is in Pixel Spacing (0028,0030)
+CR is in Imager Pixel Spacing (0018,1164)
+US is in Pixel Ratio (0028,0034)
+RT is in :
+(3002,0011) Image Plane Pixel Spacing
+(3002,0012) RT Image Position
+and
+(3004,000c) for deducing Z spacing
+*/
+
+
+// std::string SOPClassUID = GetEntryString(0x0008,0x0016);
+
+ /// \todo check the various SOP Class
+ /// to get the Pixel Spacing at the proper location
+
+
+ // Ultrasound Image Storage (Retired)
+/*
+ if (Util::DicomStringEqual( SOPClassUID,"1.2.840.10008.5.1.4.1.1.6")
+ {
+ - check if SOPClassUID contains 2 parts (e.g. "4\3")
+ - guess how to deduce the spacing (FOV ?, ??)
+ }
+ else
+ // go on with old method ...
+*/
// To follow David Clunie's advice, we first check ImagerPixelSpacing
it != UserAnonymizeList.end();
++it)
{
+
+ //std::cout << "File::AnonymizeNoLoad -------" << std::hex <<(*it).Group <<"|"<<
+ // (*it).Elem
+ // << "[" << (*it).Value << "] "<< std::dec << std::endl;
d = GetDocEntry( (*it).Group, (*it).Elem);
if ( d == NULL)
gdcmWarningMacro( "You cannot 'Anonymize' a SeqEntry ");
continue;
}
+
+ valLgth = (*it).Value.size();
+ if (valLgth == 0)
+ continue;
offset = d->GetOffset();
lgth = d->GetLength();
+
+ //std::cout << "lgth " << lgth << " valLgth " << valLgth << std::endl;
if (valLgth < lgth)
{
spaces = new std::string( lgth-valLgth, ' ');
(*it).Value = (*it).Value + *spaces;
+ //std::cout << "[" << (*it).Value << "] " << lgth << std::endl;
delete spaces;
}
fp->seekp( offset, std::ios::beg );
// These are the deprecated method that one day should be removed (after the next release)
-#ifndef GDCM_LEGACY_REMOVE
+//#ifndef GDCM_LEGACY_REMOVE
/*
* \ brief Loader. (DEPRECATED : temporaryly kept not to break the API)
* @ param fileName file to be open for parsing
* or no tag was found.
* @deprecated Use the Load() [ + SetLoadMode() ] + SetFileName() functions instead
*/
+ /*
bool File::Load( std::string const &fileName )
{
GDCM_LEGACY_REPLACED_BODY(File::Load(std::string), "1.2",
return DoTheLoadingJob( );
}
#endif
-
+*/
//-----------------------------------------------------------------------------
// Print