Evita  0.16
evCodecSARLComponentInfo.h
Go to the documentation of this file.
1 /*
2  *
3  * EVITA: Efficient Visualization of Terascale Datasets
4  * Copyright (C) 2000-2016 Team Evita
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
19  * MA 02139, USA.
20  *
21  */
22 
23 
24 #ifndef __evCodecSARLComponentInfo_h
25 #define __evCodecSARLComponentInfo_h
26 
27 
28 #include "evField.h"
29 
30 
32 {
33 public:
34  void Initialize(void);
35  void Free(void);
38  virtual ~evCodecSARLComponentInfo(void);
39 
40  virtual const evString GetClassName(void) const
41  {
42  return(evString("evCodecSARLComponentInfo"));
43  }
44 
45  void SetHighestBitplane(int highest_bitplane);
46  int GetHighestBitplane(void) const;
47  void SetThreshold(double threshold);
48  double GetThreshold(void) const;
49  void SetArithmeticModel(QccENTArithmeticModel *model);
50  QccENTArithmeticModel *GetArithmeticModel(void);
51  evMapField *GetCodecMap(void);
52 
53  int SetCodecMapSize(const unsigned int size);
54  int ResizeCodecMap(const unsigned int size);
55 
56 protected:
57 
58 private:
59  int Header;
60  int Mask;
62  double Threshold;
64 };
65 
66 
68 {
69  this->Header = 1;
70  this->Mask = 1;
71  this->HighestBitplane = 0;
72  this->Threshold = 0;
73 }
74 
75 
77 {
78  this->Initialize();
79 }
80 
81 
83 {
84  this->Initialize();
85 }
86 
87 
89  evCodecSARLComponentInfo &component_info)
90 {
91  this->Initialize();
92 }
93 
94 
96 {
97  this->Free();
98 }
99 
100 
101 inline void evCodecSARLComponentInfo::SetHighestBitplane(int highest_bitplane)
102 {
103  this->HighestBitplane = highest_bitplane;
104 }
105 
106 
108 {
109  return(this->HighestBitplane);
110 }
111 
112 
113 inline void evCodecSARLComponentInfo::SetThreshold(double threshold)
114 {
115  this->Threshold = threshold;
116 }
117 
118 
119 inline double evCodecSARLComponentInfo::GetThreshold(void) const
120 {
121  return(this->Threshold);
122 }
123 
124 
126 {
127  return(&(this->CodecMap));
128 }
129 
130 
131 inline int evCodecSARLComponentInfo::SetCodecMapSize(const unsigned int size)
132 {
133  evAddress size2(1);
134  size2[0] = size;
135 
136  if (this->CodecMap.SetSize(size2))
137  {
138  ErrorHandler.ErrorMessage("evCodecSARLComponentInfo::SetCodecMapSize(): Error calling evField::SetSize()");
139  return(1);
140  }
141 
142  return(0);
143 }
144 
145 
146 inline int evCodecSARLComponentInfo::ResizeCodecMap(const unsigned int size)
147 {
148  evAddress size2(1);
149  size2[0] = size;
150 
151  if (this->CodecMap.Resize(size2))
152  {
153  ErrorHandler.ErrorMessage("evCodecSARLComponentInfo::SetCodecMapSize(): Error calling evField::ReSize()");
154  return(1);
155  }
156 
157  return(0);
158 }
159 
160 
161 #endif
QccENTArithmeticModel * GetArithmeticModel(void)
void Initialize(void)
Definition: evCodecSARLComponentInfo.h:67
evCodecSARLComponentInfo(void)
Definition: evCodecSARLComponentInfo.h:82
virtual int SetSize(const evAddress &size, const bool allocate=true)
Definition: evField.h:203
Definition: evAddress.h:37
int HighestBitplane
Definition: evCodecSARLComponentInfo.h:61
void Free(void)
Definition: evCodecSARLComponentInfo.h:76
int GetHighestBitplane(void) const
Definition: evCodecSARLComponentInfo.h:107
Definition: evCodecSARLComponentInfo.h:31
void SetHighestBitplane(int highest_bitplane)
Definition: evCodecSARLComponentInfo.h:101
Definition: evDataObject.h:31
evMapField CodecMap
Definition: evCodecSARLComponentInfo.h:63
int Header
Definition: evCodecSARLComponentInfo.h:59
double GetThreshold(void) const
Definition: evCodecSARLComponentInfo.h:119
void SetThreshold(double threshold)
Definition: evCodecSARLComponentInfo.h:113
evErrorHandler ErrorHandler
int Mask
Definition: evCodecSARLComponentInfo.h:60
int SetCodecMapSize(const unsigned int size)
Definition: evCodecSARLComponentInfo.h:131
void ErrorMessage(const char *format,...)
evMapField * GetCodecMap(void)
Definition: evCodecSARLComponentInfo.h:125
int ResizeCodecMap(const unsigned int size)
Definition: evCodecSARLComponentInfo.h:146
virtual ~evCodecSARLComponentInfo(void)
Definition: evCodecSARLComponentInfo.h:95
virtual int Resize(const evAddress &size, const bool linear=0)
Definition: evField.h:224
void SetArithmeticModel(QccENTArithmeticModel *model)
double Threshold
Definition: evCodecSARLComponentInfo.h:62
virtual const evString GetClassName(void) const
Definition: evCodecSARLComponentInfo.h:40
Definition: evString.h:30