Isis 3 Programmer Reference
Isis::TileManager Class Reference

Buffer manager, for moving through a cube in tiles. More...

#include <TileManager.h>

Inheritance diagram for Isis::TileManager:
Inheritance graph
Collaboration diagram for Isis::TileManager:
Collaboration graph

Public Member Functions

 TileManager (const Isis::Cube &cube, const int &bufNumSamples=128, const int &bufNumLines=128)
 Constructs a TileManager object. More...
 
 ~TileManager ()
 Destroys the TileManager object. More...
 
bool SetTile (const int Tile, const int band=1)
 Sets the current tile as requested. More...
 
int Tiles ()
 Returns the number of Tiles in the cube. More...
 
bool operator++ (int)
 Moves the shape buffer to the next position. More...
 
BufferManageroperator+= (int i)
 Moves the shape buffer by a certain amount. More...
 
bool begin ()
 Moves the shape buffer to the first position. More...
 
bool next ()
 Moves the shape buffer to the next position. More...
 
bool end () const
 Returns true if the shape buffer has accessed the end of the cube. More...
 
bool setpos (BigInt map)
 Sets the position of the shape in the cube. More...
 
void swap (BufferManager &other)
 Swaps the values of this BufferManager with that of another. More...
 
int SampleDimension () const
 Returns the number of samples in the shape buffer. More...
 
int LineDimension () const
 Returns the number of lines in the shape buffer. More...
 
int BandDimension () const
 Returns the number of bands in the shape buffer. More...
 
int size () const
 Returns the total number of pixels in the shape buffer. More...
 
int Sample (const int index=0) const
 Returns the sample position associated with a shape buffer index. More...
 
int Line (const int index=0) const
 Returns the line position associated with a shape buffer index. More...
 
int Band (const int index=0) const
 Returns the band position associated with a shape buffer index. More...
 
void Position (const int index, int &i_samp, int &i_line, int &i_band) const
 Returns the sample, line, and band position associated with a shape buffer index. More...
 
int Index (const int i_samp, const int i_line, const int i_band) const
 Given a sample, line, and band position, this returns the appropriate index in the shape buffer. More...
 
double at (const int index) const
 Returns the value in the shape buffer at the given index. More...
 
double & operator[] (const int index)
 Returns the value in the shape buffer at given index. More...
 
const double & operator[] (const int index) const
 Returns the value in the shape buffer at given index. More...
 
double * DoubleBuffer () const
 Returns the value of the shape buffer. More...
 
void Copy (const Buffer &in, bool includeRawBuf=true)
 Allows copying of the buffer contents to another Buffer. More...
 
bool CopyOverlapFrom (const Buffer &in)
 Allows copying of the buffer contents of a larger buffer to another same size or smaller Buffer, using their base positions to relate data. More...
 
void * RawBuffer () const
 Returns a void pointer to the raw buffer. More...
 
Isis::PixelType PixelType () const
 Returns the raw buffer pixel type. More...
 

Protected Member Functions

int MaxSamples () const
 Returns the number of samples in the cube. More...
 
int MaxLines () const
 Returns the number of lines in the cube. More...
 
int MaxBands () const
 Returns the number of bands in the cube. More...
 
BigInt MaxMaps () const
 Returns the maximum number of positions the shape buffer needs to cover the entire image (see setpos method for more info). More...
 
void SetIncrements (const int sinc, const int linc, const int binc)
 Sets how the shape is incremented through the cube. More...
 
void SetOffsets (const int soff, const int loff, const int boff)
 Sets the offset of the buffer. More...
 
void SetBasePosition (const int start_sample, const int start_line, const int start_band)
 This method is used to set the base position of the shape buffer. More...
 
void SetBaseSample (const int start_samp)
 This method is used to set the base sample position of the shape buffer. More...
 
void SetBaseLine (const int start_line)
 This method is used to set the base line position of the shape buffer. More...
 
void SetBaseBand (const int start_band)
 This method is used to set the base band position of the shape buffer. More...
 
void Allocate ()
 Size or resize the memory buffer. More...
 

Protected Attributes

int p_sample
 Starting sample to read/write. More...
 
int p_nsamps
 Number of samples to read/write. More...
 
int p_line
 Starting line to read/write. More...
 
int p_nlines
 Number of lines to read/write. More...
 
int p_band
 Starting band to read/write. More...
 
int p_nbands
 Number of bands to read/write. More...
 
int p_npixels
 Number of pixels (nsamps * nlines * nbands) More...
 
double * p_buf
 Shape buffer allocated to the size of npixels for handling reads/writes. More...
 
const Isis::PixelType p_pixelType
 The pixel type of the raw buffer. More...
 
void * p_rawbuf
 The raw dm read from the disk. More...
 

Private Attributes

int p_numSampTiles
 Stores the number of tiles in the sample direction. More...
 
int p_numLineTiles
 Stores the number of tiles in the line direction. More...
 

Detailed Description

Buffer manager, for moving through a cube in tiles.

This class is used as a manager for moving through a cube one tile at a time. A tile is defined as a two dimensional (n samples by m lines) sub area of a cube. The band direction is always one deep. The sequence of tiles starts with the tile containing sample one, line one and band one. It then moves across the cube in the sample direction then to the next tile in the line direction and finally to the next tile in the band direction.

If you would like to see TileManager being used in implementation, see the ProcessByTile class

Author
2002-10-10 Stuart Sides
History:

2003-05-16 Stuart Sides - Modified schema from astrogeology... isis.astrogeology...

2005-02-22 Elizabeth Ribelin - Modified file to support Doxygen documentation

Todo:
2005-05-23 Jeff Anderson - There could be problems with 2GB files if the tile size is very small, 1x1, 2x1, 1x2. Should we worry about this?

Definition at line 55 of file TileManager.h.

Constructor & Destructor Documentation

◆ TileManager()

Isis::TileManager::TileManager ( const Isis::Cube cube,
const int &  bufNumSamples = 128,
const int &  bufNumLines = 128 
)

Constructs a TileManager object.

Parameters
cubeThe cube this buffer will be assiciated with.
bufNumSamplesThe number of samples in each tile buffer. Defaults to 128
bufNumLinesThe number of lines in each tile buffer. Defaults to 128

Definition at line 41 of file TileManager.cpp.

References Isis::Cube::lineCount(), p_numLineTiles, p_numSampTiles, and Isis::Cube::sampleCount().

◆ ~TileManager()

Isis::TileManager::~TileManager ( )
inline

Destroys the TileManager object.

Definition at line 67 of file TileManager.h.

Member Function Documentation

◆ Allocate()

void Isis::Buffer::Allocate ( )
protectedinherited

Size or resize the memory buffer.

Exceptions
Isis::iException::System- Memory allocation failed

Definition at line 356 of file Buffer.cpp.

References _FILEINFO_, Isis::Message::MemoryAllocationFailed(), Isis::Buffer::p_buf, Isis::Buffer::p_npixels, Isis::Buffer::p_pixelType, Isis::Buffer::p_rawbuf, Isis::SizeOf(), and Isis::IException::Unknown.

Referenced by Isis::Buffer::Buffer(), and Isis::Brick::Resize().

◆ at()

double Isis::Buffer::at ( const int  index) const
inherited

Returns the value in the shape buffer at the given index.

Parameters
indexIndex position in buffer. Out of bounds index is trapped.
Returns
double Buffer value at index
Exceptions
Isis::iException::Programmer- Array Subscript not in range

Definition at line 247 of file Buffer.cpp.

References _FILEINFO_, Isis::Message::ArraySubscriptNotInRange(), Isis::Buffer::p_buf, Isis::Buffer::p_npixels, and Isis::IException::Programmer.

Referenced by Isis::CubeDataThreadTester::BrickChanged(), Isis::ViewportBuffer::DataReady(), Isis::ViewportBuffer::fillBuffer(), Isis::StatisticsTool::getStatistics(), Isis::CubeDataThreadTester::ReadBrick(), and Isis::CubeDataThreadTester::ReadWriteBrick().

◆ Band()

int Isis::Buffer::Band ( const int  index = 0) const
inherited

Returns the band position associated with a shape buffer index.

The shape buffer is one dimensional. Let us assume a nsamps=2, nlines=3, and nbands=2. Therefore the total size of the shape buffer is 12 and valid index values are 0-11. Indexes 0-5 will return band 1 and 6-11 will return band 2.

Parameters
indexShape buffer index to map to a band position. Defaults to 0.
Returns
int The absolute band number based on the buffer index.

Definition at line 178 of file Buffer.cpp.

References Isis::Buffer::p_band, Isis::Buffer::p_nlines, and Isis::Buffer::p_nsamps.

Referenced by Isis::CubeIoHandler::bufferLessThan(), Isis::Buffer::CopyOverlapFrom(), Isis::CubeIoHandler::findIntersection(), Isis::ImageImporter::operator()(), Isis::SpectralDefinition2D::operator()(), Isis::Average::operator()(), Isis::ProcessByBrick::ProcessCubesFunctor< T >::operator()(), Isis::CubeDataThread::OverlapIndex(), Isis::Buffer::Position(), Isis::CubeIoHandler::read(), Isis::ProcessRubberSheet::StartProcess(), Isis::CubeIoHandler::synchronousWrite(), Isis::CubeIoHandler::writeIntoDouble(), and Isis::CubeIoHandler::writeIntoRaw().

◆ BandDimension()

◆ begin()

◆ Copy()

void Isis::Buffer::Copy ( const Buffer in,
bool  includeRawBuf = true 
)
inherited

Allows copying of the buffer contents to another Buffer.

Parameters
inThe Buffer to be copied.
includeRawBufWhether to include raw dm read from disk
Exceptions
Isis::iException::Programmer- Input and Output buffers are not the same size
Isis::iException::Programmer- Input and Output buffers do not use the same pixel type

Definition at line 271 of file Buffer.cpp.

References _FILEINFO_, Isis::Buffer::p_buf, Isis::Buffer::p_npixels, Isis::Buffer::p_pixelType, Isis::Buffer::p_rawbuf, Isis::Buffer::PixelType(), Isis::IException::Programmer, Isis::Buffer::size(), and Isis::SizeOf().

Referenced by Isis::Buffer::Buffer(), and Isis::FileTool::copy().

◆ CopyOverlapFrom()

bool Isis::Buffer::CopyOverlapFrom ( const Buffer in)
inherited

Allows copying of the buffer contents of a larger buffer to another same size or smaller Buffer, using their base positions to relate data.

This does not copy the raw buffer.

Parameters
inThe Buffer to be copied.
Returns
The operation was successful (the buffers overlapped)

Definition at line 301 of file Buffer.cpp.

References Isis::Buffer::Band(), Isis::Buffer::Index(), Isis::Buffer::Line(), Isis::Buffer::p_band, Isis::Buffer::p_line, Isis::Buffer::p_nbands, Isis::Buffer::p_nlines, Isis::Buffer::p_npixels, Isis::Buffer::p_nsamps, Isis::Buffer::p_sample, Isis::Buffer::Sample(), and Isis::Buffer::size().

◆ DoubleBuffer()

◆ end()

bool Isis::BufferManager::end ( ) const
inlineinherited

◆ Index()

int Isis::Buffer::Index ( const int  i_samp,
const int  i_line,
const int  i_band 
) const
inherited

Given a sample, line, and band position, this returns the appropriate index in the shape buffer.

Parameters
i_sampSample position.
i_lineLine position.
i_bandBand position.
Returns
int Index at the specified sample, line and band.
Exceptions
Isis::iException::Programmer- Array Subscript not in range

Definition at line 213 of file Buffer.cpp.

References _FILEINFO_, Isis::Message::ArraySubscriptNotInRange(), Isis::Buffer::p_band, Isis::Buffer::p_line, Isis::Buffer::p_nbands, Isis::Buffer::p_nlines, Isis::Buffer::p_nsamps, Isis::Buffer::p_sample, and Isis::IException::Programmer.

Referenced by Isis::Buffer::CopyOverlapFrom(), Isis::ViewportBuffer::fillBuffer(), Isis::CubeIoHandler::writeIntoDouble(), and Isis::CubeIoHandler::writeIntoRaw().

◆ Line()

int Isis::Buffer::Line ( const int  index = 0) const
inherited

Returns the line position associated with a shape buffer index.

The shape buffer is one dimensional. Let us assume a nsamps=2, nlines=3, and nbands=2. Therefore the total size of the shape buffer is 12 and valid index values are 0-11. Line(0), Line(1), Line(6) and Line(7), will return a 1, Line(2), Line(3), Line(8) and Line(9) will return a 2, and Line(4), Line(5), Line(10), and Line(11) will return a 3.

Parameters
indexShape buffer index to map to a line position. Defaults to 0
Returns
int The absolute line number based on the buffer index

Definition at line 161 of file Buffer.cpp.

References Isis::Buffer::p_line, Isis::Buffer::p_nlines, and Isis::Buffer::p_nsamps.

Referenced by Isis::CubeIoHandler::bufferLessThan(), Isis::Buffer::CopyOverlapFrom(), Isis::CubeViewport::cubeDataChanged(), Isis::ViewportBuffer::DataReady(), Isis::ViewportBuffer::fillBuffer(), Isis::CubeIoHandler::findIntersection(), Isis::ImageImporter::operator()(), Isis::Nearest::operator()(), Isis::Average::operator()(), Isis::CubeDataThread::OverlapIndex(), Isis::Buffer::Position(), Isis::CubeIoHandler::read(), Isis::EditTool::redoEdit(), Isis::CubeIoHandler::synchronousWrite(), Isis::EditTool::undoEdit(), Isis::StreamExporter::writeGrayscale(), Isis::QtExporter::writeGrayscale(), Isis::StreamExporter::writeRgb(), Isis::QtExporter::writeRgb(), Isis::StreamExporter::writeRgba(), Isis::QtExporter::writeRgba(), and Isis::EditTool::writeToCube().

◆ LineDimension()

◆ MaxBands()

int Isis::BufferManager::MaxBands ( ) const
inlineprotectedinherited

Returns the number of bands in the cube.

Returns
int

Definition at line 168 of file BufferManager.h.

References Isis::BufferManager::p_maxBands.

Referenced by Isis::BandManager::SetBand().

◆ MaxLines()

int Isis::BufferManager::MaxLines ( ) const
inlineprotectedinherited

Returns the number of lines in the cube.

Returns
int

Definition at line 159 of file BufferManager.h.

References Isis::BufferManager::p_maxLines.

Referenced by Isis::LineManager::SetLine().

◆ MaxMaps()

BigInt Isis::BufferManager::MaxMaps ( ) const
inlineprotectedinherited

Returns the maximum number of positions the shape buffer needs to cover the entire image (see setpos method for more info).

Returns
int

Definition at line 178 of file BufferManager.h.

References Isis::BufferManager::p_nmaps.

Referenced by Isis::Brick::Bricks(), and Tiles().

◆ MaxSamples()

int Isis::BufferManager::MaxSamples ( ) const
inlineprotectedinherited

Returns the number of samples in the cube.

Returns
int

Definition at line 150 of file BufferManager.h.

References Isis::BufferManager::p_maxSamps.

Referenced by Isis::SampleManager::SetSample().

◆ next()

bool Isis::BufferManager::next ( )
inlineinherited

Moves the shape buffer to the next position.

Returns true if the next position is valid.

Returns
bool

Definition at line 122 of file BufferManager.h.

References Isis::BufferManager::p_currentMap, and Isis::BufferManager::setpos().

Referenced by Isis::Cube::copy(), Isis::BufferManager::operator++(), Isis::ProcessByBoxcar::StartProcess(), and Isis::ProcessExport::StartProcess().

◆ operator++()

bool Isis::BufferManager::operator++ ( int  )
inlineinherited

Moves the shape buffer to the next position.

Returns true if the next position is valid.

Returns
bool

Definition at line 89 of file BufferManager.h.

References Isis::BufferManager::next().

◆ operator+=()

BufferManager& Isis::BufferManager::operator+= ( int  i)
inlineinherited

Moves the shape buffer by a certain amount.

Returns a pointer to the BufferManager it was called on.

Parameters
iHow far to shift the shape buffer
Returns
BufferManager

Definition at line 102 of file BufferManager.h.

References Isis::BufferManager::p_currentMap, and Isis::BufferManager::setpos().

◆ operator[]() [1/2]

double& Isis::Buffer::operator[] ( const int  index)
inlineinherited

Returns the value in the shape buffer at given index.

Parameters
indexIndex position in buffer. No out of bounds index is checked
Returns
double&

Definition at line 134 of file Buffer.h.

References Isis::Buffer::p_buf.

◆ operator[]() [2/2]

const double& Isis::Buffer::operator[] ( const int  index) const
inlineinherited

Returns the value in the shape buffer at given index.

Parameters
indexIndex position in buffer. No out of bounds index is checked
Returns
double

Definition at line 145 of file Buffer.h.

References Isis::Buffer::p_buf.

◆ PixelType()

Isis::PixelType Isis::Buffer::PixelType ( ) const
inlineinherited

Returns the raw buffer pixel type.

Returns
Isis::PixelType

Definition at line 176 of file Buffer.h.

References Isis::Buffer::p_pixelType.

Referenced by Isis::Buffer::Copy().

◆ Position()

void Isis::Buffer::Position ( const int  index,
int &  i_samp,
int &  i_line,
int &  i_band 
) const
inherited

Returns the sample, line, and band position associated with a shape buffer index.

Performs the same function as the Sample, Line, and Band methods.

Parameters
indexShape buffer index to map to a band position.
i_sampSample position in shape buffer at index.
i_lineLine position in shape buffer at index
i_bandBand position in shape buffer at index.

Definition at line 193 of file Buffer.cpp.

References Isis::Buffer::Band(), Isis::Buffer::Line(), and Isis::Buffer::Sample().

◆ RawBuffer()

void* Isis::Buffer::RawBuffer ( ) const
inlineinherited

Returns a void pointer to the raw buffer.

Cast this void pointer using information from the PixelType() method

Returns
void* Pointer to the raw buffer

Definition at line 167 of file Buffer.h.

References Isis::Buffer::p_rawbuf.

Referenced by Isis::CubeIoHandler::writeIntoDouble().

◆ Sample()

int Isis::Buffer::Sample ( const int  index = 0) const
inherited

Returns the sample position associated with a shape buffer index.

The shape buffer is one dimensional. Let us assume a nsamps=2, nlines=3, and nbands=2. Therefore the total size of the shape buffer is 12 and valid index values are 0-11. Sample(0), Sample(2), Sample(4), etc will return a 1 while Sample(1), Sample(3), Sample(5), etc will return a 2.

Parameters
indexShape buffer index to map to a sample position. Defaults to 0.
Returns
int The absolute sample number based on the buffer index.

Definition at line 143 of file Buffer.cpp.

References Isis::Buffer::p_nsamps, and Isis::Buffer::p_sample.

Referenced by Isis::CubeIoHandler::bufferLessThan(), Isis::Buffer::CopyOverlapFrom(), Isis::CubeViewport::cubeDataChanged(), Isis::ViewportBuffer::DataReady(), Isis::ViewportBuffer::fillBuffer(), Isis::CubeIoHandler::findIntersection(), Isis::SpectralDefinition2D::operator()(), Isis::CubeDataThread::OverlapIndex(), Isis::Buffer::Position(), Isis::CubeIoHandler::read(), Isis::EditTool::redoEdit(), Isis::CubeIoHandler::synchronousWrite(), Isis::EditTool::undoEdit(), and Isis::EditTool::writeToCube().

◆ SampleDimension()

◆ SetBaseBand()

void Isis::Buffer::SetBaseBand ( const int  start_band)
inlineprotectedinherited

This method is used to set the base band position of the shape buffer.

Parameters
start_bandStarting band to set

Definition at line 209 of file Buffer.h.

References Isis::Buffer::p_band.

Referenced by Isis::Brick::SetBaseBand(), and Isis::Buffer::SetBasePosition().

◆ SetBaseLine()

void Isis::Buffer::SetBaseLine ( const int  start_line)
inlineprotectedinherited

This method is used to set the base line position of the shape buffer.

Parameters
start_lineStarting line to set

Definition at line 199 of file Buffer.h.

References Isis::Buffer::p_line.

Referenced by Isis::Brick::SetBaseLine(), and Isis::Buffer::SetBasePosition().

◆ SetBasePosition()

void Isis::Buffer::SetBasePosition ( const int  start_sample,
const int  start_line,
const int  start_band 
)
protectedinherited

This method is used to set the base position of the shape buffer.

In general it is used by BufferManager objects to progress sequentially through a cube by line, tile, boxcar, etc.

Parameters
start_sampleStarting sample to set.
start_lineStarting line to set.
start_bandStarting band to set.

Definition at line 122 of file Buffer.cpp.

References Isis::Buffer::SetBaseBand(), Isis::Buffer::SetBaseLine(), and Isis::Buffer::SetBaseSample().

Referenced by Isis::Brick::SetBasePosition(), Isis::BufferManager::setpos(), and Isis::Portal::SetPosition().

◆ SetBaseSample()

void Isis::Buffer::SetBaseSample ( const int  start_samp)
inlineprotectedinherited

This method is used to set the base sample position of the shape buffer.

Parameters
start_sampStarting sample to set

Definition at line 189 of file Buffer.h.

References Isis::Buffer::p_sample.

Referenced by Isis::Buffer::SetBasePosition(), and Isis::Brick::SetBaseSample().

◆ SetIncrements()

void Isis::BufferManager::SetIncrements ( const int  sinc,
const int  linc,
const int  binc 
)
protectedinherited

Sets how the shape is incremented through the cube.

By default (if this method is not invoked) shapes are moved sequentially through the cube with no overlap. For example, assume a 3 sample by 3 line tile buffer. It would first move across the image from left-to-right starting at sample 1, line 1, and band 1. Upon an increment it would be positioned at sample 4, line 1, and band 1. Each successive increment would cause the sample position to increase by 3 until it exceeds the number of samples in the cube. At that point the shape buffer would be positioned at sample 1, line 4, and band 1 (effectively moving to the next row of tiles). The shape would then continue moving across the cube until it reaches the edge again. Then the next row of tiles would be accessed until the shape reached the bottom of the cube. This default management can be overridden using this method. For example, by setting the increments to (6,3,1) we effectively skip every other tile. By setting them to (6,6,1) we skip every other tile and every other row of tiles. By setting them to (1,1,1) we essentially have NSxNLxNB positions in the cube and the 3x3 tile is managed such that the top left corner of the tile is moved over by 1 sample until it reaches the end of the line then down 1 line and so on until the end of the cube is reached.

Parameters
sincSample increment
lincLine increment
bincBand increment

Definition at line 156 of file BufferManager.cpp.

References Isis::BufferManager::p_binc, Isis::BufferManager::p_boff, Isis::BufferManager::p_currentBand, Isis::BufferManager::p_currentLine, Isis::BufferManager::p_currentMap, Isis::BufferManager::p_currentSample, Isis::BufferManager::p_linc, Isis::BufferManager::p_loff, Isis::BufferManager::p_maxBands, Isis::BufferManager::p_maxLines, Isis::BufferManager::p_maxSamps, Isis::BufferManager::p_nmaps, Isis::BufferManager::p_sinc, and Isis::BufferManager::p_soff.

Referenced by Isis::BoxcarManager::BoxcarManager(), and Isis::BufferManager::BufferManager().

◆ SetOffsets()

void Isis::BufferManager::SetOffsets ( const int  soff,
const int  loff,
const int  boff 
)
protectedinherited

Sets the offset of the buffer.

By default (if this method is not invoked) the offsets are (0,0,0). Offsets are applied when computing the top-left corner of the shape buffer. When used in conjunction with the SetIncrements method, this allows for centering shape buffers around a pixel when passing in negative offsets. For example,with a 3x3x1 shape and offsets of (-1,-1,0) and increments of (1,1,1) would cause the manager to walk a 3x3 buffer through the entire image. Setting the manager position the beginning causes the 3x3 window to be positioned such that sample 1, line 1 of the cube would be at the center of the window and increment would cause sample 2, line 1 to be at the center of the window. Successive increments will move the window in the sample direction until the end of line is reached at which time the buffer would be centered on sample 1, line 2.

Parameters
soffSample offset
loffLine offset
boffBand offset

Definition at line 195 of file BufferManager.cpp.

References Isis::BufferManager::p_boff, Isis::BufferManager::p_loff, and Isis::BufferManager::p_soff.

Referenced by Isis::BoxcarManager::BoxcarManager().

◆ setpos()

bool Isis::BufferManager::setpos ( BigInt  map)
inherited

Sets the position of the shape in the cube.

This shape fits into the cube a specific number of times.

When p_reverse is left false: (default) For example, a line shape on a 100 sample, 200 line, and 2 band cube would have 200*2 or 400 different positions as there are 400 total lines in the cube. Performing setpos(0) would position the shape at sample 1, line 1, and band 1. While setpos(200) would position the shape at sample 1, line 1, and band 2. Finally, setpos(399) would position the shape at sample 1, line 400, and band 2. Setpos returns true if it was sucessfully in setting the position, and false if the shape is at the end of the cube (beyond index 399 in the case of our example).

When p_reverse is set to true: Following the above cube with 100 samples, 200 lines, and 2 bands, performing the setpos(0) would still position the shape at sample 1, line 1, and band 1. However, setpos(1) would position the shape at sample 1, line 1, band 2, while setpos(200) would position the spame at sample 1, line 100, band 1. Setpos returns true of it was sucessfully in setting the position, and false if the shape is at the end of the cube(beyond final index).

Parameters
mapShape buffer position value
Returns
bool True or False depending on whether the shape is at the end of the cube or not.
Exceptions
Isis::iException::Programmer- Invalid value for map argument

Definition at line 235 of file BufferManager.cpp.

References _FILEINFO_, Isis::BufferManager::end(), Isis::BufferManager::p_binc, Isis::BufferManager::p_boff, Isis::BufferManager::p_currentBand, Isis::BufferManager::p_currentLine, Isis::BufferManager::p_currentMap, Isis::BufferManager::p_currentSample, Isis::BufferManager::p_linc, Isis::BufferManager::p_loff, Isis::BufferManager::p_maxBands, Isis::BufferManager::p_maxLines, Isis::BufferManager::p_maxSamps, Isis::BufferManager::p_reverse, Isis::BufferManager::p_sinc, Isis::BufferManager::p_soff, Isis::IException::Programmer, and Isis::Buffer::SetBasePosition().

Referenced by Isis::BufferManager::begin(), Isis::BufferManager::next(), Isis::ProcessByBrick::ProcessCubeInPlaceFunctor< T >::operator()(), Isis::ProcessByBrick::ProcessCubeFunctor< T >::operator()(), Isis::ProcessByBrick::ProcessCubesFunctor< T >::operator()(), Isis::BufferManager::operator+=(), Isis::BandManager::SetBand(), Isis::Brick::SetBrick(), Isis::LineManager::SetLine(), Isis::SampleManager::SetSample(), and SetTile().

◆ SetTile()

bool Isis::TileManager::SetTile ( const int  tile,
const int  band = 1 
)

Sets the current tile as requested.

Parameters
tileThe tile number within a band. This number starts with the upper left corner of the cube and proceedes across the samples then down the lines. The upper left tile of each band is always tile one (1) in band (n).
bandThe band number within the cube. The first band in a cube is always one (1).
Returns
bool
Exceptions
Isis::IException::Programmer- invalid argument value

Definition at line 66 of file TileManager.cpp.

References _FILEINFO_, p_numLineTiles, p_numSampTiles, Isis::IException::Programmer, and Isis::BufferManager::setpos().

Referenced by Isis::ProcessRubberSheet::StartProcess().

◆ size()

◆ swap()

◆ Tiles()

int Isis::TileManager::Tiles ( )
inline

Returns the number of Tiles in the cube.

Returns
int

Definition at line 76 of file TileManager.h.

References Isis::BufferManager::MaxMaps().

Referenced by Isis::ProcessRubberSheet::StartProcess().

Member Data Documentation

◆ p_band

int Isis::Buffer::p_band
protectedinherited

Starting band to read/write.

Definition at line 220 of file Buffer.h.

Referenced by Isis::Buffer::Band(), Isis::Buffer::Buffer(), Isis::Buffer::CopyOverlapFrom(), Isis::Buffer::Index(), and Isis::Buffer::SetBaseBand().

◆ p_buf

double* Isis::Buffer::p_buf
protectedinherited

◆ p_line

int Isis::Buffer::p_line
protectedinherited

Starting line to read/write.

Definition at line 217 of file Buffer.h.

Referenced by Isis::Buffer::Buffer(), Isis::Buffer::CopyOverlapFrom(), Isis::Buffer::Index(), Isis::Buffer::Line(), and Isis::Buffer::SetBaseLine().

◆ p_nbands

int Isis::Buffer::p_nbands
protectedinherited

Number of bands to read/write.

Definition at line 221 of file Buffer.h.

Referenced by Isis::Buffer::BandDimension(), Isis::Buffer::Buffer(), Isis::Buffer::CopyOverlapFrom(), Isis::Buffer::Index(), and Isis::Brick::Resize().

◆ p_nlines

int Isis::Buffer::p_nlines
protectedinherited

◆ p_npixels

int Isis::Buffer::p_npixels
protectedinherited

◆ p_nsamps

int Isis::Buffer::p_nsamps
protectedinherited

◆ p_numLineTiles

int Isis::TileManager::p_numLineTiles
private

Stores the number of tiles in the line direction.

Definition at line 59 of file TileManager.h.

Referenced by SetTile(), and TileManager().

◆ p_numSampTiles

int Isis::TileManager::p_numSampTiles
private

Stores the number of tiles in the sample direction.

Definition at line 58 of file TileManager.h.

Referenced by SetTile(), and TileManager().

◆ p_pixelType

const Isis::PixelType Isis::Buffer::p_pixelType
protectedinherited

The pixel type of the raw buffer.

Definition at line 227 of file Buffer.h.

Referenced by Isis::Buffer::Allocate(), Isis::Buffer::Copy(), and Isis::Buffer::PixelType().

◆ p_rawbuf

void* Isis::Buffer::p_rawbuf
protectedinherited

The raw dm read from the disk.

Definition at line 228 of file Buffer.h.

Referenced by Isis::Buffer::Allocate(), Isis::Buffer::Copy(), Isis::Buffer::RawBuffer(), Isis::Brick::Resize(), and Isis::Buffer::~Buffer().

◆ p_sample

int Isis::Buffer::p_sample
protectedinherited

The documentation for this class was generated from the following files: