# gdcmIconImage.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004   Module:  $URL$
    00005
    00006   Copyright (c) 2006-2010 Mathieu Malaterre
    00007   All rights reserved.
    00008   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00009
    00010      This software is distributed WITHOUT ANY WARRANTY; without even
    00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00012      PURPOSE.  See the above copyright notice for more information.
    00013
    00014 =========================================================================*/
    00015 #ifndef GDCMICONIMAGE_H
    00016 #define GDCMICONIMAGE_H
    00017
    00018 #if 0
    00019 #include "gdcmObject.h"
    00020 #include "gdcmDataElement.h"
    00021 #include "gdcmPhotometricInterpretation.h"
    00022 #include "gdcmPixelFormat.h"
    00023 #include "gdcmTransferSyntax.h"
    00024
    00025 #include <vector>
    00026
    00027 namespace gdcm
    00028 {
    00029
    00033 class GDCM_EXPORT IconImage : public Object
    00034 {
    00035 public:
    00036   IconImage();
    00037   ~IconImage();
    00038   void Print(std::ostream &) const {}
    00039
    00041   void SetTransferSyntax(TransferSyntax const &ts) {
    00042     TS = ts;
    00043   }
    00044   const TransferSyntax &GetTransferSyntax() const {
    00045     return TS;
    00046   }
    00047   void SetDataElement(DataElement const &de) {
    00048     PixelData = de;
    00049   }
    00050   const DataElement& GetDataElement() const { return PixelData; }
    00051
    00052   void SetColumns(unsigned int col) { SetDimension(0,col); }
    00053   void SetRows(unsigned int rows) { SetDimension(1,rows); }
    00054   void SetDimension(unsigned int idx, unsigned int dim);
    00055   int GetColumns() const { return Dimensions[0]; }
    00056   int GetRows() const { return Dimensions[1]; }
    00057   // Get/Set PixelFormat
    00058   const PixelFormat &GetPixelFormat() const
    00059     {
    00060     return PF;
    00061     }
    00062   void SetPixelFormat(PixelFormat const &pf)
    00063     {
    00064     PF = pf;
    00065     }
    00066
    00067   const PhotometricInterpretation &GetPhotometricInterpretation() const;
    00068   void SetPhotometricInterpretation(PhotometricInterpretation const &pi);
    00069
    00070   bool IsEmpty() const { return Dimensions.size() == 0; }
    00071   void Clear();
    00072
    00073   bool GetBuffer(char *buffer) const;
    00074
    00075 private:
    00076   TransferSyntax TS;
    00077   PixelFormat PF; // SamplesPerPixel, BitsAllocated, BitsStored, HighBit, PixelRepresentation
    00078   PhotometricInterpretation PI;
    00079   std::vector<unsigned int> Dimensions; // Col/Row
    00080   std::vector<double> Spacing; // PixelAspectRatio ?
    00081   DataElement PixelData; // copied from 7fe0,0010
    00082   static const unsigned int NumberOfDimensions = 2;
    00083 };
    00084
    00085 } // end namespace gdcm
    00086 #endif
    00087 #include "gdcmBitmap.h"
    00088
    00089 namespace gdcm
    00090 {
    00091   //class GDCM_EXPORT IconImage : public Pixmap {};
    00092   typedef Bitmap IconImage;
    00093 }
    00094
    00095 #endif //GDCMICONIMAGE_H