Macros | Functions
vil_blocked_image_resource.cxx File Reference
#include "vil_blocked_image_resource.h"
#include <cassert>
#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.

Macros

#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. More...
 

Macro Definition Documentation

◆ GLUE_BLOCK_CASE

#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; \
}
Concrete view of image data of type T held in memory.
Definition: vil_fwd.h:13

◆ TRIM_BORDER_BLOCK_CASE

#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
Concrete view of image data of type T held in memory.
Definition: vil_fwd.h:13
vil_image_view< T > vil_crop(const vil_image_view< T > &im, unsigned i0, unsigned n_i, unsigned j0, unsigned n_j)
Create a view which is a cropped version of src.
Definition: vil_crop.h:21

Function Documentation

◆ blocked_image_resource()

vil_blocked_image_resource_sptr blocked_image_resource ( const vil_image_resource_sptr ir)

cast to blocked resource if possible.

Definition at line 275 of file vil_blocked_image_resource.cxx.