|
Isis 3.0 Object Programmers' Reference |
Home |
Reads and stores visible DN values. More...
#include <ViewportBuffer.h>


Public Slots | |
| void | DataReady (void *requester, int cubeId, const Isis::Brick *brick) |
| This method is called when requested bricks become available. | |
Signals | |
| 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. | |
Public Member Functions | |
| ViewportBuffer (CubeViewport *viewport, CubeDataThread *cubeData, int cubeId) | |
| ViewportBuffer constructor. | |
| virtual | ~ViewportBuffer () |
| Updates total buffer size on destruction. | |
| const std::vector< double > & | getLine (int line) |
| Retrieves a line from the buffer. | |
| void | resizedViewport () |
| Call this when the viewport is resized (not zoomed). | |
| void | pan (int deltaX, int deltaY) |
| Call this when the viewport is panned. | |
| void | scaleChanged () |
| Call this when zoomed, re-reads visible area. | |
| void | fillBuffer (QRect rect) |
| This method will convert the rect to sample/line positions and read from the cube into the buffer. | |
| void | fillBuffer (QRect rect, const Brick *data) |
| This method will convert the rect to sample/line positions and read from the cube into the buffer. | |
| void | emptyBuffer (bool force=false) |
| This is meant to clear up ram on non-active viewports. | |
| QRect | bufferXYRect () |
| Returns a rect, in screen pixels, of the area this buffer covers. | |
| void | setBand (int band) |
| Sets the band to read from, the buffer will be re-read if the band changes. | |
| int | getBand () |
| Return the band associated with this viewport buffer. | |
| void | enable (bool enabled) |
| This turns on or off reading from the cube. | |
| void | addStretchAction () |
| When all current operations finish the cube viewport will be asked to do a stretch if you call this. | |
| double | currentProgress () |
| Returns the viewport buffer's loading progress. | |
| double | totalUnfilledArea () |
| This returns the amount of area in the queue that needs new cube data/will be filled by fill actions. | |
| bool | enabled () |
| Returns whether the buffer is enabled (reading data) or not. | |
| bool | working () |
| This tests if queued actions exist in the viewport buffer. | |
| bool | hasEntireCube () |
| Method to see if the entire cube is in the buffer. | |
Private Types | |
| enum | sampLineRectPosition { rectLeft = 0, rectTop, rectRight, rectBottom } |
Enumeration for accessing sample/line bounding rectangles. More... | |
Private Member Functions | |
| QRect | getXYBoundingRect () |
| Retrieves the current bounding rect in viewport pixels of the visible cube area. | |
| QList< double > | getSampLineBoundingRect () |
| Retrieves the current bounding rect in sample/line coordinates of the visible cube area. | |
| void | updateBoundingRects () |
| Sets the old and new bounding rects. | |
| void | doQueuedActions () |
| This processes the next available action, or starts processing it, if possible. | |
| void | doTransformAction (ViewportBufferTransform *action) |
| Does a transformation on the internal viewport buffer. | |
| void | doStretchAction (ViewportBufferStretch *action) |
| Tells the cube viewport to restretch. | |
| void | startFillAction (ViewportBufferFill *action) |
| Initializes a fill action by requesting the initial cube data. | |
| ViewportBufferFill * | createViewportBufferFill (QRect, bool) |
| This method creates a fill action based on a rect and using new versus old Y values. | |
| void | requestCubeLine (ViewportBufferFill *fill) |
| This requests the next line in a fill action. | |
| void | resizeBuffer (unsigned int width, unsigned int height) |
| Enlarges or shrinks the buffer and fills with nulls if necessary. | |
| void | shiftBuffer (int deltaX, int deltaY) |
| Shifts the DN values in the buffer by deltaX and deltaY. | |
| void | reinitialize () |
| This resizes and fills entire buffer. | |
| bool | actionsPreserveData () |
| This returns true if any data currently in the buffer would be preserved if all of the queued actions are executed. | |
| bool | reinitializeActionExists () |
| This searches for actions that will reset the entire buffer's contents. | |
| void | enqueueAction (ViewportBufferAction *) |
| This enqueues the given action. | |
Private Attributes | |
| CubeViewport * | p_viewport |
| The CubeViewport which created this buffer. | |
| int | p_cubeId |
| Id associated with the cube in this viewport buffer. | |
| CubeDataThread * | p_dataThread |
| manages cube io | |
| int | p_band |
| The band to read from. | |
| bool | p_enabled |
| True if reading from cube (active). | |
| std::vector< std::vector < double > > | p_buffer |
| The buffer to hold cube dn values. | |
| bool | p_bufferInitialized |
| True if the buffer has been initialized. | |
| QRect | p_XYBoundingRect |
| This rect is in viewport pixels and represents the area that this viewport buffer defines in the viewport. | |
| QRect | p_oldXYBoundingRect |
| The previous bounding rect. | |
| QList< double > | p_sampLineBoundingRect |
| This rect is in cube pixels and represents the area that this viewport buffer defines in the viewport. | |
| QList< double > | p_oldSampLineBoundingRect |
| Previous bounding rect. | |
| int | p_viewportHeight |
| Current viewport height. | |
| int | p_oldViewportHeight |
| Previous viewport height. | |
| int | p_vertScrollBarPos |
| Current vertical scroll bar position. | |
| int | p_oldVertScrollBarPos |
| Previous vertical scroll bar position. | |
| bool | p_initialStretchDone |
| True if a stretch action has occurred. | |
| double | p_requestedFillArea |
| Sum of the requested area to be filled. | |
| QQueue< ViewportBufferAction * > * | p_actions |
| This is the set of actions we wish to perform on the buffer. | |
| bool | p_bricksOrdered |
Reads and stores visible DN values.
This class manages visible pixels in a CubeViewport. This class is responsible for reading from the Cube only what is necessary and gives fast access to visible DNs.
For internal use only.
Definition at line 78 of file ViewportBuffer.h.
enum Isis::ViewportBuffer::sampLineRectPosition [private] |
Enumeration for accessing sample/line bounding rectangles.
| rectLeft |
QRect.left(). |
| rectTop |
QRect.top(). |
| rectRight |
QRect.right(). |
| rectBottom |
QRect.bottom(). |
Definition at line 203 of file ViewportBuffer.h.
| Isis::ViewportBuffer::ViewportBuffer | ( | CubeViewport * | viewport, | |
| CubeDataThread * | cubeData, | |||
| int | cubeId | |||
| ) |
ViewportBuffer constructor.
Viewport and Cube can not be null. Band is not initialized
| viewport | viewport that will use the buffer | |
| cubeData | cube to read from | |
| cubeId | The identifier for the cube in the data thread |
Definition at line 36 of file ViewportBuffer.cpp.
References DataReady(), DoneWithData(), p_actions, p_band, p_bufferInitialized, p_cubeId, p_dataThread, p_enabled, p_initialStretchDone, p_oldVertScrollBarPos, p_oldViewportHeight, p_requestedFillArea, p_vertScrollBarPos, p_viewport, p_viewportHeight, and ReadCube().
| Isis::ViewportBuffer::~ViewportBuffer | ( | ) | [virtual] |
Updates total buffer size on destruction.
Definition at line 72 of file ViewportBuffer.cpp.
References DataReady(), DoneWithData(), emptyBuffer(), p_actions, p_dataThread, and ReadCube().
| bool Isis::ViewportBuffer::actionsPreserveData | ( | ) | [private] |
This returns true if any data currently in the buffer would be preserved if all of the queued actions are executed.
Definition at line 666 of file ViewportBuffer.cpp.
References bufferXYRect(), Isis::ViewportBufferAction::getActionType(), Isis::ViewportBufferTransform::getBufferHeight(), Isis::ViewportBufferTransform::getBufferWidth(), Isis::ViewportBufferTransform::getXTranslation(), Isis::ViewportBufferTransform::getYTranslation(), p_actions, Isis::ViewportBufferTransform::resizeFirst(), and Isis::ViewportBufferAction::transform.
Referenced by doQueuedActions().
| void Isis::ViewportBuffer::addStretchAction | ( | ) |
When all current operations finish the cube viewport will be asked to do a stretch if you call this.
Existing requests will be removed.
Definition at line 1212 of file ViewportBuffer.cpp.
References doQueuedActions(), enqueueAction(), p_actions, and Isis::ViewportBufferAction::stretch.
Referenced by Isis::CubeViewport::showEvent(), Isis::CubeViewport::viewGray(), and Isis::CubeViewport::viewRGB().
| QRect Isis::ViewportBuffer::bufferXYRect | ( | ) |
Returns a rect, in screen pixels, of the area this buffer covers.
Definition at line 1249 of file ViewportBuffer.cpp.
References p_buffer, p_XYBoundingRect, and size.
Referenced by actionsPreserveData(), doQueuedActions(), fillBuffer(), Isis::StretchTool::histFromBuffer(), Isis::ScatterPlotWindow::paint(), Isis::CubeViewport::paintPixmap(), reinitializeActionExists(), Isis::CubeViewport::scrollContentsBy(), Isis::StretchTool::statsFromBuffer(), and Isis::TrackTool::updateLabels().
| ViewportBufferFill * Isis::ViewportBuffer::createViewportBufferFill | ( | QRect | someRect, | |
| bool | useOldY | |||
| ) | [private] |
This method creates a fill action based on a rect and using new versus old Y values.
The use of old Y values is so we can think of X and Y independently in complicated transforms - do X first (with old Y values), then do Y. This does not enqueue the created action.
| someRect | ||
| useOldY |
Definition at line 488 of file ViewportBuffer.cpp.
References _FILEINFO_, p_oldVertScrollBarPos, p_oldViewportHeight, p_oldXYBoundingRect, p_vertScrollBarPos, p_viewport, p_viewportHeight, p_XYBoundingRect, Isis::IException::Programmer, and Isis::CubeViewport::scale().
Referenced by fillBuffer(), pan(), reinitialize(), and resizedViewport().
| double Isis::ViewportBuffer::currentProgress | ( | ) |
Returns the viewport buffer's loading progress.
Definition at line 625 of file ViewportBuffer.cpp.
References p_requestedFillArea, totalUnfilledArea(), and working().
Referenced by Isis::CubeViewport::onProgressTimer().
| void Isis::ViewportBuffer::DataReady | ( | void * | requester, | |
| int | cubeId, | |||
| const Isis::Brick * | brick | |||
| ) | [slot] |
This method is called when requested bricks become available.
This processes the new cube data and requests more if necessary.
| requester | ||
| cubeId | ||
| brick |
Definition at line 200 of file ViewportBuffer.cpp.
References _FILEINFO_, Isis::Buffer::at(), Isis::ViewportBufferFill::doneReading(), DoneWithData(), doQueuedActions(), fill(), Isis::ViewportBufferAction::fill, Isis::ViewportBufferAction::getActionType(), Isis::ViewportBufferFill::getLeftmostPixelPosition(), Isis::ViewportBufferFill::getReadPosition(), Isis::ViewportBufferFill::getRect(), Isis::ViewportBufferFill::getTopmostPixelPosition(), Isis::ViewportBufferFill::incReadPosition(), Isis::Buffer::Line(), p_actions, p_buffer, Isis::IException::Programmer, requestCubeLine(), Isis::Buffer::Sample(), Isis::ViewportBufferFill::shouldRequestMore(), Isis::Buffer::size(), Isis::ViewportBufferAction::started(), Isis::ViewportBufferFill::viewportToLine(), Isis::ViewportBufferFill::viewportToSample(), x, and y.
Referenced by ViewportBuffer(), and ~ViewportBuffer().
| void Isis::ViewportBuffer::DoneWithData | ( | int | , | |
| const Isis::Brick * | ||||
| ) | [signal] |
Tell cube data thread we're done with a brick.
Referenced by DataReady(), ViewportBuffer(), and ~ViewportBuffer().
| void Isis::ViewportBuffer::doQueuedActions | ( | ) | [private] |
This processes the next available action, or starts processing it, if possible.
This method keeps the buffer alive until the actions queue is empty.
Any time the actions queue is modified this method should be called, it doesn't hurt to call this too much. A side effect of not calling this is qview never completing a read/displaying new pixels.
Definition at line 571 of file ViewportBuffer.cpp.
References actionsPreserveData(), Isis::CubeViewport::bufferUpdated(), bufferXYRect(), doStretchAction(), doTransformAction(), Isis::ViewportBufferAction::fill, Isis::ViewportBufferAction::getActionType(), p_actions, p_initialStretchDone, p_requestedFillArea, p_viewport, reinitialize(), reinitializeActionExists(), Isis::ViewportBufferAction::started(), startFillAction(), Isis::ViewportBufferAction::transform, and working().
Referenced by addStretchAction(), DataReady(), fillBuffer(), pan(), reinitialize(), and resizedViewport().
| void Isis::ViewportBuffer::doStretchAction | ( | ViewportBufferStretch * | action | ) | [private] |
Tells the cube viewport to restretch.
| action |
Definition at line 806 of file ViewportBuffer.cpp.
References p_actions, p_viewport, and Isis::CubeViewport::restretch().
Referenced by doQueuedActions().
| void Isis::ViewportBuffer::doTransformAction | ( | ViewportBufferTransform * | action | ) | [private] |
Does a transformation on the internal viewport buffer.
| action |
Definition at line 761 of file ViewportBuffer.cpp.
References Isis::ViewportBufferTransform::getBufferHeight(), Isis::ViewportBufferTransform::getBufferWidth(), Isis::ViewportBufferTransform::getXTranslation(), Isis::ViewportBufferTransform::getYTranslation(), p_actions, resizeBuffer(), Isis::ViewportBufferTransform::resizeFirst(), and shiftBuffer().
Referenced by doQueuedActions().
| void Isis::ViewportBuffer::emptyBuffer | ( | bool | force = false |
) |
This is meant to clear up ram on non-active viewports.
cubeViewport is supposed to call this method on viewports buffers that are not related to the active viewport.
| force | If true, memory will be freed regardless of current total buffer size (b/w -> rgb for example). |
Definition at line 1233 of file ViewportBuffer.cpp.
References p_buffer, and p_bufferInitialized.
Referenced by ~ViewportBuffer().
| void Isis::ViewportBuffer::enable | ( | bool | enabled | ) |
This turns on or off reading from the cube.
If enabled is true the buffer will be re-read.
| enabled |
Definition at line 1294 of file ViewportBuffer.cpp.
References p_enabled, reinitialize(), and updateBoundingRects().
Referenced by Isis::CubeViewport::setScale(), and Isis::CubeViewport::showEvent().
| bool Isis::ViewportBuffer::enabled | ( | ) | [inline] |
Returns whether the buffer is enabled (reading data) or not.
Definition at line 120 of file ViewportBuffer.h.
References p_enabled.
Referenced by Isis::CubeViewport::paintPixmap(), Isis::CubeViewport::setScale(), and Isis::CubeViewport::showEvent().
| void Isis::ViewportBuffer::enqueueAction | ( | ViewportBufferAction * | action | ) | [private] |
This enqueues the given action.
Please use this and don't put actions directly into p_actions. Calling this method can be thought of as equivalent to calling "p_actions->push_back(action)"
| action |
Definition at line 312 of file ViewportBuffer.cpp.
References Isis::CubeViewport::enableProgress(), Isis::ViewportBufferAction::fill, Isis::ViewportBufferAction::getActionType(), p_actions, p_requestedFillArea, and p_viewport.
Referenced by addStretchAction(), fillBuffer(), pan(), reinitialize(), and resizedViewport().
| void Isis::ViewportBuffer::fillBuffer | ( | QRect | rect, | |
| const Brick * | data | |||
| ) |
This method will convert the rect to sample/line positions and read from the cube into the buffer.
The rect is in viewport pixels.
| rect | ||
| data |
Definition at line 125 of file ViewportBuffer.cpp.
References _FILEINFO_, Isis::Buffer::at(), bufferXYRect(), createViewportBufferFill(), fill(), Isis::ViewportBufferFill::getLeftmostPixelPosition(), Isis::ViewportBufferFill::getRequestPosition(), Isis::ViewportBufferFill::getTopmostPixelPosition(), Isis::ViewportBufferFill::incReadPosition(), Isis::ViewportBufferFill::incRequestPosition(), Isis::Buffer::Index(), Isis::Buffer::Line(), line, Isis::Buffer::LineDimension(), p_band, p_buffer, Isis::IException::Programmer, Isis::Buffer::Sample(), Isis::Buffer::SampleDimension(), Isis::ViewportBufferFill::shouldRequestMore(), Isis::Buffer::size(), Isis::ViewportBufferFill::viewportToLine(), Isis::ViewportBufferFill::viewportToSample(), and x.
| void Isis::ViewportBuffer::fillBuffer | ( | QRect | rect | ) |
This method will convert the rect to sample/line positions and read from the cube into the buffer.
The rect is in viewport pixels.
| rect |
Definition at line 106 of file ViewportBuffer.cpp.
References _FILEINFO_, bufferXYRect(), createViewportBufferFill(), doQueuedActions(), enqueueAction(), p_band, and Isis::IException::Programmer.
Referenced by Isis::CubeViewport::cubeContentsChanged(), and Isis::CubeViewport::cubeDataChanged().
| int Isis::ViewportBuffer::getBand | ( | ) | [inline] |
Return the band associated with this viewport buffer.
Definition at line 103 of file ViewportBuffer.h.
References p_band.
Referenced by Isis::CubeViewport::getAllWhatsThisInfo(), Isis::CubeViewport::updateWhatsThis(), Isis::CubeViewport::viewGray(), and Isis::CubeViewport::viewRGB().
| const vector< double > & Isis::ViewportBuffer::getLine | ( | int | line | ) |
Retrieves a line from the buffer.
Line is relative to the top of the visible area of the cube in the viewport.
| line |
Definition at line 334 of file ViewportBuffer.cpp.
References _FILEINFO_, p_buffer, p_bufferInitialized, p_enabled, and Isis::IException::Programmer.
Referenced by Isis::StretchTool::histFromBuffer(), Isis::ScatterPlotWindow::paint(), Isis::CubeViewport::paintPixmap(), Isis::StretchTool::statsFromBuffer(), and Isis::TrackTool::updateLabels().
| QList< double > Isis::ViewportBuffer::getSampLineBoundingRect | ( | ) | [private] |
Retrieves the current bounding rect in sample/line coordinates of the visible cube area.
Definition at line 439 of file ViewportBuffer.cpp.
References getXYBoundingRect(), p_viewport, rectBottom, rectLeft, rectRight, rectTop, and Isis::CubeViewport::viewportToCube().
Referenced by updateBoundingRects().
| QRect Isis::ViewportBuffer::getXYBoundingRect | ( | ) | [private] |
Retrieves the current bounding rect in viewport pixels of the visible cube area.
Definition at line 356 of file ViewportBuffer.cpp.
References Isis::CubeViewport::cubeLines(), Isis::CubeViewport::cubeSamples(), Isis::CubeViewport::cubeToViewport(), p_viewport, and Isis::CubeViewport::viewportToCube().
Referenced by getSampLineBoundingRect(), and updateBoundingRects().
| bool Isis::ViewportBuffer::hasEntireCube | ( | ) |
Method to see if the entire cube is in the buffer.
Definition at line 415 of file ViewportBuffer.cpp.
References Isis::CubeViewport::cubeLines(), Isis::CubeViewport::cubeSamples(), p_sampLineBoundingRect, p_viewport, rectBottom, rectLeft, rectRight, rectTop, and working().
Referenced by Isis::StretchTool::stretchRequested().
| void Isis::ViewportBuffer::pan | ( | int | deltaX, | |
| int | deltaY | |||
| ) |
Call this when the viewport is panned.
DeltaX and deltaY are relative to the direction the buffer needs to shift.
| deltaX | ||
| deltaY |
Definition at line 1040 of file ViewportBuffer.cpp.
References createViewportBufferFill(), doQueuedActions(), enqueueAction(), fill(), p_bufferInitialized, p_enabled, p_oldSampLineBoundingRect, p_oldXYBoundingRect, p_sampLineBoundingRect, p_viewport, p_XYBoundingRect, rectBottom, rectLeft, rectRight, rectTop, reinitialize(), Isis::ViewportBufferTransform::resizeFirst(), Isis::CubeViewport::scale(), Isis::ViewportBufferTransform::setResize(), Isis::ViewportBufferTransform::setTranslation(), and updateBoundingRects().
Referenced by Isis::CubeViewport::center(), and Isis::CubeViewport::scrollContentsBy().
| void Isis::ViewportBuffer::ReadCube | ( | int | cubeId, | |
| int | startSample, | |||
| int | startLine, | |||
| int | endSample, | |||
| int | endLine, | |||
| int | band, | |||
| void * | caller | |||
| ) | [signal] |
Ask the cube data thread for data.
| cubeId | ||
| startSample | ||
| startLine | ||
| endSample | ||
| endLine | ||
| band | ||
| caller |
Referenced by requestCubeLine(), ViewportBuffer(), and ~ViewportBuffer().
| void Isis::ViewportBuffer::reinitialize | ( | ) | [private] |
This resizes and fills entire buffer.
| iException | - "Unable to resize and fill buffer." |
For internal use only.
Definition at line 1332 of file ViewportBuffer.cpp.
References _FILEINFO_, createViewportBufferFill(), doQueuedActions(), enqueueAction(), fill(), Isis::ViewportBufferAction::fill, Isis::ViewportBufferAction::getActionType(), Isis::ViewportBufferFill::getRect(), p_actions, p_bufferInitialized, p_initialStretchDone, p_requestedFillArea, p_XYBoundingRect, Isis::IException::Programmer, Isis::ViewportBufferTransform::setResize(), Isis::ViewportBufferAction::started(), Isis::ViewportBufferFill::stop(), and working().
Referenced by doQueuedActions(), enable(), pan(), resizedViewport(), scaleChanged(), and setBand().
| bool Isis::ViewportBuffer::reinitializeActionExists | ( | ) | [private] |
This searches for actions that will reset the entire buffer's contents.
Definition at line 722 of file ViewportBuffer.cpp.
References bufferXYRect(), Isis::ViewportBufferAction::getActionType(), Isis::ViewportBufferTransform::getBufferHeight(), Isis::ViewportBufferTransform::getBufferWidth(), p_actions, and Isis::ViewportBufferAction::transform.
Referenced by doQueuedActions().
| void Isis::ViewportBuffer::requestCubeLine | ( | ViewportBufferFill * | fill | ) | [private] |
This requests the next line in a fill action.
| fill |
Definition at line 533 of file ViewportBuffer.cpp.
References _FILEINFO_, Isis::ViewportBufferFill::getRect(), Isis::ViewportBufferFill::getRequestPosition(), Isis::ViewportBufferFill::incRequestPosition(), line, p_band, p_cubeId, Isis::IException::Programmer, ReadCube(), Isis::ViewportBufferFill::viewportToLine(), and Isis::ViewportBufferFill::viewportToSample().
Referenced by DataReady(), and startFillAction().
| void Isis::ViewportBuffer::resizeBuffer | ( | unsigned int | width, | |
| unsigned int | height | |||
| ) | [private] |
Enlarges or shrinks the buffer and fills with nulls if necessary.
| width | ||
| height |
Definition at line 821 of file ViewportBuffer.cpp.
References Isis::Null, and p_buffer.
Referenced by doTransformAction().
| void Isis::ViewportBuffer::resizedViewport | ( | ) |
Call this when the viewport is resized (not zoomed).
Definition at line 893 of file ViewportBuffer.cpp.
References createViewportBufferFill(), doQueuedActions(), enqueueAction(), p_bufferInitialized, p_enabled, p_oldSampLineBoundingRect, p_oldXYBoundingRect, p_sampLineBoundingRect, p_viewport, p_XYBoundingRect, rectBottom, rectLeft, rectRight, rectTop, reinitialize(), Isis::ViewportBufferTransform::resizeFirst(), Isis::CubeViewport::scale(), Isis::ViewportBufferTransform::setResize(), Isis::ViewportBufferTransform::setTranslation(), and updateBoundingRects().
Referenced by Isis::CubeViewport::resizeEvent().
| void Isis::ViewportBuffer::scaleChanged | ( | ) |
Call this when zoomed, re-reads visible area.
| iException | - "Unable to change scale" |
For internal use only.
Definition at line 1273 of file ViewportBuffer.cpp.
References _FILEINFO_, p_enabled, Isis::IException::Programmer, reinitialize(), and updateBoundingRects().
Referenced by Isis::CubeViewport::setScale().
| void Isis::ViewportBuffer::setBand | ( | int | band | ) |
Sets the band to read from, the buffer will be re-read if the band changes.
| band |
Definition at line 1311 of file ViewportBuffer.cpp.
References p_band, p_enabled, reinitialize(), and updateBoundingRects().
Referenced by Isis::CubeViewport::viewGray(), and Isis::CubeViewport::viewRGB().
| void Isis::ViewportBuffer::shiftBuffer | ( | int | deltaX, | |
| int | deltaY | |||
| ) | [private] |
Shifts the DN values in the buffer by deltaX and deltaY.
Does not fill from outside the buffer.
| deltaX | ||
| deltaY |
Definition at line 837 of file ViewportBuffer.cpp.
References Isis::Null, p_buffer, size, and x.
Referenced by doTransformAction().
| void Isis::ViewportBuffer::startFillAction | ( | ViewportBufferFill * | action | ) | [private] |
Initializes a fill action by requesting the initial cube data.
| action |
Definition at line 787 of file ViewportBuffer.cpp.
References requestCubeLine(), Isis::ViewportBufferFill::shouldRequestMore(), and Isis::ViewportBufferAction::started().
Referenced by doQueuedActions().
| double Isis::ViewportBuffer::totalUnfilledArea | ( | ) |
This returns the amount of area in the queue that needs new cube data/will be filled by fill actions.
Definition at line 641 of file ViewportBuffer.cpp.
References fill(), Isis::ViewportBufferAction::fill, Isis::ViewportBufferAction::getActionType(), Isis::ViewportBufferFill::getReadPosition(), Isis::ViewportBufferFill::getRect(), and p_actions.
Referenced by currentProgress().
| void Isis::ViewportBuffer::updateBoundingRects | ( | ) | [private] |
Sets the old and new bounding rects.
Definition at line 460 of file ViewportBuffer.cpp.
References getSampLineBoundingRect(), getXYBoundingRect(), p_oldSampLineBoundingRect, p_oldVertScrollBarPos, p_oldViewportHeight, p_oldXYBoundingRect, p_sampLineBoundingRect, p_vertScrollBarPos, p_viewport, p_viewportHeight, and p_XYBoundingRect.
Referenced by enable(), pan(), resizedViewport(), scaleChanged(), and setBand().
| bool Isis::ViewportBuffer::working | ( | ) |
This tests if queued actions exist in the viewport buffer.
Definition at line 751 of file ViewportBuffer.cpp.
References p_actions, p_bufferInitialized, and p_enabled.
Referenced by Isis::CubeViewport::bufferUpdated(), currentProgress(), doQueuedActions(), hasEntireCube(), Isis::CubeViewport::onProgressTimer(), Isis::ScatterPlotWindow::paint(), Isis::CubeViewport::paintPixmap(), reinitialize(), Isis::CubeViewport::scrollContentsBy(), Isis::StretchTool::setCubeViewport(), Isis::StretchTool::statsFromBuffer(), Isis::StretchTool::updateAdvStretchDialogforAll(), Isis::StretchTool::updateHistograms(), and Isis::TrackTool::updateLabels().
QQueue< ViewportBufferAction * >* Isis::ViewportBuffer::p_actions [private] |
This is the set of actions we wish to perform on the buffer.
This is queued because we need to wait for other threads to give us cube data before we progress through the queue.
Definition at line 215 of file ViewportBuffer.h.
Referenced by actionsPreserveData(), addStretchAction(), DataReady(), doQueuedActions(), doStretchAction(), doTransformAction(), enqueueAction(), reinitialize(), reinitializeActionExists(), totalUnfilledArea(), ViewportBuffer(), working(), and ~ViewportBuffer().
int Isis::ViewportBuffer::p_band [private] |
The band to read from.
Definition at line 172 of file ViewportBuffer.h.
Referenced by fillBuffer(), getBand(), requestCubeLine(), setBand(), and ViewportBuffer().
std::vector< std::vector<double> > Isis::ViewportBuffer::p_buffer [private] |
The buffer to hold cube dn values.
Definition at line 175 of file ViewportBuffer.h.
Referenced by bufferXYRect(), DataReady(), emptyBuffer(), fillBuffer(), getLine(), resizeBuffer(), and shiftBuffer().
bool Isis::ViewportBuffer::p_bufferInitialized [private] |
True if the buffer has been initialized.
Definition at line 176 of file ViewportBuffer.h.
Referenced by emptyBuffer(), getLine(), pan(), reinitialize(), resizedViewport(), ViewportBuffer(), and working().
int Isis::ViewportBuffer::p_cubeId [private] |
Id associated with the cube in this viewport buffer.
Definition at line 169 of file ViewportBuffer.h.
Referenced by requestCubeLine(), and ViewportBuffer().
CubeDataThread* Isis::ViewportBuffer::p_dataThread [private] |
manages cube io
Definition at line 170 of file ViewportBuffer.h.
Referenced by ViewportBuffer(), and ~ViewportBuffer().
bool Isis::ViewportBuffer::p_enabled [private] |
True if reading from cube (active).
Definition at line 174 of file ViewportBuffer.h.
Referenced by enable(), enabled(), getLine(), pan(), resizedViewport(), scaleChanged(), setBand(), ViewportBuffer(), and working().
bool Isis::ViewportBuffer::p_initialStretchDone [private] |
True if a stretch action has occurred.
Definition at line 197 of file ViewportBuffer.h.
Referenced by doQueuedActions(), reinitialize(), and ViewportBuffer().
QList< double > Isis::ViewportBuffer::p_oldSampLineBoundingRect [private] |
Previous bounding rect.
Definition at line 192 of file ViewportBuffer.h.
Referenced by pan(), resizedViewport(), and updateBoundingRects().
int Isis::ViewportBuffer::p_oldVertScrollBarPos [private] |
Previous vertical scroll bar position.
Definition at line 196 of file ViewportBuffer.h.
Referenced by createViewportBufferFill(), updateBoundingRects(), and ViewportBuffer().
int Isis::ViewportBuffer::p_oldViewportHeight [private] |
Previous viewport height.
Definition at line 194 of file ViewportBuffer.h.
Referenced by createViewportBufferFill(), updateBoundingRects(), and ViewportBuffer().
QRect Isis::ViewportBuffer::p_oldXYBoundingRect [private] |
The previous bounding rect.
Definition at line 183 of file ViewportBuffer.h.
Referenced by createViewportBufferFill(), pan(), resizedViewport(), and updateBoundingRects().
double Isis::ViewportBuffer::p_requestedFillArea [private] |
Sum of the requested area to be filled.
Definition at line 198 of file ViewportBuffer.h.
Referenced by currentProgress(), doQueuedActions(), enqueueAction(), reinitialize(), and ViewportBuffer().
QList< double > Isis::ViewportBuffer::p_sampLineBoundingRect [private] |
This rect is in cube pixels and represents the area that this viewport buffer defines in the viewport.
To get a particular corner use the sampLineRectPosition enumeration as indices for a particular corner.
Definition at line 191 of file ViewportBuffer.h.
Referenced by hasEntireCube(), pan(), resizedViewport(), and updateBoundingRects().
int Isis::ViewportBuffer::p_vertScrollBarPos [private] |
Current vertical scroll bar position.
Definition at line 195 of file ViewportBuffer.h.
Referenced by createViewportBufferFill(), updateBoundingRects(), and ViewportBuffer().
CubeViewport* Isis::ViewportBuffer::p_viewport [private] |
The CubeViewport which created this buffer.
Definition at line 168 of file ViewportBuffer.h.
Referenced by createViewportBufferFill(), doQueuedActions(), doStretchAction(), enqueueAction(), getSampLineBoundingRect(), getXYBoundingRect(), hasEntireCube(), pan(), resizedViewport(), updateBoundingRects(), and ViewportBuffer().
int Isis::ViewportBuffer::p_viewportHeight [private] |
Current viewport height.
Definition at line 193 of file ViewportBuffer.h.
Referenced by createViewportBufferFill(), updateBoundingRects(), and ViewportBuffer().
QRect Isis::ViewportBuffer::p_XYBoundingRect [private] |
This rect is in viewport pixels and represents the area that this viewport buffer defines in the viewport.
Definition at line 182 of file ViewportBuffer.h.
Referenced by bufferXYRect(), createViewportBufferFill(), pan(), reinitialize(), resizedViewport(), and updateBoundingRects().