Evita  0.16
evCodecEmbedded.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 __evCodecEmbedded_h
25 #define __evCodecEmbedded_h
26 
27 
28 #include "evCodec.h"
29 #include "evROIList.h"
30 #include "evChannel.h"
31 #include "evPrioritySchedule.h"
33 #include "evBoundingBox.h"
34 
35 
36 class evCodecEmbedded : public evCodec
37 {
38 public:
39  evCodecEmbedded(void);
40  virtual ~evCodecEmbedded(void);
41 
42  virtual const evString GetClassName(void) const
43  {
44  return(evString("evCodecEmbedded"));
45  }
46 
47  void SetCommandChannel(evChannel *channel);
48 
49  void SetPriorityScheduleFilename(const evString priority_schedule_filename);
50  void GetPriorityScheduleFilename(evString &priority_schedule_filename) const;
52 
53  void SetController(evMultiProcessController *controller);
55 
56  void SetVisualizerComponent(const unsigned int component);
57 
58  void SetBitRate(const double bit_rate);
59  void Abort(void);
60 
61 protected:
65 
69 
71 
72  double BitRate;
73  double *Max;
74  double *Min;
75  unsigned int NumROIs;
76  std::vector<unsigned int> NumTiles;
77  int TotalSize;
78 
79  // int ExplicitGrid;
80 
81  std::vector<std::vector<std::vector<evVector> > > Means;
82  std::vector<std::vector<evBoundingBox> > BoundingBoxes;
83  std::vector<std::vector<double> > GridSpacings;
84  std::vector<std::vector<unsigned int> > MaxNumScales;
85 
87 
89 
90  unsigned int VisualizerComponent;
92  double PixelSize;
93 
94  int AbortFlag;
95 
96  virtual void SetVisualizerRange(const evDataset &dataset);
97 
98  void GetNumROITiles(const evDataset &dataset);
99  void GetNumROITiles(const evPrioritySchedule &queue);
100 
101  virtual int DecodeReconstructROI(const unsigned int current_roi,
102  const unsigned int current_tile,
103  const unsigned int current_component) = 0;
104  virtual int DeactivateROI(const evPriorityScheduleEntry &entry) = 0;
105 
106  virtual int EncodeUpdatePrioritySchedule(const evBitBuffer &output_buffer,
107  const unsigned int current_roi,
108  const unsigned int current_tile,
109  const unsigned int
110  current_component,
111  const unsigned int current_bitplane,
112  const unsigned int current_scale,
113  const double current_priority);
114 
115  int SetupVisualizer(const evDataset &dataset);
116  int WaitForVisualizer(void) const;
117  int SignalVisualizer(evROI *roi) const;
118  int ProcessROISelections(void) const;
119  int ProcessViewFrustum(const int blocking);
120  int UpdateQueues(void);
121 
122  virtual int ProcessLevelOfDetail(void) = 0;
123 
124 private:
125 
126 };
127 
128 
129 inline void
131 {
132  this->CommandChannel = channel;
133 }
134 
135 
136 inline void
138  priority_schedule_filename)
139 {
140  this->PriorityScheduleFilename = priority_schedule_filename;
141 }
142 
143 
144 inline void
146  &priority_schedule_filename)
147  const
148 {
149  priority_schedule_filename = this->PriorityScheduleFilename;
150 }
151 
152 
153 inline void
155 {
156  this->PriorityScheduleChannel = channel;
157 }
158 
159 
161  *controller)
162 {
163  this->Controller = controller;
164 }
165 
166 
168 {
169  return(this->Controller);
170 }
171 
172 
173 inline void evCodecEmbedded::SetVisualizerComponent(const unsigned int
174  component)
175 {
176  this->VisualizerComponent = component;
177 }
178 
179 
180 inline void evCodecEmbedded::SetBitRate(const double bit_rate)
181 {
182  this->BitRate = bit_rate;
183 }
184 
185 
186 inline void evCodecEmbedded::Abort(void)
187 {
188  this->AbortFlag = 1;
189 }
190 
191 
192 #endif
std::vector< std::vector< unsigned int > > MaxNumScales
Definition: evCodecEmbedded.h:84
evMultiProcessController * GetController(void) const
Definition: evCodecEmbedded.h:167
Definition: evCodecEmbedded.h:36
virtual int DecodeReconstructROI(const unsigned int current_roi, const unsigned int current_tile, const unsigned int current_component)=0
void SetPriorityScheduleChannel(evChannel *channel)
Definition: evCodecEmbedded.h:154
void SetBitRate(const double bit_rate)
Definition: evCodecEmbedded.h:180
int ProcessViewFrustum(const int blocking)
int SignalVisualizer(evROI *roi) const
int SetupVisualizer(const evDataset &dataset)
void GetPriorityScheduleFilename(evString &priority_schedule_filename) const
Definition: evCodecEmbedded.h:145
virtual int ProcessLevelOfDetail(void)=0
std::vector< std::vector< evBoundingBox > > BoundingBoxes
Definition: evCodecEmbedded.h:82
Definition: evPrioritySchedule.h:36
evPrioritySchedule * AlreadySentQueue
Definition: evCodecEmbedded.h:68
std::vector< std::vector< std::vector< evVector > > > Means
Definition: evCodecEmbedded.h:81
virtual void SetVisualizerRange(const evDataset &dataset)
Definition: evPriorityScheduleEntry.h:39
Definition: evVector.h:36
int TotalSize
Definition: evCodecEmbedded.h:77
Definition: evDataset.h:34
virtual ~evCodecEmbedded(void)
void SetVisualizerComponent(const unsigned int component)
Definition: evCodecEmbedded.h:173
int WaitForVisualizer(void) const
void SetCommandChannel(evChannel *channel)
Definition: evCodecEmbedded.h:130
double PixelSize
Definition: evCodecEmbedded.h:92
Definition: evChannel.h:54
int AbortFlag
Definition: evCodecEmbedded.h:94
double * Max
Definition: evCodecEmbedded.h:73
unsigned int NumROIs
Definition: evCodecEmbedded.h:75
evPrioritySchedule * TransmissionQueue
Definition: evCodecEmbedded.h:67
void GetNumROITiles(const evDataset &dataset)
evPrioritySchedule * InactiveQueue
Definition: evCodecEmbedded.h:66
virtual const evString GetClassName(void) const
Definition: evCodecEmbedded.h:42
Definition: evBitBuffer.h:34
evROIList * Reconstructed
Definition: evCodecEmbedded.h:88
int BitstreamLength
Definition: evCodecEmbedded.h:86
Definition: evMultiProcessController.h:122
Definition: evCodec.h:37
evString PriorityScheduleFilename
Definition: evCodecEmbedded.h:63
std::vector< unsigned int > NumTiles
Definition: evCodecEmbedded.h:76
double * Min
Definition: evCodecEmbedded.h:74
evMultiProcessController * Controller
Definition: evCodecEmbedded.h:70
double BitRate
Definition: evCodecEmbedded.h:72
unsigned int VisualizerComponent
Definition: evCodecEmbedded.h:90
evVector ViewFrustum
Definition: evCodecEmbedded.h:91
int UpdateQueues(void)
void SetController(evMultiProcessController *controller)
Definition: evCodecEmbedded.h:160
evChannel * PriorityScheduleChannel
Definition: evCodecEmbedded.h:64
int ProcessROISelections(void) const
void SetPriorityScheduleFilename(const evString priority_schedule_filename)
Definition: evCodecEmbedded.h:137
evChannel * CommandChannel
Definition: evCodecEmbedded.h:62
std::vector< std::vector< double > > GridSpacings
Definition: evCodecEmbedded.h:83
Definition: evROI.h:40
virtual int DeactivateROI(const evPriorityScheduleEntry &entry)=0
Definition: evString.h:30
virtual int EncodeUpdatePrioritySchedule(const evBitBuffer &output_buffer, const unsigned int current_roi, const unsigned int current_tile, const unsigned int current_component, const unsigned int current_bitplane, const unsigned int current_scale, const double current_priority)
Definition: evROIList.h:32
void Abort(void)
Definition: evCodecEmbedded.h:186