- move *all* the methods of PixelReadConvert, PixelWriteConvert to 'private'.
- declare as friend class FileHelper
Program: gdcm
Module: $RCSfile: gdcmPixelReadConvert.cxx,v $
Language: C++
- Date: $Date: 2005/10/21 17:11:33 $
- Version: $Revision: 1.84 $
+ Date: $Date: 2005/10/23 15:09:19 $
+ Version: $Revision: 1.85 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
/**
- * \brief Build Red/Green/Blue/Alpha LUT from File
- * when (0028,0004),Photometric Interpretation = [PALETTE COLOR ]
- * and (0028,1101),(0028,1102),(0028,1102)
- * - xxx Palette Color Lookup Table Descriptor - are found
- * and (0028,1201),(0028,1202),(0028,1202)
- * - xxx Palette Color Lookup Table Data - are found
+ * \brief Build Red/Green/Blue/Alpha LUT from File when :
+ * - (0028,0004) : Photometric Interpretation == [PALETTE COLOR ]
+ * and
+ * - (0028,1101),(0028,1102),(0028,1102)
+ * xxx Palette Color Lookup Table Descriptor are found
+ * and
+ * - (0028,1201),(0028,1202),(0028,1202)
+ * xxx Palette Color Lookup Table Data - are found
* \warning does NOT deal with :
- * 0028 1100 Gray Lookup Table Descriptor (Retired)
- * 0028 1221 Segmented Red Palette Color Lookup Table Data
- * 0028 1222 Segmented Green Palette Color Lookup Table Data
- * 0028 1223 Segmented Blue Palette Color Lookup Table Data
+ * - 0028 1100 Gray Lookup Table Descriptor (Retired)
+ * - 0028 1221 Segmented Red Palette Color Lookup Table Data
+ * - 0028 1222 Segmented Green Palette Color Lookup Table Data
+ * - 0028 1223 Segmented Blue Palette Color Lookup Table Data
* no known Dicom reader deals with them :-(
* @return a RGBA Lookup Table
*/
Program: gdcm
Module: $RCSfile: gdcmPixelReadConvert.h,v $
Language: C++
- Date: $Date: 2005/10/20 08:29:50 $
- Version: $Revision: 1.25 $
+ Date: $Date: 2005/10/23 15:09:19 $
+ Version: $Revision: 1.26 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
class GDCM_EXPORT PixelReadConvert : public Base
{
-public:
+friend class FileHelper;
+
+private:
PixelReadConvert();
virtual ~PixelReadConvert();
void Print( std::ostream &os = std::cout, std::string const &indent = "" );
// Getter accessors:
+ /// \brief returns pixel area holding RGB Pixels, made from Grey level + LUT
uint8_t *GetRGB() { return RGB; }
+ /// \brief returns pixel area length -RGB Pixels, (from Grey level + LUT)-
size_t GetRGBSize() { return RGBSize; }
+ /// \brief returns pixel area holding native RGB Pixels or Grey level
uint8_t *GetRaw() { return Raw; }
+ /// \brief returns pixel area size -native RGB Pixels or Grey level-
size_t GetRawSize() { return RawSize; }
+ /// \brief returns Red Green Blue Alpha LUT
uint8_t *GetLutRGBA() { return LutRGBA; }
+ /// \brief returns Lut Item Number
int GetLutItemNumber() { return LutItemNumber; }
+ /// \brief returns Lut Item Size
int GetLutItemSize() { return LutItemSize; }
// Predicates:
bool IsRawRGB();
void Squeeze();
bool BuildRGBImage();
void BuildLUTRGBA();
-
+/// \brief Allow user to pass his own function to modify pixels
+/// (e.g; mirror, upsidedown, ...) just after reading
void SetUserFunction( VOID_FUNCTION_PUINT8_PFILE_POINTER userFunc )
{ UserFunction = userFunc; }
-private:
+
// Use the fp:
void ReadAndDecompress12BitsTo16Bits( std::ifstream *fp )
throw ( FormatError );
Program: gdcm
Module: $RCSfile: gdcmPixelWriteConvert.cxx,v $
Language: C++
- Date: $Date: 2005/09/21 09:44:59 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2005/10/23 15:09:19 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//-----------------------------------------------------------------------------
// Public
/**
- * \brief SetReadData
+ * \brief sets Read Data (and size)
* @param data data (uint8_t is for prototyping. if your data is not uint8_t
* just cast the pointer for calling the method)
- * @param size size in bytes
+ * @param size data size, in bytes
*/
void PixelWriteConvert::SetReadData(uint8_t *data, size_t size)
{
}
/**
- * \brief Sets User Data
+ * \brief Sets the internal pointer to the caller's inData
+ * image representation, BUT WITHOUT COPYING THE DATA.
+ * - 'image' Pixels are presented as C-like 2D arrays : line per line.
+ * - 'volume'Pixels are presented as C-like 3D arrays : plane per plane
+ * \warning Since the pixels are not copied, it is the caller's responsability
+ * not to deallocate its data before gdcm uses them (e.g. with
+ * the Write() method )
* @param data data (uint8_t is for prototyping. if your data is not uint8_t
* just cast the pointer for calling the method)
- * @param size size in bytes
+ * @param size size, in bytes.
*/
void PixelWriteConvert::SetUserData(uint8_t *data, size_t size)
{
/**
* \brief Get Data Size (UserData or ReadData)
- * @return size size in bytes
+ * @return size, in bytes.
*/
size_t PixelWriteConvert::GetDataSize()
{
Program: gdcm
Module: $RCSfile: gdcmPixelWriteConvert.h,v $
Language: C++
- Date: $Date: 2005/01/11 15:15:38 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2005/10/23 15:09:19 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
/**
* \brief Utility container for gathering the various forms the pixel data
- * migth take during the user demanded processes.
+ * migth take during the user requiered processes.
+ * \warning None of the methods may be called by end user (they have no
+ * meaning outside the class FileHelper)
*/
class GDCM_EXPORT PixelWriteConvert : public Base
{
-public:
+friend class FileHelper;
+
+private:
PixelWriteConvert();
virtual ~PixelWriteConvert();
// Set/Get of images and their size
- void SetReadData(uint8_t *data,size_t size);
+
+ void SetReadData(uint8_t *data, size_t size);
+ /// \brief returns ReadData
uint8_t *GetReadData() { return ReadData; }
+ /// \brief returns ReadDataSize
size_t GetReadDataSize() { return ReadDataSize; }
- void SetUserData(uint8_t *data,size_t size);
+ void SetUserData(uint8_t *data, size_t size);
+ /// \brief returns UserData
uint8_t *GetUserData() { return UserData; }
+ /// \brief returns UserDataSize
size_t GetUserDataSize() { return UserDataSize; }
// Get the used image and its size
uint8_t *GetData();
size_t GetDataSize();
-private:
+
// Variables
/// Pixel data represented as RGB after LUT color interpretation.
uint8_t *ReadData;