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
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() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TFHeader::AddAttribute(const TFBaseAttr& attr, Bool_t replace = kTRUE) |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual void | TFIOElement::CloseElement() |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual void | TNamed::Copy(TObject& named) const |
virtual void | TFHeader::DelAttribute(const char* key, Int_t index = -1) |
virtual void | TObject::Delete(Option_t* option = "") |
virtual Int_t | TFIOElement::DeleteElement(Bool_t updateMemory = kFALSE) |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() const |
virtual TObject* | TObject::DrawClone(Option_t* option = "") const |
virtual void | TObject::Dump() const |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::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_t | TFIOElement::GetCompressionLevel() |
virtual Int_t | TFIOElement::GetCycle() const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual const char* | TFIOElement::GetFileName() const |
virtual const char* | TObject::GetIconName() const |
virtual const char* | TNamed::GetName() const |
virtual UInt_t | TFHeader::GetNumAttributes(const char* key = NULL) const |
virtual UInt_t | GetNumDim(Bool_t sub = kFALSE) const |
virtual UInt_t | GetNumPixel(Bool_t sub = kFALSE) |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual void | GetSize(UInt_t* size, Bool_t sub = kFALSE) const |
virtual const char* | TNamed::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() const |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TFIOElement::IsFileConnected() const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
virtual Bool_t | IsSubSection() const |
Bool_t | TObject::IsZombie() const |
virtual void | TNamed::ls(Option_t* option = "") const |
virtual TFAttrIter | TFHeader::MakeAttrIterator() const |
virtual TH1* | MakeHisto(TClass* type = TH2D::Class()) |
virtual TH1* | MakeHisto(UInt_t zPos, TClass* type = TH2D::Class()) |
virtual void | MakeSubSection(UInt_t* begin, UInt_t* end) |
virtual TTree* | MakeTree(TFNameConvert* nameConvert = NULL) const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | TObject::Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::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 bool | TFIOElement::operator==(const TFHeader& ioelement) const |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TFIOElement::Print(Option_t* option = "") const |
virtual void | TFHeader::PrintH(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | ResetSubSection() |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") const |
virtual Int_t | TFIOElement::SaveElement(const char* fileName = NULL, Int_t compLevel = -1) |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TFIOElement::SetCompressionLevel(Int_t level) |
virtual void | TObject::SetDrawOption(Option_t* option = "") |
static void | TObject::SetDtorOnly(void* obj) |
void | TFIOElement::SetFileAccess(FMode mode) |
void | TFIOElement::SetIO(TFVirtualIO* io) |
virtual void | TNamed::SetName(const char* name) |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TNamed::SetTitle(const char* title = "") |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual Int_t | TNamed::Sizeof() const |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
virtual Bool_t | FillBranchBuffer(UInt_t index) const |
virtual void | FillHist(TH1* hist, UInt_t xSize) |
virtual void | FillHist(TH2* hist, UInt_t ySize, UInt_t xSize) |
virtual void | FillHist_3D(TH2* hist, UInt_t zPos, UInt_t ySize, UInt_t xSize) |
void | InitMemory() |
virtual void | MakePixelBranch(TTree* tree) const |
void | TObject::MakeZombie() |
virtual void | TFIOElement::NewFile(const char* fileName) |
virtual void | TFIOElement::UpdateMemory() |
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
list<TFBaseAttr*> | TFHeader::fAttr | a list of attributes |
FMode | TFIOElement::fFileAccess | !access to the file read, readwrite |
TString | TNamed::fName | object identifier |
UInt_t | fNumData | Number of pixels in image |
UInt_t | fNumDim | Number of dimensions of image |
UInt_t | fNumSubDim | ! 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_t | fSubImage | ! 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 |
TString | TNamed::fTitle | object title |
TFVirtualIO* | TFIOElement::fio | !interface to the file |
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.
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]
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]
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
Creates a new 1 - dimensional image in memory and associates it with a new image in a file.
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]
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]
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
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.
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.
Resets a previously resized image ( fucntion MakeSubSection() ) to its original size.
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
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
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.