Isis Developer Reference
Brick.h
Go to the documentation of this file.
1 #ifndef Brick_h
2 #define Brick_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include "PixelType.h"
11 #include "BufferManager.h"
12 #include "Cube.h"
13 
14 namespace Isis {
45  class Brick : public Isis::BufferManager {
46  public:
60  Brick(const int nsamps, const int nlines, const int nbands,
61  const Isis::PixelType type, bool reverse=false) :
62  Isis::BufferManager(nsamps, nlines, nbands,
63  nsamps, nlines, nbands, type, reverse) {
64  };
65 
79  Brick(const Isis::Cube &cube, const int &bufNumSamples,
80  const int &bufNumLines, const int &bufNumBands,
81  bool reverse=false) :
82  Isis::BufferManager(cube.sampleCount(), cube.lineCount(),
83  cube.bandCount(), bufNumSamples, bufNumLines,
84  bufNumBands, cube.pixelType(), reverse) {
85  };
86 
104  Brick(int maxSamples, int maxLines, int maxBands, int bufNumSamples,
105  int bufNumLines, int bufNumBands, Isis::PixelType type,
106  bool reverse=false) :
107  Isis::BufferManager(maxSamples, maxLines, maxBands, bufNumSamples,
108  bufNumLines, bufNumBands, type, reverse) {
109  };
110 
111  public:
120  void SetBasePosition(const int start_sample, const int start_line,
121  const int start_band) {
122  this->Isis::Buffer::SetBasePosition(start_sample, start_line, start_band);
123  };
124 
130  inline void SetBaseSample(const int start_samp) {
131  this->Isis::Buffer::SetBaseSample(start_samp);
132  };
133 
139  inline void SetBaseLine(const int start_line) {
140  this->Isis::Buffer::SetBaseLine(start_line);
141  };
142 
148  inline void SetBaseBand(const int start_band) {
149  this->Isis::Buffer::SetBaseBand(start_band);
150  };
151 
152  void Resize(const int nsamps, const int nlines, const int nbands);
153 
161  bool SetBrick(const int brick);
162 
168  inline int Bricks() {
169  return MaxMaps();
170  };
171  };
172 };
173 
174 #endif
Isis::Brick::SetBasePosition
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.
Definition: Brick.h:120
Isis::Brick::SetBrick
bool SetBrick(const int brick)
This method is used to set the position of the brick.
Definition: Brick.cpp:42
Isis::Buffer::SetBaseBand
void SetBaseBand(const int start_band)
This method is used to set the base band position of the shape buffer.
Definition: Buffer.h:193
Isis::BufferManager::setpos
bool setpos(BigInt map)
Sets the position of the shape in the cube.
Definition: BufferManager.cpp:219
Cube.h
Isis::Brick::SetBaseSample
void SetBaseSample(const int start_samp)
This method is used to set the base sample position of the shape buffer.
Definition: Brick.h:130
Isis::Buffer::Allocate
void Allocate()
Size or resize the memory buffer.
Definition: Buffer.cpp:340
BufferManager.h
Isis::BufferManager::MaxMaps
BigInt MaxMaps() const
Returns the maximum number of positions the shape buffer needs to cover the entire image (see setpos ...
Definition: BufferManager.h:162
Isis::Brick
Buffer for containing a three dimensional section of an image.
Definition: Brick.h:45
Isis::BufferManager
Manages a Buffer over a cube.
Definition: BufferManager.h:52
Isis::Buffer::SetBaseLine
void SetBaseLine(const int start_line)
This method is used to set the base line position of the shape buffer.
Definition: Buffer.h:183
Isis::Brick::Bricks
int Bricks()
Returns the number of Bricks in the cube.
Definition: Brick.h:168
Isis::Brick::Brick
Brick(const Isis::Cube &cube, const int &bufNumSamples, const int &bufNumLines, const int &bufNumBands, bool reverse=false)
Constructs a Brick object.
Definition: Brick.h:79
PixelType.h
Isis::Brick::SetBaseLine
void SetBaseLine(const int start_line)
This method is used to set the base line position of the shape buffer.
Definition: Brick.h:139
Isis::Buffer::SetBasePosition
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.
Definition: Buffer.cpp:106
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::Brick::Brick
Brick(int maxSamples, int maxLines, int maxBands, int bufNumSamples, int bufNumLines, int bufNumBands, Isis::PixelType type, bool reverse=false)
Constructs a Brick object of the specified buffer size and area size to map.
Definition: Brick.h:104
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::IException
Isis exception class.
Definition: IException.h:91
Brick.h
Isis::Brick::Brick
Brick(const int nsamps, const int nlines, const int nbands, const Isis::PixelType type, bool reverse=false)
Constructs a Brick object.
Definition: Brick.h:60
Isis::PixelType
PixelType
Enumerations for Isis Pixel Types.
Definition: PixelType.h:27
IException.h
Isis::Buffer::p_rawbuf
void * p_rawbuf
The raw dm read from the disk.
Definition: Buffer.h:212
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::Buffer::p_nsamps
int p_nsamps
Number of samples to read/write.
Definition: Buffer.h:199
Isis::Buffer::p_nlines
int p_nlines
Number of lines to read/write.
Definition: Buffer.h:202
Isis::Brick::SetBaseBand
void SetBaseBand(const int start_band)
This method is used to set the base band position of the shape buffer.
Definition: Brick.h:148
Isis::Buffer::p_npixels
int p_npixels
Number of pixels (nsamps * nlines * nbands)
Definition: Buffer.h:207
Isis::Buffer::SetBaseSample
void SetBaseSample(const int start_samp)
This method is used to set the base sample position of the shape buffer.
Definition: Buffer.h:173
Isis::Brick::Resize
void Resize(const int nsamps, const int nlines, const int nbands)
Resizes the memory buffer to the specified number of samples, lines, and bands.
Definition: Brick.cpp:19
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Buffer::p_buf
double * p_buf
Shape buffer allocated to the size of npixels for handling reads/writes.
Definition: Buffer.h:208
Isis::Buffer::p_nbands
int p_nbands
Number of bands to read/write.
Definition: Buffer.h:205