Defines | Functions
core/vil/vil_blocked_image_resource.cxx File Reference
#include "vil_blocked_image_resource.h"
#include <vcl_cassert.h>
#include <vil/vil_property.h>
#include <vil/vil_image_view.h>
#include <vil/vil_crop.h>
#include <vil/vil_copy.h>

Go to the source code of this file.

Defines

#define GLUE_BLOCK_CASE(FORMAT, T)
#define TRIM_BORDER_BLOCK_CASE(FORMAT, T)

Functions

vil_blocked_image_resource_sptr blocked_image_resource (const vil_image_resource_sptr &ir)
 cast to blocked resource if possible.

Define Documentation

#define GLUE_BLOCK_CASE (   FORMAT,
 
)
Value:
case FORMAT: { \
    vil_image_view<T>* output_image = \
      new vil_image_view<T>(output_width, output_height, 1, nplanes()); \
    for (unsigned int bi = 0 ; bi < blocks.size() ; bi++) \
    { \
      for (unsigned int bj = 0 ; bj < blocks[bi].size() ; bj++)\
      { \
        vil_copy_to_window(static_cast<vil_image_view<T>&>(*blocks[bi][bj]), *output_image, curr_i, curr_j); \
        curr_j += blocks[bi][bj]->nj(); \
      } \
      curr_j = 0; \
      curr_i += blocks[bi][0]->ni();\
    } \
    result = output_image; \
    return result; \
   }
#define TRIM_BORDER_BLOCK_CASE (   FORMAT,
 
)
Value:
case FORMAT: { \
        vil_image_view< T > currBlock = static_cast<vil_image_view< T >&>(*blocks[bi][bj]);\
        vil_image_view< T >* croppedBlock = new vil_image_view< T >();\
        *croppedBlock = vil_crop(currBlock, bi0, bin-bi0+1, bj0, bjn-bj0+1);\
        blocks[bi][bj] = croppedBlock;\
       } break

Function Documentation

vil_blocked_image_resource_sptr blocked_image_resource ( const vil_image_resource_sptr ir)

cast to blocked resource if possible.

Definition at line 277 of file vil_blocked_image_resource.cxx.