1 #ifndef ViewportBuffer_h 2 #define ViewportBuffer_h 37 template<
class T >
class QQueue;
44 class ViewportBufferAction;
45 class ViewportBufferFill;
46 class ViewportBufferStretch;
47 class ViewportBufferTransform;
86 const std::vector<double> &
getLine(
int line);
89 void pan(
int deltaX,
int deltaY);
142 void ReadCube(
int cubeId,
int startSample,
int startLine,
143 int endSample,
int endLine,
int band,
void *caller);
149 QRect getXYBoundingRect();
151 void updateBoundingRects();
152 void doQueuedActions();
161 void resizeBuffer(
unsigned int width,
unsigned int height);
162 void shiftBuffer(
int deltaX,
int deltaY);
164 bool actionsPreserveData();
165 bool reinitializeActionExists();
175 std::vector< std::vector<double> > p_buffer;
176 bool p_bufferInitialized;
182 QRect p_XYBoundingRect;
183 QRect p_oldXYBoundingRect;
193 int p_viewportHeight;
194 int p_oldViewportHeight;
195 int p_vertScrollBarPos;
196 int p_oldVertScrollBarPos;
197 bool p_initialStretchDone;
198 double p_requestedFillArea;
203 enum sampLineRectPosition {
217 bool p_bricksOrdered;
Reads and stores visible DN values.
Definition: ViewportBuffer.h:78
const std::vector< double > & getLine(int line)
Retrieves a line from the buffer.
Definition: ViewportBuffer.cpp:334
void ReadCube(int cubeId, int startSample, int startLine, int endSample, int endLine, int band, void *caller)
Ask the cube data thread for data.
void DoneWithData(int, const Isis::Brick *)
Tell cube data thread we're done with a brick.
Buffer for containing a three dimensional section of an image.
Definition: Brick.h:61
double currentProgress()
Returns the viewport buffer's loading progress.
Definition: ViewportBuffer.cpp:625
void emptyBuffer(bool force=false)
This is meant to clear up ram on non-active viewports.
Definition: ViewportBuffer.cpp:1233
Definition: ViewportBufferFill.h:21
int getBand()
Return the band associated with this viewport buffer.
Definition: ViewportBuffer.h:103
Definition: ViewportBufferStretch.h:14
Definition: BoxcarCachingAlgorithm.h:30
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:132
double totalUnfilledArea()
This returns the amount of area in the queue that needs new cube data/will be filled by fill actions...
Definition: ViewportBuffer.cpp:641
QRect bufferXYRect()
Returns a rect, in screen pixels, of the area this buffer covers.
Definition: ViewportBuffer.cpp:1249
void resizedViewport()
Call this when the viewport is resized (not zoomed).
Definition: ViewportBuffer.cpp:893
bool enabled()
Returns whether the buffer is enabled (reading data) or not.
Definition: ViewportBuffer.h:120
ViewportBuffer(CubeViewport *viewport, CubeDataThread *cubeData, int cubeId)
ViewportBuffer constructor.
Definition: ViewportBuffer.cpp:36
void enable(bool enabled)
This turns on or off reading from the cube.
Definition: ViewportBuffer.cpp:1294
void scaleChanged()
Call this when zoomed, re-reads visible area.
Definition: ViewportBuffer.cpp:1273
Encapsulation of Cube I/O with Change Notifications.
Definition: CubeDataThread.h:53
bool working()
This tests if queued actions exist in the viewport buffer.
Definition: ViewportBuffer.cpp:751
void fillBuffer(QRect rect)
This method will convert the rect to sample/line positions and read from the cube into the buffer...
Definition: ViewportBuffer.cpp:106
void DataReady(void *requester, int cubeId, const Isis::Brick *brick)
This method is called when requested bricks become available.
Definition: ViewportBuffer.cpp:200
void setBand(int band)
Sets the band to read from, the buffer will be re-read if the band changes.
Definition: ViewportBuffer.cpp:1311
virtual ~ViewportBuffer()
Updates total buffer size on destruction.
Definition: ViewportBuffer.cpp:72
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
bool hasEntireCube()
Method to see if the entire cube is in the buffer.
Definition: ViewportBuffer.cpp:415
void pan(int deltaX, int deltaY)
Call this when the viewport is panned.
Definition: ViewportBuffer.cpp:1040
void addStretchAction()
When all current operations finish the cube viewport will be asked to do a stretch if you call this...
Definition: ViewportBuffer.cpp:1212
Definition: ViewportBufferAction.h:11