File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
 |
Isis 3 Programmer Reference
|
1 #ifndef ViewportBuffer_h
2 #define ViewportBuffer_h
22 template<
class T >
class QQueue;
29 class ViewportBufferAction;
30 class ViewportBufferFill;
31 class ViewportBufferStretch;
32 class ViewportBufferTransform;
71 const std::vector<double> &
getLine(
int line);
74 void pan(
int deltaX,
int deltaY);
127 void ReadCube(
int cubeId,
int startSample,
int startLine,
128 int endSample,
int endLine,
int band,
void *caller);
146 void resizeBuffer(
unsigned int width,
unsigned int height);
202 bool p_bricksOrdered;
bool reinitializeActionExists()
This searches for actions that will reset the entire buffer's contents.
Reads and stores visible DN values.
bool p_bufferInitialized
True if the buffer has been initialized.
const std::vector< double > & getLine(int line)
Retrieves a line from the buffer.
void resizedViewport()
Call this when the viewport is resized (not zoomed).
ViewportBufferFill * createViewportBufferFill(QRect, bool)
This method creates a fill action based on a rect and using new versus old Y values.
void reinitialize()
This resizes and fills entire buffer.
CubeViewport * p_viewport
The CubeViewport which created this buffer.
QList< double > getSampLineBoundingRect()
Retrieves the current bounding rect in sample/line coordinates of the visible cube area.
double totalUnfilledArea()
This returns the amount of area in the queue that needs new cube data/will be filled by fill actions.
void enqueueAction(ViewportBufferAction *)
This enqueues the given action.
QRect getXYBoundingRect()
Retrieves the current bounding rect in viewport pixels of the visible cube area.
int p_band
The band to read from.
QQueue< ViewportBufferAction * > * p_actions
This is the set of actions we wish to perform on the buffer.
void setBand(int band)
Sets the band to read from, the buffer will be re-read if the band changes.
void emptyBuffer(bool force=false)
This is meant to clear up ram on non-active viewports.
int getBand()
Return the band associated with this viewport buffer.
QList< double > p_oldSampLineBoundingRect
Previous bounding rect.
void shiftBuffer(int deltaX, int deltaY)
Shifts the DN values in the buffer by deltaX and deltaY.
Buffer for containing a three dimensional section of an image.
sampLineRectPosition
Enumeration for accessing sample/line bounding rectangles.
Encapsulation of Cube I/O with Change Notifications.
@ rectBottom
QRect.bottom()
void ReadCube(int cubeId, int startSample, int startLine, int endSample, int endLine, int band, void *caller)
Ask the cube data thread for data.
bool enabled()
Returns whether the buffer is enabled (reading data) or not.
double currentProgress()
Returns the viewport buffer's loading progress.
void requestCubeLine(ViewportBufferFill *fill)
This requests the next line in a fill action.
int p_vertScrollBarPos
Current vertical scroll bar position.
QList< double > p_sampLineBoundingRect
This rect is in cube pixels and represents the area that this viewport buffer defines in the viewport...
QRect p_XYBoundingRect
This rect is in viewport pixels and represents the area that this viewport buffer defines in the view...
CubeDataThread * p_dataThread
manages cube io
int p_oldViewportHeight
Previous viewport height.
Widget to display Isis cubes for qt apps.
double p_requestedFillArea
Sum of the requested area to be filled.
std::vector< std::vector< double > > p_buffer
The buffer to hold cube dn values.
QRect bufferXYRect()
Returns a rect, in screen pixels, of the area this buffer covers.
void doQueuedActions()
This processes the next available action, or starts processing it, if possible.
virtual ~ViewportBuffer()
Updates total buffer size on destruction.
This is free and unencumbered software released into the public domain.
void addStretchAction()
When all current operations finish the cube viewport will be asked to do a stretch if you call this.
void scaleChanged()
Call this when zoomed, re-reads visible area.
void enable(bool enabled)
This turns on or off reading from the cube.
QRect p_oldXYBoundingRect
The previous bounding rect.
bool p_enabled
True if reading from cube (active)
void pan(int deltaX, int deltaY)
Call this when the viewport is panned.
void startFillAction(ViewportBufferFill *action)
Initializes a fill action by requesting the initial cube data.
void doStretchAction(ViewportBufferStretch *action)
Tells the cube viewport to restretch.
bool p_initialStretchDone
True if a stretch action has occurred.
bool hasEntireCube()
Method to see if the entire cube is in the buffer.
void doTransformAction(ViewportBufferTransform *action)
Does a transformation on the internal viewport buffer.
void updateBoundingRects()
Sets the old and new bounding rects.
void fillBuffer(QRect rect)
This method will convert the rect to sample/line positions and read from the cube into the buffer.
bool actionsPreserveData()
This returns true if any data currently in the buffer would be preserved if all of the queued actions...
int p_viewportHeight
Current viewport height.
void DataReady(void *requester, int cubeId, const Isis::Brick *brick)
This method is called when requested bricks become available.
This is free and unencumbered software released into the public domain.
void resizeBuffer(unsigned int width, unsigned int height)
Enlarges or shrinks the buffer and fills with nulls if necessary.
void DoneWithData(int, const Isis::Brick *)
Tell cube data thread we're done with a brick.
int p_oldVertScrollBarPos
Previous vertical scroll bar position.
int p_cubeId
Id associated with the cube in this viewport buffer.
bool working()
This tests if queued actions exist in the viewport buffer.
ViewportBuffer(CubeViewport *viewport, CubeDataThread *cubeData, int cubeId)
ViewportBuffer constructor.