Home | Develop | Download | Contact
example_matrix_fill.cpp
1 
40 #include <cmath>
41 #include <Pds/Ra>
42 
43 int main(void)
44 {
45  Pds::Matrix A(2,3);
46 
47  A.Fill(-1);
48  A.Print("\nA:\n");
49 
50  A.FillId();
51  A.Print("\nA:\n");
52 
53  A.FillLinSpace(0,22);
54  A.Print("\nA:\n");
55 
56  A.FillRandU(-2,2);
57  A.Print("\nA:\n");
58 
59  A.FillRandU(-2.0,2.0);
60  A.Print("\nA:\n");
61 
62  A=255*Pds::Zeros(1007,507);
63  A.InitRegion(Pds::RegionRect(0,0,100,100),255);
64 
65  A.ExportBmpFile(Pds::Colormap::Jet,"test.bmp");
66  Pds::Matrix::ExportBmpFile(A,A,A,"test2.bmp");
67  return 0;
68 }
La clase tipo Pds::Matrix . Esta clase genera una matriz de Nlin lineas y Ncol columnas....
Definition: Matrix.hpp:86
La estructura tipo Pds::RegionRect . Esta estructura genera una region. Para usar incluir <Pds/Region...
Definition: RegionRect.hpp:64
Pds::Matrix Zeros(const Pds::Size &S)
Retorna una matriz con ceros.
bool ExportBmpFile(const unsigned char colormap[256][3], const std::string &filepath) const
Escribe en una matriz en un archivo binario en formato BMP. Losdatos deben ir de 0 a 255,...
const unsigned char Jet[256][3]
Definition: Colormap.hpp:334

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed