GDCM 2.2.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

gdcmIconImageGenerator.h
Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004
    00005   Copyright (c) 2006-2011 Mathieu Malaterre
    00006   All rights reserved.
    00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00008
    00009      This software is distributed WITHOUT ANY WARRANTY; without even
    00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00011      PURPOSE.  See the above copyright notice for more information.
    00012
    00013 =========================================================================*/
    00014 #ifndef GDCMICONIMAGEGENERATOR_H
    00015 #define GDCMICONIMAGEGENERATOR_H
    00016
    00017 #include "gdcmPixmap.h"
    00018 #include "gdcmIconImage.h"
    00019
    00020 namespace gdcm
    00021 {
    00022 class IconImageGeneratorInternals;
    00041 class GDCM_EXPORT IconImageGenerator
    00042 {
    00043 public:
    00044   IconImageGenerator();
    00045   ~IconImageGenerator();
    00046
    00048   void SetPixmap(const Pixmap& p) { P = p; }
    00049   Pixmap &GetPixmap() { return *P; }
    00050   const Pixmap &GetPixmap() const { return *P; }
    00051
    00053   void SetOutputDimensions(const unsigned int dims[2]);
    00054
    00058   void SetPixelMinMax(double min, double max);
    00059
    00063   void AutoPixelMinMax(bool b);
    00064
    00069   void ConvertRGBToPaletteColor(bool b);
    00070
    00074   void SetOutsideValuePixel(double v);
    00075
    00077   bool Generate();
    00078
    00080   const IconImage& GetIconImage() const { return *I; }
    00081
    00082 protected:
    00083
    00084 private:
    00085   void BuildLUT( Bitmap & bitmap, unsigned int maxcolor );
    00086
    00087   SmartPointer<Pixmap> P;
    00088   SmartPointer<IconImage> I;
    00089   IconImageGeneratorInternals *Internals;
    00090 };
    00091
    00092 } // end namespace gdcm
    00093
    00094 #endif //GDCMICONIMAGEGENERATOR_H