9 #ifndef CLASS_DATABLOCK
10 #define CLASS_DATABLOCK
28 DataBlock(vector<Pixel> nBlock,
int w,
int h,
int nAmount){
40 amount_channels = nAmount;
44 DataBlock(
int nAmount, vector<int> chns,
int w,
int h){
55 for (
int i = 0; i < width*height; i=i+1)
57 Pixel aux(chns,nAmount);
70 this->setValid(
false);
81 for (
int i = 0; i < (width*height); i=i+1)
83 result+= block[i].getSize();
93 int* array = (
int*)malloc(
sizeof(
int)*3);
118 for (
int i = 0; i < (width*height); ++i)
120 local_max = local_max + block[i].getIntensity();
123 local_max = (int)(local_max/(width*height));
131 amount_channels = aChannels;
132 for(
int i=0;i<(height*width);i++){
133 block[i].setAmountChannels(amount_channels);
141 for(
int i=0;i<(height*width);i++){
142 block[i].setChannels(nChannels);
150 return (
void*)█
Clase que representa un Bloque de Píxeles.
Clase que representa un tipo de dato que será paquetizado.
DataBlock(vector< Pixel > nBlock, int w, int h, int nAmount)
void setAmountChannels(int aChannels)
void setChannels(vector< int > nChannels)
DataBlock(int nAmount, vector< int > chns, int w, int h)
Clase que representa un Pixel de una imagen.