A simple struct to hold a pair of width/height dimensions. More...
#include <Image/Dims.H>
Public Member Functions | |
Dims () throw () | |
Default construct with width and height == 0. | |
Dims (int width, int height) throw () | |
Construct from a given width + height, which must be non-negative. | |
Dims (const Dims &other) throw () | |
Copy construct. | |
int | w () const throw () |
Returns the width, will always be non-negative. | |
int | h () const throw () |
Returns the height, will always be non-negative. | |
int | sz () const throw () |
Returns the size of the 2-D area specified by the dimensions. | |
int | max () const throw () |
Returns the larger of the width and height. | |
int | min () const throw () |
Returns the smaller of the width and height. | |
bool | isEmpty () const throw () |
Query whether the 2-D array is empty. | |
bool | isNonEmpty () const throw () |
Query whether the 2-D array is non-empty. | |
bool | operator== (const Dims &x) const throw () |
See if two Dims are the same. | |
bool | operator!= (const Dims &x) const throw () |
See if two Dims are different. |
A simple struct to hold a pair of width/height dimensions.
We guarantee that the width and height are always non-negative, though not necessarily strictly positive. The default Dims are the 0-by-0 dimensions. Dims is strictly a const class; the width/height can only be set at construction.
Definition at line 51 of file Dims.H.
Dims::Dims | ( | ) | throw () [inline] |
Default construct with width and height == 0.
Definition at line 181 of file Dims.H.
Referenced by CudaFramework::drawRectangle_centrepoint(), and CudaFramework::drawRectangle_topleftpoint().
Dims::Dims | ( | int | width, | |
int | height | |||
) | throw () [inline] |
Dims::Dims | ( | const Dims & | other | ) | throw () [inline] |
int Dims::h | ( | ) | const throw () [inline] |
Returns the height, will always be non-negative.
Definition at line 202 of file Dims.H.
Referenced by addNoise(), DescriptorVec::buildDV(), DescriptorVec::buildRawDV(), CudaSaliency::calcInertia(), CudaSaliency::calcInhibition(), JunctionHOG::calculateJunctionHistogram(), cartesian(), Rectangle::centerDims(), chamfer34(), SingleChannelBeoServer::check(), SceneGenerator::checkTargetPos(), ChipValidatorQt::ChipValidatorQt(), Point2D< T >::clampToDims(), FovealTransformModule::clear(), LocalBinaryPatterns::colorSum(), RawVisualCortex::combineOutputs(), IntegerRawVisualCortex::combineOutputsInt(), convertAVFrameToRGB(), convertToString(), convertVideoFrameToAVFrame(), corrpatch(), HistogramOfGradients::createHistogramFromGradient(), SpaceVariantModule::cropTransform(), cudaCrop(), cudaInplaceOverlay(), cudaInplacePaste(), cudaIsDyadic(), cudaShiftImage(), SpatialMetrics::deg2pix(), LandmarkDB::display(), PsychoDisplay::displayCircle(), PsychoDisplay::displayColorDotFixation(), PsychoDisplay::displayEyeTrackerCalibration(), PsychoDisplay::displayFilledCircle(), PsychoDisplay::displayFixation(), PsychoDisplay::displayFixationIcon(), PsychoDisplay::displayISCANcalib(), PsychoDisplay::displayRedDotFixation(), SDLdisplay::displayText(), SDLdisplay::displayVideoOverlay(), SDLdisplay::displayVideoOverlay_image(), SDLdisplay::displayVideoOverlay_patch(), SDLdisplay::displayVideoOverlay_pos(), PsychoDisplay::displayWhiteDotFixation(), SimulationViewerEyeMvtNeuro::doEventRetinaImage(), ContourChannel::doInput(), downSize(), downSizeClean(), ArrayCreator::draw(), PlotBufferList::draw(), SimulationViewerHand::drawHand(), SimulationViewerEyeHand::drawHand(), XWindow::drawImage(), drawMeters(), TemplateMatchChannel::drawResults(), InferotemporalCortexI::evolve(), FourierEngine< T >::fft(), findBoundingRect(), FourierEngine< T >::FourierEngine(), FourierInvEngine< T >::FourierInvEngine(), PyrFoveator::foveate(), fromVideoHM12(), fromVideoYUV410P(), fromVideoYUV411P(), fromVideoYUV420P(), fromVideoYUV422P(), fromVideoYUV444P(), gaussianBlob(), gaussianBlobUnnormalized(), TestImages::generateScene(), DPM::getBoundingBoxes(), EyeTrackerISCAN::getCalibrationSet(), GenericFrameSpec::getDescription(), VideoFrame::getFlippedHoriz(), FrameIstream::getHeight(), GenericFrame::getHeight(), SDLdisplay::getHeight(), ZeroChannel::getMapDims(), ObjDetChannel::getMapDims(), ForegroundDetectionChannel::getMapDims(), VisualObjectMatch::getMatchImage(), VisualEvent::getMaxObjectDims(), SceneGenerator::getObjFromPos(), SimStructure::getOutHeight(), SpectralResidualChannel::getOutput(), SimStructure::getOutSize(), RetinaAdapter::getRawInputRectangle(), Stimulus2D::getTotalTime(), SimulationViewerStd::getTraj(), SimulationViewerNerdCam::getTraj(), SimulationViewerHand::getTraj(), SimulationViewerEyeRegion::getTraj(), SimulationViewerEyeMvtNeuro::getTraj(), SimulationViewerEyeMvt::getTraj(), SimulationViewerEyeHand::getTraj(), SimulationViewerCompress::getTraj(), VisualObjectMatch::getTransfTestOutline(), Image< T >::getValInterpScaled(), IEEE1394grabber::grabPrealloc(), XCgrabberFlex::grabRaw(), ArrayData< T >::h(), SceneUnderstanding::highOrderRec(), FourierInvEngine< T >::ifft(), VisualBufferStd::input(), TaskRelevanceMapSocial::inputFrame(), HandData::isWithin(), EyeData::isWithin(), main(), VideoFrame::makeBobDeinterlaced(), MrawvDecoder::MrawvDecoder(), Beobot2_GistSalLocalizerMasterI::objectUpdateBelief(), GSlocalizer::objectUpdateBelief(), SDLdisplay::openDisplay(), EyeTrackerEyeLink::openSDL(), operator*(), operator+(), operator-(), operator/(), operator<<(), RasterInputOptions::paramChanged(), SpatialMetrics::paramChanged(), EnvSimulationViewer::paramChanged(), InputMbariFrameSeries::peekDims(), SpatialMetrics::pix2deg(), VectorField::plotField(), VectorField::plotGridField(), Point2D< T >::Point2D(), lobot::Compositor< pixel_type >::push_back(), GameOfLifeInput::readFrame(), retinalToVisualBuffer(), retinexDepth(), saliencyChamfer34(), MbariResultViewer::saveSingleEventFrame(), Stimulus2D::setConfigInfo(), DotStimuli::setConfigInfo(), LayerDecoder::setDecoder(), DescriptorVec::setFovea(), EyeTrackerEyeLink::start1(), VisualBufferStd::start1(), XCgrabber::start1(), V4Lgrabber::start1(), V4L2grabber::start1(), SDLdisplay::start2(), SimEventInputFrame::toString(), SceneRec::trainFeature(), OriChamferMatching::updateOriCost(), visualBufferToRetinal(), warp3D(), MgzEncoder::writeFrame(), SDLdisplayStream::writeFrame(), writeImageToStream(), BitObject::writeToStream(), and XWindow::XWindow().
bool Dims::isEmpty | ( | ) | const throw () [inline] |
Query whether the 2-D array is empty.
(empty means that at least one of the width or height is 0).
Definition at line 218 of file Dims.H.
References sz().
Referenced by Point2D< T >::clampToDims(), convertAVFrameToRGB(), MbariResultViewer::displayImage(), ChannelBase::getInputDims(), MrawvDecoder::MrawvDecoder(), XMLInput::readFrame(), InputMbariFrameSeries::readRGB(), warp3D(), and XWindow::XWindow().
bool Dims::isNonEmpty | ( | ) | const throw () [inline] |
Query whether the 2-D array is non-empty.
(i.e. both width and height are positive, non-zero).
Definition at line 222 of file Dims.H.
References sz().
Referenced by downSizeClean(), SpectralResidualChannel::getOutput(), SimulationViewerStd::getTraj(), SimulationViewerNerdCam::getTraj(), ChannelBase::hasInput(), VideoFrame::initialized(), normalizMAP(), SpatialMetrics::paramChanged(), EnvSimulationViewer::paramChanged(), InputFrameSeries::peekFrameSpec(), VisualBufferStd::start1(), and EyeSFile::start2().
int Dims::max | ( | ) | const throw () [inline] |
Returns the larger of the width and height.
Definition at line 210 of file Dims.H.
Referenced by centerSurround(), and SpectralResidualChannel::getOutput().
int Dims::min | ( | ) | const throw () [inline] |
bool Dims::operator!= | ( | const Dims & | x | ) | const throw () [inline] |
bool Dims::operator== | ( | const Dims & | x | ) | const throw () [inline] |
int Dims::sz | ( | ) | const throw () [inline] |
Returns the size of the 2-D area specified by the dimensions.
(i.e. width * height).
Definition at line 206 of file Dims.H.
Referenced by ArrayData< T >::ArrayData(), ChipValidatorQt::chipClicked(), ChipValidatorQt::ChipValidatorQt(), SDLdisplay::clearBackBuffer(), TaskRelevanceMapGistClassify::computeGistDist(), corrpatch(), ArrayData< T >::end(), ArrayData< T >::endw(), fromARGB(), fromBayer(), fromMono(), fromRGB(), fromRGB555(), fromRGB565(), fromVideoHM12(), fromVideoYUV24(), fromVideoYUV410P(), fromVideoYUV411(), fromVideoYUV411P(), fromVideoYUV420P(), fromVideoYUV422(), fromVideoYUV422P(), fromVideoYUV444(), fromVideoYUV444P(), getFrameSize(), CudaImage< T >::getSize(), Image< T >::getSize(), XCgrabber::grabRaw(), XCgrabberFlex::grabRaw(), isEmpty(), isNonEmpty(), CudaImage< T >::operator*(), CudaImage< T >::operator*=(), CudaImage< T >::operator+(), CudaImage< T >::operator+=(), CudaImage< T >::operator-(), CudaImage< T >::operator-=(), CudaImage< T >::operator/(), CudaImage< T >::operator/=(), EnvSimulationViewer::paramChanged(), MgzDecoder::readFrame(), MgzJDecoder::readFrame(), reshape(), CudaImage< T >::size(), Image< T >::size(), XCgrabberFlex::start1(), XCgrabber::start1(), VideoFrame::toYuvComponents(), MgzEncoder::writeFrame(), and ArrayData< T >::~ArrayData().
int Dims::w | ( | ) | const throw () [inline] |
Returns the width, will always be non-negative.
Definition at line 198 of file Dims.H.
Referenced by addNoise(), DescriptorVec::buildDV(), DescriptorVec::buildRawDV(), CudaSaliency::calcInertia(), CudaSaliency::calcInhibition(), JunctionHOG::calculateJunctionHistogram(), cartesian(), Rectangle::centerDims(), chamfer34(), SingleChannelBeoServer::check(), SceneGenerator::checkTargetPos(), ChipValidatorQt::ChipValidatorQt(), Point2D< T >::clampToDims(), FovealTransformModule::clear(), LocalBinaryPatterns::colorSum(), RawVisualCortex::combineOutputs(), IntegerRawVisualCortex::combineOutputsInt(), SubmapAlgorithmBiased::compute(), convertAVFrameToRGB(), convertToString(), convertVideoFrameToAVFrame(), corrpatch(), HistogramOfGradients::createHistogramFromGradient(), SpaceVariantModule::cropTransform(), cudaCrop(), cudaInplaceOverlay(), cudaInplacePaste(), cudaIsDyadic(), cudaShiftImage(), SpatialMetrics::deg2pix(), LandmarkDB::display(), PsychoDisplay::displayCircle(), PsychoDisplay::displayColorDotFixation(), PsychoDisplay::displayEyeTrackerCalibration(), PsychoDisplay::displayFilledCircle(), PsychoDisplay::displayFixation(), PsychoDisplay::displayFixationIcon(), PsychoDisplay::displayISCANcalib(), PsychoDisplay::displayRedDotFixation(), SDLdisplay::displayText(), SDLdisplay::displayVideoOverlay(), SDLdisplay::displayVideoOverlay_image(), SDLdisplay::displayVideoOverlay_patch(), SDLdisplay::displayVideoOverlay_pos(), PsychoDisplay::displayWhiteDotFixation(), SimulationViewerEyeMvtNeuro::doEventRetinaImage(), ContourChannel::doInput(), downSize(), downSizeClean(), ArrayCreator::draw(), PlotBufferList::draw(), SimulationViewerHand::drawHand(), SimulationViewerEyeHand::drawHand(), XWindow::drawImage(), drawMeters(), TemplateMatchChannel::drawResults(), InferotemporalCortexI::evolve(), BeoLRF::evolve(), FourierEngine< T >::fft(), findBoundingRect(), FourierEngine< T >::FourierEngine(), FourierInvEngine< T >::FourierInvEngine(), PyrFoveator::foveate(), fromVideoHM12(), fromVideoYUV410P(), fromVideoYUV411P(), fromVideoYUV420P(), fromVideoYUV422P(), fromVideoYUV444P(), gaussianBlob(), gaussianBlobUnnormalized(), TestImages::generateScene(), Beobot2_GistSalLocalizerMasterI::getBeliefImage(), GSlocalizer::getBeliefImage(), DPM::getBoundingBoxes(), EyeTrackerISCAN::getCalibrationSet(), GenericFrameSpec::getDescription(), VideoFrame::getFlippedHoriz(), ZeroChannel::getMapDims(), ObjDetChannel::getMapDims(), ForegroundDetectionChannel::getMapDims(), VisualObjectMatch::getMatchImage(), VisualEvent::getMaxObjectDims(), SoxChannel::getNonlinearResponse(), SceneGenerator::getObjFromPos(), SpectralResidualChannel::getOutput(), SimStructure::getOutSize(), SimStructure::getOutWidth(), RetinaAdapter::getRawInputRectangle(), GetSaliency::getSubMaps(), SimulationViewerStd::getTraj(), SimulationViewerNerdCam::getTraj(), SimulationViewerHand::getTraj(), SimulationViewerEyeRegion::getTraj(), SimulationViewerEyeMvtNeuro::getTraj(), SimulationViewerEyeMvt::getTraj(), SimulationViewerEyeHand::getTraj(), SimulationViewerCompress::getTraj(), VisualObjectMatch::getTransfTestOutline(), Image< T >::getValInterpScaled(), FrameIstream::getWidth(), GenericFrame::getWidth(), SDLdisplay::getWidth(), IEEE1394grabber::grabPrealloc(), XCgrabberFlex::grabRaw(), FourierInvEngine< T >::ifft(), VisualBufferStd::input(), TaskRelevanceMapSocial::inputFrame(), HandData::isWithin(), EyeData::isWithin(), main(), VideoFrame::makeBobDeinterlaced(), MrawvDecoder::MrawvDecoder(), Stimulus2D::next(), Beobot2_GistSalLocalizerMasterI::objectUpdateBelief(), GSlocalizer::objectUpdateBelief(), SDLdisplay::openDisplay(), EyeTrackerEyeLink::openSDL(), operator*(), operator+(), operator-(), operator/(), operator<<(), RasterInputOptions::paramChanged(), SpatialMetrics::paramChanged(), EnvSimulationViewer::paramChanged(), InputMbariFrameSeries::peekDims(), SpatialMetrics::pix2deg(), VectorField::plotField(), VectorField::plotGridField(), Point2D< T >::Point2D(), SingleChannel::postProcessMap(), lobot::Compositor< pixel_type >::push_back(), GameOfLifeInput::readFrame(), retinalToVisualBuffer(), retinexDepth(), saliencyChamfer34(), MbariResultViewer::saveSingleEventFrame(), Stimulus2D::setConfigInfo(), DotStimuli::setConfigInfo(), LayerDecoder::setDecoder(), DescriptorVec::setFovea(), EyeTrackerEyeLink::start1(), VisualBufferStd::start1(), XCgrabber::start1(), V4Lgrabber::start1(), V4L2grabber::start1(), SDLdisplay::start2(), SimEventInputFrame::toString(), SceneRec::trainFeature(), OriChamferMatching::updateOriCost(), visualBufferToRetinal(), ArrayData< T >::w(), warp3D(), MgzEncoder::writeFrame(), SDLdisplayStream::writeFrame(), writeImageToStream(), BitObject::writeToStream(), and XWindow::XWindow().