Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2004/06/28 14:12:03 $
- Version: $Revision: 1.112 $
+ Date: $Date: 2004/06/28 16:00:18 $
+ Version: $Revision: 1.114 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*
* @param destination Address (in caller's memory space) at which the
* pixel data should be copied
- * @param MaxSize Maximum number of bytes to be copied. When MaxSize
+ * @param maxSize Maximum number of bytes to be copied. When MaxSize
* is not sufficient to hold the pixel data the copy is not
* executed (i.e. no partial copy).
* @return On success, the number of bytes actually copied. Zero on
*
* @param destination Address (in caller's memory space) at which the
* pixel data should be copied
- * @param MaxSize Maximum number of bytes to be copied. When MaxSize
+ * @param maxSize Maximum number of bytes to be copied. When MaxSize
* is not sufficient to hold the pixel data the copy is not
* executed (i.e. no partial copy).
* @return On success, the number of bytes actually copied. Zero on
* 'volume'Pixels are presented as C-like 3D arrays : lane per plane
* \warning user is kindly requested NOT TO 'free' the Pixel area
* @param inData user supplied pixel area
- * @param ExpectedSize total image size, in Bytes
+ * @param expectedSize total image size, in Bytes
*
* @return boolean
*/
Header->SetEntryByNumber(rows , 0x0028, 0x0011);
}
// ----------------- End of Special Patch ----------------
-
- /// \todo get the grPixel, numPixel values (for some ACR-NEMA images only)
-
+
uint16_t grPixel = Header->GetGrPixel();
uint16_t numPixel = Header->GetNumPixel();;
-
- // Update Pixel Data Length
- // the *last* of the (GrPixel, NumPixel), if many.
- TagKey key = gdcmDictEntry::TranslateToKey(grPixel, numPixel);
- TagDocEntryHT::iterator p2;
gdcmDocEntry* PixelElement;
-
- IterHT it = Header->GetEntry().equal_range(key); // get a pair of iterators first-last synonym
- if ( Header->GetEntry().count(key) == 1 ) // only the first is significant
- {
- p2 = it.first; // iterator on the first (unique) synonym
- }
- else
- {
- p2 = it.second;// iterator on the last synonym
- }
-
- PixelElement = p2->second; // H Table target column (2-nd col)
- // PixelElement->SetPrintLevel(2);
- // PixelElement->Print();
+ PixelElement = GetHeader()->GetDocEntryByNumber(grPixel, numPixel);
if ( PixelRead == 1 )
{
+ // we read pixel 'as is' (no tranformation LUT -> RGB)
PixelElement->SetLength( ImageDataSizeRaw );
}
else if ( PixelRead == 0 )
{
+ // we tranformed GrayLevel pixels + LUT into RGB Pixel
PixelElement->SetLength( ImageDataSize );
}
-
- //PixelElement->SetPrintLevel(2);
- //PixelElement->Print();
+
Header->Write(fp1, type);
// --------------------------------------------------------------