Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TAttImage Class Reference

TImage attributes.

Image attributes are:

  • Image Quality (see EImageQuality for the list of qualities)
  • Compression defines the compression rate of the color data in the internal image structure. Speed and memory depends on this rate, but not the image display itself 0: no compression; 100: max compression
  • Radio Flag: kTRUE the x/y radio of the displayed image is always identical to the original image kFALSE the x and y size of the displayed image depends on the size of the pad
  • Palette: Defines the conversion from a pixel value to the screen color

This class is used (in general by secondary inheritance) by some other classes (image display).

Definition at line 59 of file TAttImage.h.

Public Types

enum  EImageQuality {
  kImgDefault = -1 , kImgPoor = 0 , kImgFast = 1 , kImgGood = 2 ,
  kImgBest = 3
}
 

Public Member Functions

 TAttImage ()
 TAttImage default constructor.
 
 TAttImage (EImageQuality lquality, UInt_t lcompression, Bool_t constRatio)
 TAttImage normal constructor.
 
virtual ~TAttImage ()
 TAttImage destructor.
 
void Copy (TAttImage &attline) const
 Copy this image attributes to a new attimage.
 
virtual void EditorClosed ()
 
Bool_t GetConstRatio () const
 
UInt_t GetImageCompression () const
 
EImageQuality GetImageQuality () const
 
virtual const TImagePaletteGetPalette () const
 
Bool_t IsPaletteEnabled () const
 
virtual void ResetAttImage (Option_t *option="")
 Reset this image attributes to default values.
 
virtual void SaveImageAttributes (std::ostream &out, const char *name, EImageQuality qualdef=kImgDefault, UInt_t comprdef=0, Bool_t constRatiodef=kTRUE)
 Save image attributes as C++ statement(s) on output stream, but not the palette.
 
virtual void SetConstRatio (Bool_t constRatio=kTRUE)
 Set (constRatio = kTRUE) or unset (constRadio = kFALSE) the ratio flag.
 
virtual void SetImageCompression (UInt_t lcompression)
 
virtual void SetImageQuality (EImageQuality lquality)
 
virtual void SetPalette (const TImagePalette *palette)
 Set a new palette for the image.
 
virtual void SetPaletteEnabled (Bool_t on=kTRUE)
 
virtual void StartPaletteEditor ()
 Opens a GUI to edit the color palette.
 

Protected Attributes

Bool_t fConstRatio
 keep aspect ratio of image on the screen
 
UInt_t fImageCompression
 compression [0 .. 100] 0: no compression
 
EImageQuality fImageQuality
 OPTION={GetMethod="GetImageQuality";SetMethod="SetImageQuality";Items=(kImgDefault="Default",kImgPoor="Poor",kImgFast="Fast",kImgGood="Good",kImgBest="Best")}
 
TImagePalette fPalette
 color palette for value -> color conversion
 
TPaletteEditorfPaletteEditor
 ! GUI to edit the color palette
 
Bool_t fPaletteEnabled
 ! kTRUE - palette is drawn on the image
 

#include <TAttImage.h>

Inheritance diagram for TAttImage:
[legend]

Member Enumeration Documentation

◆ EImageQuality

Enumerator
kImgDefault 
kImgPoor 
kImgFast 
kImgGood 
kImgBest 

Definition at line 63 of file TAttImage.h.

Constructor & Destructor Documentation

◆ TAttImage() [1/2]

TAttImage::TAttImage ( )

TAttImage default constructor.

Calls ResetAttImage to set the attributes to a default state.

Definition at line 524 of file TAttImage.cxx.

◆ TAttImage() [2/2]

TAttImage::TAttImage ( EImageQuality  lquality,
UInt_t  lcompression,
Bool_t  constRatio 
)

TAttImage normal constructor.

Image attributes are taken from the argument list

Parameters
[in]lqualitymust be one of EImageQuality (kImgDefault is same as kImgGood in the current implementation)
[in]lcompressiondefines the compression rate of the color data in the image. Speed and memory depends on this rate, but not the image display itself 0: no compression; 100: max compression
[in]constRatiokeeps the aspect ratio of the image constant on the screen (in pixel units)

Definition at line 544 of file TAttImage.cxx.

◆ ~TAttImage()

TAttImage::~TAttImage ( )
virtual

TAttImage destructor.

Definition at line 559 of file TAttImage.cxx.

Member Function Documentation

◆ Copy()

void TAttImage::Copy ( TAttImage attline) const

Copy this image attributes to a new attimage.

Definition at line 567 of file TAttImage.cxx.

◆ EditorClosed()

virtual void TAttImage::EditorClosed ( )
inlinevirtual

Definition at line 103 of file TAttImage.h.

◆ GetConstRatio()

Bool_t TAttImage::GetConstRatio ( ) const
inline

Definition at line 85 of file TAttImage.h.

◆ GetImageCompression()

UInt_t TAttImage::GetImageCompression ( ) const
inline

Definition at line 86 of file TAttImage.h.

◆ GetImageQuality()

EImageQuality TAttImage::GetImageQuality ( ) const
inline

Definition at line 87 of file TAttImage.h.

◆ GetPalette()

virtual const TImagePalette & TAttImage::GetPalette ( ) const
inlinevirtual

Definition at line 88 of file TAttImage.h.

◆ IsPaletteEnabled()

Bool_t TAttImage::IsPaletteEnabled ( ) const
inline

Definition at line 104 of file TAttImage.h.

◆ ResetAttImage()

void TAttImage::ResetAttImage ( Option_t option = "")
virtual

Reset this image attributes to default values.

Default values are:

  • quality: kImgPoor, (no smoothing while the image is zoomed)
  • compression: 0 (no compression)
  • constRatio: kTRUE
  • palette: a default rainbow palette

Definition at line 584 of file TAttImage.cxx.

◆ SaveImageAttributes()

void TAttImage::SaveImageAttributes ( std::ostream &  out,
const char *  name,
EImageQuality  qualdef = kImgDefault,
UInt_t  comprdef = 0,
Bool_t  constRatiodef = kTRUE 
)
virtual

Save image attributes as C++ statement(s) on output stream, but not the palette.

Definition at line 620 of file TAttImage.cxx.

◆ SetConstRatio()

void TAttImage::SetConstRatio ( Bool_t  constRatio = kTRUE)
virtual

Set (constRatio = kTRUE) or unset (constRadio = kFALSE) the ratio flag.

The aspect ratio of the image on the screen is constant if the ratio flag is set. That means one image pixel is always a square on the screen independent of the pad size and of the size of the zoomed area.

Definition at line 641 of file TAttImage.cxx.

◆ SetImageCompression()

virtual void TAttImage::SetImageCompression ( UInt_t  lcompression)
inlinevirtual

Definition at line 97 of file TAttImage.h.

◆ SetImageQuality()

virtual void TAttImage::SetImageQuality ( EImageQuality  lquality)
inlinevirtual

Definition at line 99 of file TAttImage.h.

◆ SetPalette()

void TAttImage::SetPalette ( const TImagePalette palette)
virtual

Set a new palette for the image.

If palette == 0 a default rainbow color palette is used.

Reimplemented in TASImage.

Definition at line 650 of file TAttImage.cxx.

◆ SetPaletteEnabled()

virtual void TAttImage::SetPaletteEnabled ( Bool_t  on = kTRUE)
inlinevirtual

Reimplemented in TASImage.

Definition at line 96 of file TAttImage.h.

◆ StartPaletteEditor()

void TAttImage::StartPaletteEditor ( )
virtual

Opens a GUI to edit the color palette.

Reimplemented in TASImage.

Definition at line 780 of file TAttImage.cxx.

Member Data Documentation

◆ fConstRatio

Bool_t TAttImage::fConstRatio
protected

keep aspect ratio of image on the screen

Definition at line 74 of file TAttImage.h.

◆ fImageCompression

UInt_t TAttImage::fImageCompression
protected

compression [0 .. 100] 0: no compression

Definition at line 73 of file TAttImage.h.

◆ fImageQuality

EImageQuality TAttImage::fImageQuality
protected

OPTION={GetMethod="GetImageQuality";SetMethod="SetImageQuality";Items=(kImgDefault="Default",kImgPoor="Poor",kImgFast="Fast",kImgGood="Good",kImgBest="Best")}

Definition at line 72 of file TAttImage.h.

◆ fPalette

TImagePalette TAttImage::fPalette
protected

color palette for value -> color conversion

Definition at line 75 of file TAttImage.h.

◆ fPaletteEditor

TPaletteEditor* TAttImage::fPaletteEditor
protected

! GUI to edit the color palette

Definition at line 76 of file TAttImage.h.

◆ fPaletteEnabled

Bool_t TAttImage::fPaletteEnabled
protected

! kTRUE - palette is drawn on the image

Definition at line 77 of file TAttImage.h.

Libraries for TAttImage:

The documentation for this class was generated from the following files: