class TFBaseImage: public TFIOElement


  File:      TFImage.cpp

  Version:   1.0

  Author:    Reiner Rohlfs (GADC)

  History:   1.0    12.08.03  first released version
             1.1.2  14.02.05  new MakeHisto() function for 3 dim
                              images
             1.1.5  08.12.06  TFBaseImage copy constructor


Function Members (Methods)

public:
TFBaseImage()
TFBaseImage(const TFBaseImage& image)
TFBaseImage(const char* name, UInt_t dim1)
TFBaseImage(const char* name, UInt_t dim1, UInt_t dim2)
TFBaseImage(const char* name, UInt_t numDim, UInt_t* size)
TFBaseImage(const char* name, const char* fileName, UInt_t dim1)
TFBaseImage(const char* name, UInt_t dim1, UInt_t dim2, UInt_t dim3)
TFBaseImage(const char* name, const char* fileName, UInt_t dim1, UInt_t dim2)
TFBaseImage(const char* name, const char* fileName, UInt_t numDim, UInt_t* size)
TFBaseImage(const char* name, const char* fileName, UInt_t dim1, UInt_t dim2, UInt_t dim3)
virtual~TFBaseImage()
voidTObject::AbstractMethod(const char* method) const
virtual voidTFHeader::AddAttribute(const TFBaseAttr& attr, Bool_t replace = kTRUE)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual voidTFIOElement::CloseElement()
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTFHeader::DelAttribute(const char* key, Int_t index = -1)
virtual voidTObject::Delete(Option_t* option = "")
virtual Int_tTFIOElement::DeleteElement(Bool_t updateMemory = kFALSE)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual TFBaseAttr&TFHeader::GetAttribute(const char* key, UInt_t index = 0) const
virtual Int_tTFIOElement::GetCompressionLevel()
virtual Int_tTFIOElement::GetCycle() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TFIOElement::GetFileName() const
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual UInt_tTFHeader::GetNumAttributes(const char* key = NULL) const
virtual UInt_tGetNumDim(Bool_t sub = kFALSE) const
virtual UInt_tGetNumPixel(Bool_t sub = kFALSE)
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual voidGetSize(UInt_t* size, Bool_t sub = kFALSE) const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTFIOElement::IsFileConnected() const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tIsSubSection() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
virtual TFAttrIterTFHeader::MakeAttrIterator() const
virtual TH1*MakeHisto(TClass* type = TH2D::Class())
virtual TH1*MakeHisto(UInt_t zPos, TClass* type = TH2D::Class())
virtual voidMakeSubSection(UInt_t* begin, UInt_t* end)
virtual TTree*MakeTree(TFNameConvert* nameConvert = NULL) const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TFImage<Bool_t, BoolFormat>*operator TFImage<bool,BoolFormat>*()
TFImage<Char_t, CharFormat>*operator TFImage<char,CharFormat>*()
TFImage<Double_t, DoubleFormat>*operator TFImage<double,DoubleFormat>*()
TFImage<Float_t, FloatFormat>*operator TFImage<float,FloatFormat>*()
TFImage<Int_t, IntFormat>*operator TFImage<int,IntFormat>*()
TFImage<Short_t, ShortFormat>*operator TFImage<short,ShortFormat>*()
TFImage<UChar_t, UCharFormat>*operator TFImage<unsigned char,UCharFormat>*()
TFImage<UInt_t, UIntFormat>*operator TFImage<unsigned int,UIntFormat>*()
TFImage<UShort_t, UShortFormat>*operator TFImage<unsigned short,UShortFormat>*()
TFBaseImage&operator=(const TFBaseImage&)
virtual boolTFIOElement::operator==(const TFHeader& ioelement) const
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTFIOElement::Print(Option_t* option = "") const
virtual voidTFHeader::PrintH(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidResetSubSection()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual Int_tTFIOElement::SaveElement(const char* fileName = NULL, Int_t compLevel = -1)
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTFIOElement::SetCompressionLevel(Int_t level)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
voidTFIOElement::SetFileAccess(FMode mode)
voidTFIOElement::SetIO(TFVirtualIO* io)
virtual voidTNamed::SetName(const char* name)
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual Bool_tFillBranchBuffer(UInt_t index) const
virtual voidFillHist(TH1* hist, UInt_t xSize)
virtual voidFillHist(TH2* hist, UInt_t ySize, UInt_t xSize)
virtual voidFillHist_3D(TH2* hist, UInt_t zPos, UInt_t ySize, UInt_t xSize)
voidInitMemory()
virtual voidMakePixelBranch(TTree* tree) const
voidTObject::MakeZombie()
virtual voidTFIOElement::NewFile(const char* fileName)
virtual voidTFIOElement::UpdateMemory()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
list<TFBaseAttr*>TFHeader::fAttra list of attributes
FModeTFIOElement::fFileAccess!access to the file read, readwrite
TStringTNamed::fNameobject identifier
UInt_tfNumDataNumber of pixels in image
UInt_tfNumDimNumber of dimensions of image
UInt_tfNumSubDim! Number of dimensions of sub image
UInt_t*fSize[fNumDim] Coded size of image in each dimension
UInt_t*fSizeNFr! Original size of the subimage in each not frozen dimension
UInt_t*fSubFreeze! Frozen offset in each dimension of the subSection
Bool_tfSubImage! kTRUE if subimage is defined
UInt_t*fSubOffset! Offset in each dimension of the subSection
UInt_t*fSubSize! Size of the subimage in each not frozen dimension
TStringTNamed::fTitleobject title
TFVirtualIO*TFIOElement::fio!interface to the file

Class Charts

Inheritance Chart:
TObject
TNamed
TFHeader
TFIOElement
TFBaseImage
TFImage<bool,BoolFormat>
TFImage<char,CharFormat>
TFImage<double,DoubleFormat>
TFImage<float,FloatFormat>
TFImage<int,IntFormat>
TFImage<short,ShortFormat>
TFImage<unsigned char,UCharFormat>
TFImage<unsigned int,UIntFormat>
TFImage<unsigned short,UShortFormat>

Function documentation

TFBaseImage(const TFBaseImage& image)
 Default constructor. The image has 0 dimension and is not
 associated with an image in a file.
 Don't use this constructor. The image should have at least a name.
TFBaseImage(const TFBaseImage& image)
 copy constructor
TFBaseImage(const char* name, UInt_t dim1)
 Creates a 1 - dimensional image in memory
TFBaseImage(const char * name, UInt_t dim1, UInt_t dim2)
 Creates a 2 - dimensional image in memory
 dim2 is the most frequently changing dimension, i.e X
 to access one pixel use image[dim1][dim2]
TFBaseImage(const char * name, UInt_t dim1, UInt_t dim2, UInt_t dim3)
 Creates a 3 - dimensional image in memory
 dim3 is the most frequently changing dimension, i.e X
 to access one pixel use image[dim1][dim2][dim3]
TFBaseImage(const char * name, UInt_t numDim, UInt_t * size)
 Creates a n - dimensional image in memory
 to create a 5 - dimensional image one can write:
    UInt_t size[5] = {4, 6, 3, 10, 15};
    TIntImage * img = new TIntImage("name", 5, size);
 Again the most right index (in the example the value 15) is the most
 frequently changing dimension
TFBaseImage(const char * name, const char * fileName, UInt_t dim1)
 Creates a new 1 - dimensional image in memory and associates it with a new
 image in a file.
TFBaseImage(const char * name, const char * fileName, UInt_t dim1, UInt_t dim2)
 Creates a new 2 - dimensional image in memory and associates it with a new
 image in a file.
 dim2 is the most frequently changing dimension, i.e X
 to access one pixel use image[dim1][dim2]
TFBaseImage(const char* name, const char* fileName, UInt_t dim1, UInt_t dim2, UInt_t dim3)
 Creates a new 3 - dimensional image in memory and associates it with a new
 image in a file.
 dim3 is the most frequently changing dimension, i.e X
 to access one pixel use image[dim1][dim2][dim3]
TFBaseImage(const char * name, const char * fileName, UInt_t numDim, UInt_t * size)
 Creates a new 3 - dimensional image in memory and associates it with a new
 image in a file.
 to create a 5 - dimensional image one can write:
    UInt_t size[5] = {4, 6, 3, 10, 15};
    TIntImage * img = new TIntImage("name", 5, size);
 Again the most right index (in the example the value 15) is the most
 frequently changing dimension
~TFBaseImage()
 destructor
void InitMemory()
 protected funcion to initialze some arrays.
void GetSize(UInt_t* size, Bool_t sub = kFALSE) const
 Returns the size in each dimension. The array of size must be large enough
 to hold a value for each dimension. Use GetNumDim() to ask for the number
 of dimesnions of the image.
 If sub == kFALSE (the default) the size of the original image is returnd
 independent of a previously call of the MakeSubSection() - function.
 If sub == kTRUE the size of a sub - image is returned which was previously
 defined with the MakeSubSection() - function.
 In any case size[0] will hold the size of the least frequently changing
 dimension. For example for a 2 - dimensional image the Y - axis.
UInt_t GetNumPixel(Bool_t sub = kFALSE)
 returns the total number of pixels of the original image (sub == kTRUE)
 or of a previously defined sub - image (sub = kTRUE)
void MakeSubSection(UInt_t* begin, UInt_t* end)
 Defines a subsection of an image.
 begin defines the first pixel in each dimension of the original
 image which will be become the index 0 of the sub section.
 end defines the pixel in each dimension of the original
 image which will be behind the last pixel of the sub - image.
 The size of the sub - image in a dimension will be
 end[dimX] - begin[dimX]
 The first index ( index 0 ) of begin and end defines the least
 frequently changing dimension. For example in a 2 - dimensional
 image the Y - axis.

 A dimension can be freezed if begin[dimX] == end[dimX]
 A pixel of the sub - image must be accessed with the operator ()
 instead of the opertor []. Frozen dimensions must be skipped.

 For example:
    TFIntImg img("name", 10, 5, 20);
    UInt_t begin[3] = {3 , 3, 10};
    UInt_t end[3]   = {10, 3, 15};
    img.MakeSubSection(begin, end);

 The sub - image of img has 2 dimensions and is of size  7 X 5
 img[4][3][12] will now access the same pixel as img(1)(2)

 As second call of this function will first reset the image to its
 original size and than apply the begin and end - values.
void ResetSubSection()
 Resets a previously resized image ( fucntion MakeSubSection() ) to its
 original size.
TH1 * MakeHisto(TClass* type = TH2D::Class())
 Create a new histogram of the required type
 Only one and two dimensional histograms are supported
 If a sub - image is defined ( function MakeSubSection() ) the histogram
 will be created using only the sub -image, else the full image is
 used. If the image has more dimensins than the histogram the least
 frequently dimensions of the image are used.
 For example to create a two dimensional histogram of the X - and Z - dimension
 from a 3 - dimensional image first a sub - section with a freezing
 third dimension has to be defined. For example:

    UInt_t begin[3] = {3,  2, 20};
    UInt_t end[3]   = {35, 2, 432};
    img.MakeSubSection(begin, end);
    TH2D * hist = dynamic_cast<TH2D*>(img.MakeHisto());

 The parameter type defines the Class type of the returned histogram.
 For example:
    TH2F * hist = (TH2F*)MakeHisto( TH2F::Class() )

 The returned histogram has to be deleted by the calling function
TH1 * MakeHisto(UInt_t zPos, TClass* type = TH2D::Class())
 Create a new histogram of the required type
 Only one and two dimensional histograms are supported

 If this image is has 3 dimensions (z,y,x) and the histogram has 2
 dimensions (y,x) the parameter zPos defines the z - position which
 is used to build the histogram. zPos = 0 defines the first layer.
 In any other case the value of zPos has not affect. To build a
 subcube of the images use the function MakeSubSection() as described
 hereafter.

 If a sub - image is defined ( function MakeSubSection() ) the histogram
 will be created using only the sub -image, else the full image is
 used. If the image has more dimensins than the histogram the least
 frequently dimensions of the image are used.
 For example to create a two dimensional histogram of the X - and Z - dimension
 from a 3 - dimensional image first a sub - section with a freezing
 third dimension has to be defined. For example:

    UInt_t begin[3] = {3,  2, 20};
    UInt_t end[3]   = {35, 2, 432};
    img.MakeSubSection(begin, end);
    TH2D * hist = dynamic_cast<TH2D*>(img.MakeHisto());

 The parameter type defines the Class type of the returned histogram.
 For example:
    TH2F * hist = (TH2F*)MakeHisto( TH2F::Class() )

 The returned histogram has to be deleted by the calling function
TTree * MakeTree(TFNameConvert* nameConvert = NULL) const
 cretes a TTree. One branch is the pixel value the other branches are
 the axis of this image. There is one record per image pixel which are
 not NULL. If a sub - image is defined the tree will be build only of
 the pixels of this sub - image.
 nameConvert can be NULL. But it will be adopted by this
 function and will be deleted by this function if it is not NULL.
 The calling function has to delete the returning tree.
UInt_t GetNumDim(Bool_t sub = kFALSE) const
{return sub ? fNumSubDim : fNumDim;}
Bool_t IsSubSection()
{return fSubImage;}
void FillHist(TH1* hist, UInt_t xSize)
{}
void FillHist(TH2* hist, UInt_t ySize, UInt_t xSize)
{}
void FillHist_3D(TH2* hist, UInt_t zPos, UInt_t ySize, UInt_t xSize)
{}
void MakePixelBranch(TTree* tree) const
{}
Bool_t FillBranchBuffer(UInt_t index) const
{return kFALSE;}
operator=(const TFBaseImage& )
IsA()

Author: (GADC)
Last update: Fri Mar 14 13:55:09 2008

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.