#include <vil_tiff.h>
Inheritance diagram for vil_tiff_pyramid_resource:

If read is true then the resource is open for reading else it is open for writing
Definition at line 333 of file vil_tiff.h.
Public Member Functions | |
| vil_tiff_pyramid_resource (tif_smart_ptr const &t, bool read=true) | |
| virtual | ~vil_tiff_pyramid_resource () |
| virtual unsigned | nplanes () const |
| The number of planes (or components) of the image. | |
| virtual unsigned | ni () const |
| The number of pixels in each row. | |
| virtual unsigned | nj () const |
| The number of pixels in each column. | |
| virtual enum vil_pixel_format | pixel_format () const |
| Pixel Format. | |
| virtual char const * | file_format () const |
| Return a string describing the file format. | |
| virtual unsigned | nlevels () const |
| number of pyramid levels. | |
| virtual vil_image_view_base_sptr | get_copy_view (unsigned i0, unsigned n_i, unsigned j0, unsigned n_j, unsigned level) const |
| Get a partial view from the image from a specified pyramid level. | |
| virtual vil_image_view_base_sptr | get_copy_view (unsigned i0, unsigned n_i, unsigned j0, unsigned n_j, const float scale, float &actual_scale) const |
| Get a partial view from the image in the pyramid closest to scale. | |
| bool | put_resource (vil_image_resource_sptr const &resc) |
| Caution! The resource is assigned a header and the data is permanently written into the file. | |
| vil_image_resource_sptr | get_resource (const unsigned level) const |
| returns the image resource at the specified pyramid level. | |
| void | print (const unsigned level) |
| for debug purposes. | |
| virtual vil_image_view_base_sptr | get_copy_view (unsigned i0, unsigned n_i, unsigned j0, unsigned n_j) const |
| Create a read/write view of a copy of this data. | |
| virtual vil_image_view_base_sptr | get_copy_view (unsigned level) const |
| Get a complete view from a specified pyramid level. | |
| virtual vil_image_view_base_sptr | get_copy_view (const float scale, float &actual_scale) const |
| Get a complete view from the image in the pyramid closest to the specified scale. | |
| vil_image_view_base_sptr | get_copy_view () const |
| Create a read/write view of a copy of all the data. | |
| virtual bool | put_view (vil_image_view_base const &, unsigned, unsigned) |
| Put the data in this view back into the base image. | |
| bool | put_view (const vil_image_view_base &im) |
| Put the data in this view back into the image source at the origin. | |
| virtual bool | get_property (char const *tag, void *property_value=0) const |
| Extra property information. | |
| virtual vil_image_view_base_sptr | get_view (unsigned i0, unsigned n_i, unsigned j0, unsigned n_j) const |
| Create a read/write view of the data. | |
| vil_image_view_base_sptr | get_view () const |
| Create a read/write view of all the data. | |
| virtual bool | view_fits (const vil_image_view_base &im, unsigned i0, unsigned j0) |
| Check that a view will fit into the data at the given offset. | |
Static Public Member Functions | |
| static bool | blocked_decimate (vil_blocked_image_resource_sptr const &brsc, vil_blocked_image_resource_sptr &dec_resc) |
| A utility function to decimate a resource using blocks. | |
| static vil_image_resource_sptr | decimate (vil_image_resource_sptr const &resc, char const *filename, char const *format="tiff") |
| Utility for decimating a resource to create a new pyramid level. | |
Protected Member Functions | |
| vil_tiff_pyramid_resource () | |
| default constructor. | |
| void | normalize_scales () |
| normalize the scale factors so that the base image scale = 1.0. | |
| tiff_pyramid_level * | closest (const float scale) const |
| find the image resource with scale closest to specified scale. | |
| void | ref () |
| void | unref () |
Protected Attributes | |
| bool | read_ |
| If true resource is open for read, else open for write. | |
| tif_smart_ptr | t_ |
| the tiff handle. | |
| vcl_vector< tiff_pyramid_level * > | levels_ |
| vcl_atomic_count | reference_count_ |
Friends | |
| class | vil_smart_ptr< vil_pyramid_image_resource > |
| class | vil_smart_ptr< vil_image_resource > |
Related Functions | |
| (Note that these are not member functions.) | |
| vil_pyramid_image_resource_sptr | vil_load_pyramid_resource (char const *directory_or_file) |
| Load a pyramid image resource object from a file or directory. | |
| template<class destT, class kernelT, class accumT> | |
| vil_image_resource_sptr | vil_convolve_1d (const vil_image_resource_sptr &src_im, const destT, const kernelT *kernel, int k_lo, int k_hi, const accumT, vil_convolve_boundary_option start_option, vil_convolve_boundary_option end_option) |
| Create an image_resource object which convolve kernel[x] x in [k_lo,k_hi] with srcT. | |
| template<class destT, class kernelT, class accumT> | |
| vil_image_resource_sptr | vil_correlate_1d (const vil_image_resource_sptr &src_im, const destT, const kernelT *kernel, vcl_ptrdiff_t k_lo, vcl_ptrdiff_t k_hi, const accumT, vil_convolve_boundary_option start_option, vil_convolve_boundary_option end_option) |
| Create an image_resource object which correlate kernel[x] x in [k_lo,k_hi] with srcT. | |
| bool | vil_copy_deep (const vil_image_resource_sptr &src, vil_image_resource_sptr &dest) |
| Copy src to dest. | |
| vil_image_resource_sptr | vil_crop (const vil_image_resource_sptr &src, unsigned i0, unsigned n_i, unsigned j0, unsigned n_j) |
| Crop to a region of src. | |
| vil_image_resource_sptr | vil_decimate (const vil_image_resource_sptr &src, unsigned i_factor, unsigned j_factor=0) |
| decimate to a region of src. | |
| vil_image_resource_sptr | vil_load_image_resource (char const *filename) |
| Load an image resource object from a file. | |
| vil_image_resource_sptr | vil_new_image_resource (unsigned ni, unsigned nj, vil_image_resource_sptr const &prototype) |
| Make a new image, similar format to the prototype. | |
| vil_image_resource_sptr | vil_new_image_resource (vil_stream *os, unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format, char const *file_format) |
| Make a new image. | |
| vil_image_resource_sptr | vil_new_image_resource (char const *filename, unsigned ni, unsigned nj, vil_image_resource_sptr const &prototype, char const *file_format) |
| Make a new vil_image_resource, writing to file "filename", size ni x nj, copying pixel format etc from "prototype". | |
| vil_image_resource_sptr | vil_new_image_resource (char const *filename, unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format, char const *file_format) |
| Make a new image. | |
| vil_image_resource_sptr | vil_new_image_resource (vil_stream *os, unsigned ni, unsigned nj, vil_image_resource_sptr const &prototype, char const *file_format) |
| Make a new vil_image_resource, writing to stream "os", size ni x nj, copying pixel format etc from "prototype". | |
| vil_image_resource_sptr | vil_new_image_resource (char const *filename, unsigned ni, unsigned nj, unsigned nplanes, vil_image_resource_sptr const &prototype, char const *format=0) |
| Make a new vil_image_resource, writing to file "filename", size ni x nj, copying pixel format etc from "prototype". | |
| vil_image_resource_sptr | vil_new_image_resource (vil_stream *os, unsigned ni, unsigned nj, unsigned nplanes, vil_image_resource_sptr const &prototype, char const *file_format=0) |
| Make a new vil_image_resource, writing to stream "os", size ni x nj, copying pixel format etc from "prototype". | |
| bool | vil_save_image_resource (const vil_image_resource_sptr &ir, char const *filename, char const *file_format) |
| Send vil_image_resource to disk. | |
| bool | vil_save_image_resource (const vil_image_resource_sptr &ir, char const *filename) |
| Save vil_image_resource to file, deducing format from filename. | |
| vil_tiff_pyramid_resource::vil_tiff_pyramid_resource | ( | tif_smart_ptr const & | t, | |
| bool | read = true | |||
| ) |
Definition at line 1172 of file vil_tiff.cxx.
| vil_tiff_pyramid_resource::~vil_tiff_pyramid_resource | ( | ) | [virtual] |
Definition at line 1212 of file vil_tiff.cxx.
| vil_tiff_pyramid_resource::vil_tiff_pyramid_resource | ( | ) | [protected] |
| virtual unsigned vil_tiff_pyramid_resource::nplanes | ( | ) | const [inline, virtual] |
The number of planes (or components) of the image.
This method refers to the base (max resolution) image Dimensions: Planes x ni x nj. This concept is treated as a synonym to components.
Implements vil_pyramid_image_resource.
Definition at line 344 of file vil_tiff.h.
| virtual unsigned vil_tiff_pyramid_resource::ni | ( | ) | const [inline, virtual] |
The number of pixels in each row.
Dimensions: Planes x ni x nj.
Implements vil_pyramid_image_resource.
Definition at line 349 of file vil_tiff.h.
| virtual unsigned vil_tiff_pyramid_resource::nj | ( | ) | const [inline, virtual] |
The number of pixels in each column.
Dimensions: Planes x ni x nj.
Implements vil_pyramid_image_resource.
Definition at line 354 of file vil_tiff.h.
| virtual enum vil_pixel_format vil_tiff_pyramid_resource::pixel_format | ( | ) | const [inline, virtual] |
| virtual char const* vil_tiff_pyramid_resource::file_format | ( | ) | const [inline, virtual] |
Return a string describing the file format.
Only file images have a format, others return 0
Implements vil_pyramid_image_resource.
Definition at line 363 of file vil_tiff.h.
| virtual unsigned vil_tiff_pyramid_resource::nlevels | ( | ) | const [inline, virtual] |
number of pyramid levels.
Implements vil_pyramid_image_resource.
Definition at line 368 of file vil_tiff.h.
| vil_image_view_base_sptr vil_tiff_pyramid_resource::get_copy_view | ( | unsigned | i0, | |
| unsigned | n_i, | |||
| unsigned | j0, | |||
| unsigned | n_j, | |||
| unsigned | level | |||
| ) | const [virtual] |
Get a partial view from the image from a specified pyramid level.
Implements vil_pyramid_image_resource.
Definition at line 1220 of file vil_tiff.cxx.
| vil_image_view_base_sptr vil_tiff_pyramid_resource::get_copy_view | ( | unsigned | i0, | |
| unsigned | n_i, | |||
| unsigned | j0, | |||
| unsigned | n_j, | |||
| const float | scale, | |||
| float & | actual_scale | |||
| ) | const [virtual] |
Get a partial view from the image in the pyramid closest to scale.
The origin and size parameters are in the coordinate system of the base image. The scale factor is with respect to the base image (base scale = 1.0).
Implements vil_pyramid_image_resource.
Definition at line 1250 of file vil_tiff.cxx.
| bool vil_tiff_pyramid_resource::put_resource | ( | vil_image_resource_sptr const & | resc | ) | [virtual] |
Caution! The resource is assigned a header and the data is permanently written into the file.
Be sure you want to commit to the file.
Implements vil_pyramid_image_resource.
Definition at line 1265 of file vil_tiff.cxx.
| vil_image_resource_sptr vil_tiff_pyramid_resource::get_resource | ( | const unsigned | level | ) | const [virtual] |
returns the image resource at the specified pyramid level.
Implements vil_pyramid_image_resource.
Definition at line 1295 of file vil_tiff.cxx.
| void vil_tiff_pyramid_resource::print | ( | const unsigned | level | ) | [inline, virtual] |
for debug purposes.
Implements vil_pyramid_image_resource.
Definition at line 392 of file vil_tiff.h.
| void vil_tiff_pyramid_resource::normalize_scales | ( | ) | [protected] |
normalize the scale factors so that the base image scale = 1.0.
Definition at line 1128 of file vil_tiff.cxx.
| tiff_pyramid_level * vil_tiff_pyramid_resource::closest | ( | const float | scale | ) | const [protected] |
find the image resource with scale closest to specified scale.
Definition at line 1142 of file vil_tiff.cxx.
| virtual vil_image_view_base_sptr vil_pyramid_image_resource::get_copy_view | ( | unsigned | i0, | |
| unsigned | n_i, | |||
| unsigned | j0, | |||
| unsigned | n_j | |||
| ) | const [inline, virtual, inherited] |
Create a read/write view of a copy of this data.
Applies only to the base image
Implements vil_image_resource.
Reimplemented in vil_pyramid_image_list.
Definition at line 61 of file vil_pyramid_image_resource.h.
| virtual vil_image_view_base_sptr vil_pyramid_image_resource::get_copy_view | ( | unsigned | level | ) | const [inline, virtual, inherited] |
Get a complete view from a specified pyramid level.
This method needs no specialisation.
Definition at line 92 of file vil_pyramid_image_resource.h.
| virtual vil_image_view_base_sptr vil_pyramid_image_resource::get_copy_view | ( | const float | scale, | |
| float & | actual_scale | |||
| ) | const [inline, virtual, inherited] |
Get a complete view from the image in the pyramid closest to the specified scale.
The scale factor is with respect to the base image (base scale = 1.0). This method needs no specialisation.
Reimplemented in vil_pyramid_image_list.
Definition at line 106 of file vil_pyramid_image_resource.h.
| vil_image_view_base_sptr vil_image_resource::get_copy_view | ( | ) | const [inline, inherited] |
Create a read/write view of a copy of all the data.
Reimplemented in vil_j2k_image, and vil_nitf2_image.
Definition at line 80 of file vil_image_resource.h.
| virtual bool vil_pyramid_image_resource::put_view | ( | vil_image_view_base const & | , | |
| unsigned | , | |||
| unsigned | ||||
| ) | [inline, virtual, inherited] |
Put the data in this view back into the base image.
Pyramid is readonly. This is essentially (although not formally) a pure virtual function.
Implements vil_image_resource.
Definition at line 70 of file vil_pyramid_image_resource.h.
| bool vil_image_resource::put_view | ( | const vil_image_view_base & | im | ) | [inline, inherited] |
Put the data in this view back into the image source at the origin.
Definition at line 92 of file vil_image_resource.h.
| bool vil_pyramid_image_resource::get_property | ( | char const * | tag, | |
| void * | property_value = 0 | |||
| ) | const [virtual, inherited] |
Extra property information.
Implements vil_image_resource.
Definition at line 26 of file vil_pyramid_image_resource.cxx.
| bool vil_pyramid_image_resource::blocked_decimate | ( | vil_blocked_image_resource_sptr const & | brsc, | |
| vil_blocked_image_resource_sptr & | dec_resc | |||
| ) | [static, inherited] |
A utility function to decimate a resource using blocks.
The new scale is one half the input resource scale
Definition at line 127 of file vil_pyramid_image_resource.cxx.
| vil_image_resource_sptr vil_pyramid_image_resource::decimate | ( | vil_image_resource_sptr const & | resc, | |
| char const * | filename, | |||
| char const * | format = "tiff" | |||
| ) | [static, inherited] |
Utility for decimating a resource to create a new pyramid level.
The new scale is one half the input resource scale. Creates a new resource from filename according to file format
Definition at line 300 of file vil_pyramid_image_resource.cxx.
| virtual vil_image_view_base_sptr vil_image_resource::get_view | ( | unsigned | i0, | |
| unsigned | n_i, | |||
| unsigned | j0, | |||
| unsigned | n_j | |||
| ) | const [inline, virtual, inherited] |
Create a read/write view of the data.
Modifying this view might modify the actual data. If you want to modify this data in place, call put_view after you done, and it should work efficiently. This function will always return a multi-plane scalar-pixel view of the data.
vil_reformat(data->get_view(..), window);
Reimplemented in vil_dicom_image, vil_clamp_image_resource, vil_crop_image_resource, vil_decimate_image_resource, vil_flip_lr_image_resource, vil_flip_ud_image_resource, vil_memory_image, vil_plane_image_resource, and vil_transpose_image_resource.
Definition at line 64 of file vil_image_resource.h.
| vil_image_view_base_sptr vil_image_resource::get_view | ( | ) | const [inline, inherited] |
| bool vil_image_resource::view_fits | ( | const vil_image_view_base & | im, | |
| unsigned | i0, | |||
| unsigned | j0 | |||
| ) | [virtual, inherited] |
Check that a view will fit into the data at the given offset.
This includes checking that the pixel type is scalar.
Definition at line 30 of file vil_image_resource.cxx.
| void vil_image_resource::ref | ( | ) | [inline, protected, inherited] |
Definition at line 110 of file vil_image_resource.h.
| void vil_image_resource::unref | ( | ) | [inline, protected, inherited] |
Definition at line 111 of file vil_image_resource.h.
friend class vil_smart_ptr< vil_pyramid_image_resource > [friend, inherited] |
Definition at line 133 of file vil_pyramid_image_resource.h.
| vil_pyramid_image_resource_sptr vil_load_pyramid_resource | ( | char const * | directory_or_file | ) | [related, inherited] |
Load a pyramid image resource object from a file or directory.
Definition at line 81 of file vil_load.cxx.
friend class vil_smart_ptr< vil_image_resource > [friend, inherited] |
Definition at line 109 of file vil_image_resource.h.
| vil_image_resource_sptr vil_convolve_1d | ( | const vil_image_resource_sptr & | src_im, | |
| const | destT, | |||
| const kernelT * | kernel, | |||
| int | k_lo, | |||
| int | k_hi, | |||
| const | accumT, | |||
| vil_convolve_boundary_option | start_option, | |||
| vil_convolve_boundary_option | end_option | |||
| ) | [related, inherited] |
Create an image_resource object which convolve kernel[x] x in [k_lo,k_hi] with srcT.
| kernel | should point to tap 0. |
Definition at line 403 of file vil_convolve_1d.h.
| vil_image_resource_sptr vil_correlate_1d | ( | const vil_image_resource_sptr & | src_im, | |
| const | destT, | |||
| const kernelT * | kernel, | |||
| vcl_ptrdiff_t | k_lo, | |||
| vcl_ptrdiff_t | k_hi, | |||
| const | accumT, | |||
| vil_convolve_boundary_option | start_option, | |||
| vil_convolve_boundary_option | end_option | |||
| ) | [related, inherited] |
Create an image_resource object which correlate kernel[x] x in [k_lo,k_hi] with srcT.
| kernel | should point to tap 0. |
Definition at line 214 of file vil_correlate_1d.h.
| bool vil_copy_deep | ( | const vil_image_resource_sptr & | src, | |
| vil_image_resource_sptr & | dest | |||
| ) | [related, inherited] |
Copy src to dest.
This is useful if you want to copy on image into a window on another image. src and dest must have identical sizes, and pixel-types. Returns false if the copy failed. O(size).
Definition at line 44 of file vil_copy.cxx.
| vil_image_resource_sptr vil_crop | ( | const vil_image_resource_sptr & | src, | |
| unsigned | i0, | |||
| unsigned | n_i, | |||
| unsigned | j0, | |||
| unsigned | n_j | |||
| ) | [related, inherited] |
| vil_image_resource_sptr vil_decimate | ( | const vil_image_resource_sptr & | src, | |
| unsigned | i_factor, | |||
| unsigned | j_factor = 0 | |||
| ) | [related, inherited] |
decimate to a region of src.
| vil_image_resource_sptr vil_load_image_resource | ( | char const * | filename | ) | [related, inherited] |
| vil_image_resource_sptr vil_new_image_resource | ( | unsigned | ni, | |
| unsigned | nj, | |||
| vil_image_resource_sptr const & | prototype | |||
| ) | [related, inherited] |
| vil_image_resource_sptr vil_new_image_resource | ( | vil_stream * | os, | |
| unsigned | ni, | |||
| unsigned | nj, | |||
| unsigned | nplanes, | |||
| vil_pixel_format | format, | |||
| char const * | file_format = 0 | |||
| ) | [related, inherited] |
| vil_image_resource_sptr vil_new_image_resource | ( | char const * | filename, | |
| unsigned | ni, | |||
| unsigned | nj, | |||
| vil_image_resource_sptr const & | prototype, | |||
| char const * | file_format | |||
| ) | [related, inherited] |
Make a new vil_image_resource, writing to file "filename", size ni x nj, copying pixel format etc from "prototype".
Definition at line 104 of file vil_new.cxx.
| vil_image_resource_sptr vil_new_image_resource | ( | char const * | filename, | |
| unsigned | ni, | |||
| unsigned | nj, | |||
| unsigned | nplanes, | |||
| vil_pixel_format | format, | |||
| char const * | file_format = 0 | |||
| ) | [related, inherited] |
| vil_image_resource_sptr vil_new_image_resource | ( | vil_stream * | os, | |
| unsigned | ni, | |||
| unsigned | nj, | |||
| vil_image_resource_sptr const & | prototype, | |||
| char const * | file_format | |||
| ) | [related, inherited] |
Make a new vil_image_resource, writing to stream "os", size ni x nj, copying pixel format etc from "prototype".
Definition at line 143 of file vil_new.cxx.
| vil_image_resource_sptr vil_new_image_resource | ( | char const * | filename, | |
| unsigned | ni, | |||
| unsigned | nj, | |||
| unsigned | nplanes, | |||
| vil_image_resource_sptr const & | prototype, | |||
| char const * | format = 0 | |||
| ) | [related, inherited] |
Make a new vil_image_resource, writing to file "filename", size ni x nj, copying pixel format etc from "prototype".
| vil_image_resource_sptr vil_new_image_resource | ( | vil_stream * | os, | |
| unsigned | ni, | |||
| unsigned | nj, | |||
| unsigned | nplanes, | |||
| vil_image_resource_sptr const & | prototype, | |||
| char const * | file_format = 0 | |||
| ) | [related, inherited] |
Make a new vil_image_resource, writing to stream "os", size ni x nj, copying pixel format etc from "prototype".
| bool vil_save_image_resource | ( | const vil_image_resource_sptr & | ir, | |
| char const * | filename, | |||
| char const * | file_format | |||
| ) | [related, inherited] |
Send vil_image_resource to disk.
| bool vil_save_image_resource | ( | const vil_image_resource_sptr & | ir, | |
| char const * | filename | |||
| ) | [related, inherited] |
Save vil_image_resource to file, deducing format from filename.
bool vil_tiff_pyramid_resource::read_ [protected] |
tif_smart_ptr vil_tiff_pyramid_resource::t_ [protected] |
vcl_vector<tiff_pyramid_level*> vil_tiff_pyramid_resource::levels_ [protected] |
Definition at line 411 of file vil_tiff.h.
vcl_atomic_count vil_image_resource::reference_count_ [protected, inherited] |
Definition at line 114 of file vil_image_resource.h.
1.5.1