USGS

Isis 3.0 Object Programmers' Reference

Home

Brick.cpp

Go to the documentation of this file.
00001 
00024 #include "Brick.h"
00025 
00026 namespace Isis {
00035   void Brick::Resize(const int nsamps, const int nlines, const int nbands) {
00036     delete [] p_buf;
00037     delete [] (char *) p_rawbuf;
00038     p_nsamps = nsamps;
00039     p_nlines = nlines;
00040     p_nbands = nbands;
00041     p_npixels = p_nsamps * p_nlines * p_nbands;
00042     Allocate();
00043   }
00044 
00058   bool Brick::SetBrick (const int brick) {
00059     if (brick < 1) {
00060       std::string message = "Invalid value for argument [brick]";
00061       throw Isis::iException::Message(Isis::iException::Programmer,message,_FILEINFO_); 
00062     }
00063 
00064     return setpos(brick-1);
00065   }
00066 } // end namespace isis