DGtal  0.9.2
exampleImageFactoryFromHDF5.cpp
1 
30 #include <iostream>
32 #include "DGtal/base/Common.h"
33 #include "DGtal/helpers/StdDefs.h"
34 #include "DGtal/images/ImageSelector.h"
35 #include "DGtal/images/ImageFactoryFromImage.h"
36 #include "DGtal/images/ImageFactoryFromHDF5.h"
37 #include "DGtal/images/ImageCache.h"
38 #include "DGtal/images/TiledImage.h"
39 
40 #include "ConfigExamples.h"
42 
43 using namespace std;
44 using namespace DGtal;
45 
47 
48 #define H5FILE_NAME_3D_TILED "exampleImageFactoryFromHDF5_TILED_3D.h5"
49 
50 #define DATASETNAME_3D "UInt8Array3D"
51 #define NX_3D_TILED 300//1980 // dataset dimensions
52 #define NY_3D_TILED 300//1980
53 #define NZ_3D_TILED 300//400
54 #define CHUNK_X_3D_TILED 50 // chunk dimensions
55 #define CHUNK_Y_3D_TILED 50
56 #define CHUNK_Z_3D_TILED 50
57 #define RANK_3D_TILED 3
58 
59 bool writeHDF5_3D_TILED()
60 {
61  trace.beginBlock("Example : writeHDF5_3D (3D)");
62 
63  trace.info() << "begin" << endl;
64 
65  hid_t file, dataset; // file and dataset handles
66  hid_t datatype, dataspace; // handles
67  hsize_t dimsf[RANK_3D_TILED]; // dataset dimensions
68  herr_t status;
69  //DGtal::uint8_t data[NZ_3D_TILED][NY_3D_TILED][NX_3D_TILED]; // data to write
70  DGtal::uint8_t *data;
71  int i, j, k;
72 
73  // compressed dataset
74  hid_t plist_id;
75  hsize_t cdims[RANK_3D_TILED];
76  // compressed dataset
77 
78  data = (DGtal::uint8_t*)malloc(NZ_3D_TILED*NY_3D_TILED*NX_3D_TILED * sizeof(DGtal::uint8_t));
79  if (data == NULL)
80  {
81  trace.error() << " malloc error" << endl;
82  return false;
83  }
84 
85  // Data and output buffer initialization.
86  for(k = 0; k < NZ_3D_TILED; k++)
87  for(j = 0; j < NY_3D_TILED; j++)
88  for(i = 0; i < NX_3D_TILED; i++)
89  if (i>=15 && j>=15 && k>=15 && i<35 && j<35 && k<35)
90  data[k*NY_3D_TILED*NX_3D_TILED + j*NX_3D_TILED + i] = 1;
91  else
92  data[k*NY_3D_TILED*NX_3D_TILED + j*NX_3D_TILED + i] = 0;
93 
94  /*
95  * Create a new file using H5F_ACC_TRUNC access,
96  * default file creation properties, and default file
97  * access properties.
98  */
99  file = H5Fcreate(H5FILE_NAME_3D_TILED, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
100 
101  // Describe the size of the array and create the data space for fixed size dataset.
102  dimsf[0] = NZ_3D_TILED;
103  dimsf[1] = NY_3D_TILED;
104  dimsf[2] = NX_3D_TILED;
105  dataspace = H5Screate_simple(RANK_3D_TILED, dimsf, NULL);
106 
107  // compressed dataset
108  plist_id = H5Pcreate (H5P_DATASET_CREATE);
109 
110  // Dataset must be chunked for compression.
111  cdims[0] = CHUNK_Z_3D_TILED;
112  cdims[1] = CHUNK_Y_3D_TILED;
113  cdims[2] = CHUNK_X_3D_TILED;
114  status = H5Pset_chunk (plist_id, RANK_3D_TILED, cdims);
115  if (status)
116  {
117  trace.error() << " H5Dchunck error" << std::endl;
118  free(data);
119  return false;
120  }
121 
122 
123  // --> Compression levels :
124  // 0 No compression
125  // 1 Best compression speed; least compression
126  // 2 through 8 Compression improves; speed degrades
127  // 9 Best compression ratio; slowest speed
128  //
129  // Set ZLIB / DEFLATE Compression using compression level 6.
130  status = H5Pset_deflate (plist_id, 6);
131  if (status)
132  {
133  trace.error() << " H5Ddeflate error" << std::endl;
134  free(data);
135  return false;
136  }
137  // compressed dataset
138 
139  /*
140  * Define datatype for the data in the file.
141  */
142  datatype = H5Tcopy(H5T_NATIVE_UINT8);
143  status = H5Tset_order(datatype, H5T_ORDER_LE);
144  if (status)
145  {
146  trace.error() << " H5Dsetorder error" << std::endl;
147  free(data);
148  return false;
149  }
150 
151  /*
152  * Create a new dataset within the file using defined dataspace and
153  * datatype and default dataset creation properties.
154  */
155  dataset = H5Dcreate2(file, DATASETNAME_3D, datatype, dataspace,
156  H5P_DEFAULT, /*H5P_DEFAULT*/plist_id, H5P_DEFAULT); // here to activate compressed dataset
157 
158  // Write the data to the dataset using default transfer properties.
159  status = H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
160  if (status)
161  {
162  trace.error() << " H5Dwrite error" << std::endl;
163  free(data);
164  return false;
165  }
166 
167  // Close/release resources.
168  H5Sclose(dataspace);
169  H5Tclose(datatype);
170  H5Dclose(dataset);
171  // compressed dataset
172  H5Pclose(plist_id);
173  // compressed dataset
174  H5Fclose(file);
175 
176  free(data);
177 
178  trace.info() << "end" << endl;
179 
180  trace.endBlock();
181  trace.info() << endl;
182 
183  return true;
184 }
185 
186 bool exampleImage3D()
187 {
188  int i, j, k;
189 
190  trace.beginBlock("Example : ImageV (3D)");
191 
193  typedef ImageV::Domain DomainV;
194  typedef ImageV::Point PointV;
195  DomainV domainV(PointV(0,0,0), PointV(NX_3D_TILED-1, NY_3D_TILED-1, NZ_3D_TILED-1));
196  ImageV imageV(domainV);
197 
198  for(k = 0; k < NZ_3D_TILED; k++)
199  for(j = 0; j < NY_3D_TILED; j++)
200  for(i = 0; i < NX_3D_TILED; i++)
201  if (i>=15 && j>=15 && k>=15 && i<35 && j<35 && k<35)
202  imageV.setValue(PointV(i,j,k), 1);
203  else
204  imageV.setValue(PointV(i,j,k), 0);
205 
206  int cpt=0;
207  trace.beginBlock("Counting ones in the original image (domain)");
208  for(ImageV::Domain::ConstIterator it = imageV.domain().begin(), itend = imageV.domain().end();
209  it != itend; ++it)
210  if (imageV( *it ) == 1)
211  cpt++;
212  trace.info() << "imageV cpt: " << cpt << endl;
213  trace.endBlock();
214 
215  cpt=0;
216  trace.beginBlock("Counting ones in the original image (range)");
217  for(ImageV::Range::ConstIterator it = imageV.range().begin(), itend = imageV.range().end();
218  it != itend; ++it)
219  if (( *it ) == 1)
220  cpt++;
221  trace.info() << "imageV cpt: " << cpt << endl;
222  trace.endBlock();
223 
224  trace.endBlock();
225  trace.info() << endl;
226 
227  return true;
228 }
229 
230 bool exampleTiledImageFromImage_1block3D()
231 {
232  int i, j, k;
233 
234  trace.beginBlock("Example : TiledImage with ImageFactoryFromImage - 1 block (3D)");
235 
237  typedef ImageV::Domain DomainV;
238  typedef ImageV::Point PointV;
239  DomainV domainV(PointV(0,0,0), PointV(NX_3D_TILED-1, NY_3D_TILED-1, NZ_3D_TILED-1));
240  ImageV imageV(domainV);
241 
242  for(k = 0; k < NZ_3D_TILED; k++)
243  for(j = 0; j < NY_3D_TILED; j++)
244  for(i = 0; i < NX_3D_TILED; i++)
245  if (i>=15 && j>=15 && k>=15 && i<35 && j<35 && k<35)
246  imageV.setValue(PointV(i,j,k), 1);
247  else
248  imageV.setValue(PointV(i,j,k), 0);
249 
250  typedef ImageFactoryFromImage<ImageV> MyImageFactoryFromImage;
251  MyImageFactoryFromImage factImage(imageV);
252 
253  typedef MyImageFactoryFromImage::OutputImage OutputImage;
254 
255  //typedef ImageCacheReadPolicyFIFO<OutputImage, MyImageFactoryFromImage> MyImageCacheReadPolicyFIFO;
256  typedef ImageCacheReadPolicyLAST<OutputImage, MyImageFactoryFromImage> MyImageCacheReadPolicyLAST;
257  typedef ImageCacheWritePolicyWT<OutputImage, MyImageFactoryFromImage> MyImageCacheWritePolicyWT;
258  //MyImageCacheReadPolicyFIFO imageCacheReadPolicyFIFO(factImage, 3);
259  MyImageCacheReadPolicyLAST imageCacheReadPolicyLAST(factImage);
260  MyImageCacheWritePolicyWT imageCacheWritePolicyWT(factImage);
261 
263  BOOST_CONCEPT_ASSERT(( concepts::CImage< MyTiledImage > ));
264  MyTiledImage tiledImage1block(factImage, imageCacheReadPolicyLAST, imageCacheWritePolicyWT, 1);
265 
266  typedef MyTiledImage::OutputImage OutputImage;
267  //OutputImage::Value aValue;
268 
269  trace.info() << tiledImage1block << std::endl;
270 
271  int cpt=0;
272  trace.beginBlock("Counting ones in the tiled image - 1x1x1 blocks - LAST/WT - TiledIterator");
273  for(MyTiledImage::TiledIterator it = tiledImage1block.begin(), itend = tiledImage1block.end();
274  it != itend; ++it)
275  if ((*it) == 1)
276  cpt++;
277  trace.info() << "Cpt: " << cpt << " - cacheMissRead:" << tiledImage1block.getCacheMissRead() << " - cacheMissWrite:" << tiledImage1block.getCacheMissWrite() << endl;
278  trace.endBlock();
279 
280  cpt=0; tiledImage1block.clearCacheAndResetCacheMisses();
281  trace.beginBlock("Counting ones in the tiled image - 1x1x1 blocks - LAST/WT");
282  for(ImageV::Domain::ConstIterator it = tiledImage1block.domain().begin(), itend = tiledImage1block.domain().end();
283  it != itend; ++it)
284  if (tiledImage1block(*it) == 1)
285  cpt++;
286  trace.info() << "Cpt: " << cpt << " - cacheMissRead:" << tiledImage1block.getCacheMissRead() << " - cacheMissWrite:" << tiledImage1block.getCacheMissWrite() << endl;
287  trace.endBlock();
288 
289  trace.endBlock();
290  trace.info() << endl;
291 
292  return true;
293 }
294 
295 bool exampleTiledImageFromHDF5_1block3D()
296 {
297  trace.beginBlock("Example : TiledImage with ImageFactoryFromHDF5 - 1 block (3D)");
298 
300 
301  typedef ImageFactoryFromHDF5<Image> MyImageFactoryFromHDF5;
302  MyImageFactoryFromHDF5 factImage(H5FILE_NAME_3D_TILED, DATASETNAME_3D);
303 
304  typedef MyImageFactoryFromHDF5::OutputImage OutputImage;
305 
306  //typedef ImageCacheReadPolicyFIFO<OutputImage, MyImageFactoryFromHDF5> MyImageCacheReadPolicyFIFO;
307  typedef ImageCacheReadPolicyLAST<OutputImage, MyImageFactoryFromHDF5> MyImageCacheReadPolicyLAST;
308  typedef ImageCacheWritePolicyWT<OutputImage, MyImageFactoryFromHDF5> MyImageCacheWritePolicyWT;
309  //MyImageCacheReadPolicyFIFO imageCacheReadPolicyFIFO(factImage, 3);
310  MyImageCacheReadPolicyLAST imageCacheReadPolicyLAST(factImage);
311  MyImageCacheWritePolicyWT imageCacheWritePolicyWT(factImage);
312 
314  BOOST_CONCEPT_ASSERT(( concepts::CImage< MyTiledImage > ));
315  MyTiledImage tiledImage1block(factImage, imageCacheReadPolicyLAST, imageCacheWritePolicyWT, 1);
316 
317  typedef MyTiledImage::OutputImage OutputImage;
318  //OutputImage::Value aValue;
319 
320  trace.info() << tiledImage1block << std::endl;
321 
322  int cpt=0;
323  trace.beginBlock("Counting ones in the tiled image - 1x1x1 blocks - LAST/WT - TiledIterator");
324  for(MyTiledImage::TiledIterator it = tiledImage1block.begin(), itend = tiledImage1block.end();
325  it != itend; ++it)
326  if ((*it) == 1)
327  cpt++;
328  trace.info() << "Cpt: " << cpt << " - cacheMissRead:" << tiledImage1block.getCacheMissRead() << " - cacheMissWrite:" << tiledImage1block.getCacheMissWrite() << endl;
329  trace.endBlock();
330 
331  cpt=0; tiledImage1block.clearCacheAndResetCacheMisses();
332  trace.beginBlock("Counting ones in the tiled image - 1x1x1 blocks - LAST/WT");
333  for(Image::Domain::ConstIterator it = tiledImage1block.domain().begin(), itend = tiledImage1block.domain().end();
334  it != itend; ++it)
335  if (tiledImage1block(*it) == 1)
336  cpt++;
337  trace.info() << "Cpt: " << cpt << " - cacheMissRead:" << tiledImage1block.getCacheMissRead() << " - cacheMissWrite:" << tiledImage1block.getCacheMissWrite() << endl;
338  trace.endBlock();
339 
340  trace.endBlock();
341  trace.info() << endl;
342 
343  return true;
344 }
345 
346 bool exampleTiledImageFromImage_10blocks3D()
347 {
348  int i, j, k;
349 
350  trace.beginBlock("Example : TiledImage with ImageFactoryFromImage - 10 blocks (3D)");
351 
353  typedef ImageV::Domain DomainV;
354  typedef ImageV::Point PointV;
355  DomainV domainV(PointV(0,0,0), PointV(NX_3D_TILED-1, NY_3D_TILED-1, NZ_3D_TILED-1));
356  ImageV imageV(domainV);
357 
358  for(k = 0; k < NZ_3D_TILED; k++)
359  for(j = 0; j < NY_3D_TILED; j++)
360  for(i = 0; i < NX_3D_TILED; i++)
361  if (i>=15 && j>=15 && k>=15 && i<35 && j<35 && k<35)
362  imageV.setValue(PointV(i,j,k), 1);
363  else
364  imageV.setValue(PointV(i,j,k), 0);
365 
366  typedef ImageFactoryFromImage<ImageV> MyImageFactoryFromImage;
367  MyImageFactoryFromImage factImage(imageV);
368 
369  typedef MyImageFactoryFromImage::OutputImage OutputImage;
370 
371  typedef ImageCacheReadPolicyFIFO<OutputImage, MyImageFactoryFromImage> MyImageCacheReadPolicyFIFO;
372  typedef ImageCacheReadPolicyLAST<OutputImage, MyImageFactoryFromImage> MyImageCacheReadPolicyLAST;
373  typedef ImageCacheWritePolicyWT<OutputImage, MyImageFactoryFromImage> MyImageCacheWritePolicyWT;
374  MyImageCacheReadPolicyFIFO imageCacheReadPolicyFIFO_A(factImage, 10);
375  MyImageCacheReadPolicyFIFO imageCacheReadPolicyFIFO_B(factImage, 5);
376  MyImageCacheReadPolicyLAST imageCacheReadPolicyLAST(factImage);
377  MyImageCacheWritePolicyWT imageCacheWritePolicyWT(factImage);
378 
380  BOOST_CONCEPT_ASSERT(( concepts::CImage< MyTiledImage > ));
381  MyTiledImage tiledImage(factImage, imageCacheReadPolicyLAST, imageCacheWritePolicyWT, 10);
382 
384  BOOST_CONCEPT_ASSERT(( concepts::CImage< MyTiledImageFIFO > ));
385  MyTiledImageFIFO tiledImageFIFO_A(factImage, imageCacheReadPolicyFIFO_A, imageCacheWritePolicyWT, 10);
386  MyTiledImageFIFO tiledImageFIFO_B(factImage, imageCacheReadPolicyFIFO_B, imageCacheWritePolicyWT, 10);
387 
388  typedef MyTiledImage::OutputImage OutputImage;
389  //OutputImage::Value aValue;
390 
391  int cpt=0;
392  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - FIFO(10)/WT - TiledIterator");
393  for(MyTiledImageFIFO::TiledIterator it = tiledImageFIFO_A.begin(), itend = tiledImageFIFO_A.end();
394  it != itend; ++it)
395  {
396  if ((*it) == 1)
397  cpt++;
398  }
399  trace.endBlock();
400 
401  cpt=0; tiledImageFIFO_A.clearCacheAndResetCacheMisses();
402  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - FIFO(10)/WT");
403  for(ImageV::Domain::ConstIterator it = tiledImageFIFO_A.domain().begin(), itend = tiledImageFIFO_A.domain().end();
404  it != itend; ++it)
405  {
406  if (tiledImageFIFO_A(*it) == 1)
407  cpt++;
408  }
409  trace.endBlock();
410 
411  // ---
412 
413  cpt=0;
414  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - FIFO(5)/WT - TiledIterator");
415  for(MyTiledImageFIFO::TiledIterator it = tiledImageFIFO_B.begin(), itend = tiledImageFIFO_B.end();
416  it != itend; ++it)
417  {
418  if ((*it) == 1)
419  cpt++;
420  }
421  trace.endBlock();
422 
423  cpt=0; tiledImageFIFO_B.clearCacheAndResetCacheMisses();
424  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - FIFO(5)/WT");
425  for(ImageV::Domain::ConstIterator it = tiledImageFIFO_B.domain().begin(), itend = tiledImageFIFO_B.domain().end();
426  it != itend; ++it)
427  {
428  if (tiledImageFIFO_B(*it) == 1)
429  cpt++;
430  }
431  trace.endBlock();
432 
433  // ---
434 
435  cpt=0;
436  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - LAST/WT - TiledIterator");
437  for(MyTiledImage::TiledIterator it = tiledImage.begin(), itend = tiledImage.end();
438  it != itend; ++it)
439  {
440  if ((*it) == 1)
441  cpt++;
442  }
443  trace.endBlock();
444 
445  cpt=0; tiledImage.clearCacheAndResetCacheMisses();
446  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - LAST/WT");
447  for(ImageV::Domain::ConstIterator it = tiledImage.domain().begin(), itend = tiledImage.domain().end();
448  it != itend; ++it)
449  {
450  if (tiledImage(*it) == 1)
451  cpt++;
452  }
453  trace.endBlock();
454 
455  trace.endBlock();
456  trace.info() << endl;
457 
458  return true;
459 }
460 
461 bool exampleTiledImageFromHDF5_10blocks3D()
462 {
463  trace.beginBlock("Example : TiledImage with ImageFactoryFromHDF5 - 10 blocks (3D)");
464 
466 
467  typedef ImageFactoryFromHDF5<Image> MyImageFactoryFromHDF5;
468  MyImageFactoryFromHDF5 factImage(H5FILE_NAME_3D_TILED, DATASETNAME_3D);
469 
470  typedef MyImageFactoryFromHDF5::OutputImage OutputImage;
471 
472  typedef ImageCacheReadPolicyFIFO<OutputImage, MyImageFactoryFromHDF5> MyImageCacheReadPolicyFIFO;
473  typedef ImageCacheReadPolicyLAST<OutputImage, MyImageFactoryFromHDF5> MyImageCacheReadPolicyLAST;
474  typedef ImageCacheWritePolicyWT<OutputImage, MyImageFactoryFromHDF5> MyImageCacheWritePolicyWT;
475  MyImageCacheReadPolicyFIFO imageCacheReadPolicyFIFO_A(factImage, 10);
476  MyImageCacheReadPolicyFIFO imageCacheReadPolicyFIFO_B(factImage, 5);
477  MyImageCacheReadPolicyLAST imageCacheReadPolicyLAST(factImage);
478  MyImageCacheWritePolicyWT imageCacheWritePolicyWT(factImage);
479 
481  BOOST_CONCEPT_ASSERT(( concepts::CImage< MyTiledImage > ));
482  MyTiledImage tiledImage(factImage, imageCacheReadPolicyLAST, imageCacheWritePolicyWT, 10);
483 
485  BOOST_CONCEPT_ASSERT(( concepts::CImage< MyTiledImageFIFO > ));
486  MyTiledImageFIFO tiledImageFIFO_A(factImage, imageCacheReadPolicyFIFO_A, imageCacheWritePolicyWT, 10);
487  MyTiledImageFIFO tiledImageFIFO_B(factImage, imageCacheReadPolicyFIFO_B, imageCacheWritePolicyWT, 10);
488 
489  typedef MyTiledImage::OutputImage OutputImage;
490  //OutputImage::Value aValue;
491 
492  int cpt=0;
493  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - FIFO(10)/WT - TiledIterator");
494  for(MyTiledImageFIFO::TiledIterator it = tiledImageFIFO_A.begin(), itend = tiledImageFIFO_A.end();
495  it != itend; ++it)
496  {
497  if ((*it) == 1)
498  cpt++;
499  }
500  trace.endBlock();
501 
502  cpt=0; tiledImageFIFO_A.clearCacheAndResetCacheMisses();
503  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - FIFO(10)/WT");
504  for(Image::Domain::ConstIterator it = tiledImageFIFO_A.domain().begin(), itend = tiledImageFIFO_A.domain().end();
505  it != itend; ++it)
506  {
507  if (tiledImageFIFO_A(*it) == 1)
508  cpt++;
509  }
510  trace.endBlock();
511 
512  // ---
513 
514  cpt=0;
515  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - FIFO(5)/WT - TiledIterator");
516  for(MyTiledImageFIFO::TiledIterator it = tiledImageFIFO_B.begin(), itend = tiledImageFIFO_B.end();
517  it != itend; ++it)
518  {
519  if ((*it) == 1)
520  cpt++;
521  }
522  trace.endBlock();
523 
524  cpt=0; tiledImageFIFO_B.clearCacheAndResetCacheMisses();
525  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - FIFO(5)/WT");
526  for(Image::Domain::ConstIterator it = tiledImageFIFO_B.domain().begin(), itend = tiledImageFIFO_B.domain().end();
527  it != itend; ++it)
528  {
529  if (tiledImageFIFO_B(*it) == 1)
530  cpt++;
531  }
532  trace.endBlock();
533 
534  // ---
535 
536  cpt=0;
537  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - LAST/WT - TiledIterator");
538  for(MyTiledImage::TiledIterator it = tiledImage.begin(), itend = tiledImage.end();
539  it != itend; ++it)
540  {
541  if ((*it) == 1)
542  cpt++;
543  }
544  trace.endBlock();
545 
546  cpt=0; tiledImage.clearCacheAndResetCacheMisses();
547  trace.beginBlock("Counting ones in the tiled image - 10x10x10 blocks - LAST/WT");
548  for(Image::Domain::ConstIterator it = tiledImage.domain().begin(), itend = tiledImage.domain().end();
549  it != itend; ++it)
550  {
551  if (tiledImage(*it) == 1)
552  cpt++;
553  }
554  trace.endBlock();
555 
556  trace.endBlock();
557  trace.info() << endl;
558 
559  return true;
560 }
562 // Standard services - public :
563 
564 int main( /*int argc, char** argv*/ )
565 {
566  //if (argc==1)
567  writeHDF5_3D_TILED();
568 
569  exampleImage3D();
570 
571  exampleTiledImageFromImage_1block3D();
572  exampleTiledImageFromHDF5_1block3D();
573 
574  exampleTiledImageFromImage_10blocks3D();
575  exampleTiledImageFromHDF5_10blocks3D();
576 
577  return 0;
578 }
579 // //
void beginBlock(const std::string &keyword="")
Aim: implements association bewteen points lying in a digital domain and values.
Definition: Image.h:69
Trace trace
Definition: Common.h:130
Aim: implements a 'LAST' read policy cache.
STL namespace.
double endBlock()
Aim: implements a tiled image from a "bigger/original" one from an ImageFactory.
Definition: TiledImage.h:76
Aim: implements a factory to produce images from a "bigger/original" one according to a given domain...
Aim: implements a 'WT (Write-through)' write policy cache.
DGtal is the top-level namespace which contains all DGtal functions and types.
boost::uint8_t uint8_t
unsigned 8-bit integer.
Definition: BasicTypes.h:59
std::ostream & info()
Aim: implements a 'FIFO' read policy cache.
Aim: Defines the concept describing a read/write image, having an output iterator.
Definition: CImage.h:102
std::ostream & error()
Aim: implements a factory from an HDF5 file.