core/vil/vil_new.h File Reference


Detailed Description

Make a new image.

If it's very big, it might make a disk image, with a temporary name in which case "prototype" will be consulted about issues such as file format etc. If you want more control over the exact disk format, use one of the routines with more than 4 arguments.

Author:
awf@robots.ox.ac.uk
Date:
26 Feb 00
    Modifications
     16 Feb 2000 AWF - Initial version.
     25 Sep 2002 Ian Scott - convert to vil.
     30 Mar 2007 Peter Vanroose- Removed deprecated vil_new_image_view_j_i_plane
   

Definition in file vil_new.h.

#include <vil/vil_fwd.h>
#include <vil/vil_image_resource.h>
#include <vil/vil_blocked_image_resource.h>
#include <vil/vil_pyramid_image_resource.h>
#include <vil/vil_image_view.h>

Go to the source code of this file.


Functions

vil_blocked_image_resource_sptr vil_new_blocked_image_resource (vil_stream *os, unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format, unsigned size_block_i, unsigned size_block_j, char const *file_format=0)
 Make a new blocked resource file.
vil_blocked_image_resource_sptr vil_new_blocked_image_resource (char const *filename, unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format, unsigned size_block_i, unsigned size_block_j, char const *file_format=0)
 Make a new blocked resource file.
vil_blocked_image_resource_sptr vil_new_blocked_image_facade (const vil_image_resource_sptr &src, const unsigned size_block_i=0, const unsigned size_block_j=0)
 create a blocked interface around any image resource.
vil_blocked_image_resource_sptr vil_new_cached_image_resource (const vil_blocked_image_resource_sptr &bir, const unsigned cache_size=100)
 Make a new cached resource.
vil_pyramid_image_resource_sptr vil_new_pyramid_image_resource (char const *file_or_directory, char const *file_format)
 Make a new pyramid image resource for writing.
vil_pyramid_image_resource_sptr vil_new_pyramid_image_from_base (char const *filename, vil_image_resource_sptr const &base_image, unsigned nlevels, char const *file_format, char const *temp_dir)
 Construct a pyramid image resource from a base image.
vil_pyramid_image_resource_sptr vil_new_pyramid_image_list_from_base (char const *directory, vil_image_resource_sptr const &base_image, unsigned nlevels, bool copy_base, char const *level_file_format, char const *filename)
 Construct a new pyramid image resource from a base image.
template<class T>
vil_image_view< T > vil_new_image_view_plane_i_j (unsigned ni, unsigned nj, unsigned nplanes, T)
 Create a new image view whose j_step is 1.
template<class T>
vil_image_view< T > vil_new_image_view_i_j_plane (unsigned ni, unsigned nj, unsigned nplanes, T)
 Create a new image view whose plane step is 1 and whose j_step is nplanes.
vil_image_view_base_sptr vil_new_image_view_base_sptr (const vil_image_view_base &)
 Create a shallow copy of an image and wrap it in a vil_image_view_base_sptr.

Function Documentation

vil_blocked_image_resource_sptr vil_new_blocked_image_facade ( const vil_image_resource_sptr src,
const unsigned  size_block_i = 0,
const unsigned  size_block_j = 0 
)

create a blocked interface around any image resource.

For zero size blocks, appropriate default blocking is created

Definition at line 198 of file vil_new.cxx.

vil_blocked_image_resource_sptr vil_new_blocked_image_resource ( char const *  filename,
unsigned  ni,
unsigned  nj,
unsigned  nplanes,
vil_pixel_format  format,
unsigned  size_block_i,
unsigned  size_block_j,
char const *  file_format = 0 
)

Make a new blocked resource file.

Definition at line 182 of file vil_new.cxx.

vil_blocked_image_resource_sptr vil_new_blocked_image_resource ( vil_stream os,
unsigned  ni,
unsigned  nj,
unsigned  nplanes,
vil_pixel_format  format,
unsigned  size_block_i,
unsigned  size_block_j,
char const *  file_format = 0 
)

Make a new blocked resource file.

Definition at line 156 of file vil_new.cxx.

vil_blocked_image_resource_sptr vil_new_cached_image_resource ( const vil_blocked_image_resource_sptr bir,
const unsigned  cache_size = 100 
)

Make a new cached resource.

Definition at line 206 of file vil_new.cxx.

vil_image_view_base_sptr vil_new_image_view_base_sptr ( const vil_image_view_base src  ) 

Create a shallow copy of an image and wrap it in a vil_image_view_base_sptr.

Note:
vil_image_view_base_sptr almost certainly doesn't behave as you would expect, and this function should really only be used by experts.

Definition at line 278 of file vil_new.cxx.

template<class T>
vil_image_view<T> vil_new_image_view_i_j_plane ( unsigned  ni,
unsigned  nj,
unsigned  nplanes,
 
)

Create a new image view whose plane step is 1 and whose j_step is nplanes.

Pixel data type is the type of the last (dummy) argument. i_step will be nplanes x nj.

Definition at line 191 of file vil_new.h.

template<class T>
vil_image_view<T> vil_new_image_view_plane_i_j ( unsigned  ni,
unsigned  nj,
unsigned  nplanes,
 
)

Create a new image view whose j_step is 1.

Pixel data type is the type of the last (dummy) argument. i_step will be nj, planestep will be ni x nj.

Definition at line 179 of file vil_new.h.

vil_pyramid_image_resource_sptr vil_new_pyramid_image_from_base ( char const *  filename,
vil_image_resource_sptr const &  base_image,
unsigned  nlevels,
char const *  file_format,
char const *  temp_dir 
)

Construct a pyramid image resource from a base image.

All levels are stored in the same resource file. Each level has the same scale ratio (0.5) to the preceeding level. Level 0 is the original base image. The resource is returned open for reading. The temporary directory is for storing intermediate image resources during the construction of the pyramid. Files are be removed from the directory after completion. If temp_dir is 0 then the intermediate resources are created in memory.

Definition at line 234 of file vil_new.cxx.

vil_pyramid_image_resource_sptr vil_new_pyramid_image_list_from_base ( char const *  directory,
vil_image_resource_sptr const &  base_image,
unsigned  nlevels,
bool  copy_base,
char const *  level_file_format,
char const *  filename 
)

Construct a new pyramid image resource from a base image.

The result is a directory containing separate images for each pyramid level. Each level has the same scale ratio (0.5) to the preceeding level and is created using level_file_format. Level 0 is the original base image. If copy_base is false, then Level 0 is already present in the directory and is used without modification. Each pyramid file in the directory is named filename + "level_index", e.g. R0, R1, ... Rn.

Definition at line 262 of file vil_new.cxx.

vil_pyramid_image_resource_sptr vil_new_pyramid_image_resource ( char const *  file_or_directory,
char const *  file_format 
)

Make a new pyramid image resource for writing.

Any number of pyramid layers can be inserted and with any scale. Image resources that duplicate existing scales are not inserted.

Definition at line 213 of file vil_new.cxx.


Generated on Sat Nov 22 05:07:56 2008 for core/vil by  doxygen 1.5.1