!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/include/gdcm-3.0/   drwxr-xr-x
Free 13.31 GB of 57.97 GB (22.97%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     gdcmIconImageGenerator.h (3.09 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*=========================================================================

  Program: GDCM (Grassroots DICOM). A DICOM library

  Copyright (c) 2006-2011 Mathieu Malaterre
  All rights reserved.
  See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
#ifndef GDCMICONIMAGEGENERATOR_H
#define GDCMICONIMAGEGENERATOR_H

#include "gdcmPixmap.h"
#include "gdcmIconImage.h"

namespace gdcm
{
class IconImageGeneratorInternals;
/**
 * \brief IconImageGenerator
 * \details This filter will generate a valid Icon from the Pixel Data element (an
 * instance of Pixmap).
 * To generate a valid Icon, one is only allowed the following Photometric
 * Interpretation:
 * - MONOCHROME1
 * - MONOCHROME2
 * - PALETTE_COLOR
 *
 * The Pixel Bits Allocated is restricted to 8bits, therefore 16 bits image
 * needs to be rescaled. By default the filter will use the full scalar range
 * of 16bits image to rescale to unsigned 8bits.
 * This may not be ideal for some situation, in which case the API
 * SetPixelMinMax can be used to overwrite the default min,max interval used.
 *
 * \see ImageReader
 */
class GDCM_EXPORT IconImageGenerator
{
public:
  IconImageGenerator();
  ~IconImageGenerator();

  /// Set/Get File
  void SetPixmap(const Pixmap& p) { P = p; }
  Pixmap &GetPixmap() { return *P; }
  const Pixmap &GetPixmap() const { return *P; }

  /// Set Target dimension of output Icon
  void SetOutputDimensions(const unsigned int dims[2]);

  /// Override default min/max to compute best rescale for 16bits -> 8bits
  /// downscale. Typically those value can be read from the SmallestImagePixelValue
  /// LargestImagePixelValue DICOM attribute.
  void SetPixelMinMax(double min, double max);

  /// Instead of explicitly specifying the min/max value for the rescale
  /// operation, let the internal mechanism compute the min/max of icon and
  /// rescale to best appropriate.
  void AutoPixelMinMax(bool b);

  /// Converting from RGB to PALETTE_COLOR can be a slow operation. However DICOM
  /// standard requires that color icon be described as palette. Set this boolean
  /// to false only if you understand the consequences.
  /// default value is true, false generates invalid Icon Image Sequence
  void ConvertRGBToPaletteColor(bool b);

  /// Set a pixel value that should be discarded. This happen typically for CT image, where
  /// a pixel has been used to pad outside the image (see Pixel Padding Value).
  /// Requires AutoPixelMinMax(true)
  void SetOutsideValuePixel(double v);

  /// Generate Icon
  bool Generate();

  /// Retrieve generated Icon
  const IconImage& GetIconImage() const { return *I; }

protected:

private:
  void BuildLUT( Bitmap & bitmap, unsigned int maxcolor );

  SmartPointer<Pixmap> P;
  SmartPointer<IconImage> I;
  IconImageGeneratorInternals *Internals;
};

} // end namespace gdcm

#endif //GDCMICONIMAGEGENERATOR_H

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0142 ]--