Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends
vimt_vil_v2i_image Class Reference

#include <vimt_vil_v2i.h>

Inheritance diagram for vimt_vil_v2i_image:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~vimt_vil_v2i_image ()
virtual unsigned nplanes () const
 Dimensions: nplanes x ni x nj.
virtual unsigned ni () const
 Dimensions: nplanes x ni x nj.
virtual unsigned nj () const
 Dimensions: nplanes x ni x nj.
virtual enum vil_pixel_format pixel_format () const
 Pixel Format.
void set_pixel_size (float i, float j)
 Set the size of the each pixel in the i,j directions.
const vimt_transform_2dworld2im () const
 Get full world to image transform.
void set_world2im (const vimt_transform_2d &tr)
 Set full world to image transform.
virtual vil_image_view_base_sptr get_copy_view (unsigned i0, unsigned ni, unsigned j0, unsigned nj) const
 Create a read/write view of a copy of this data.
virtual vil_image_view_base_sptr get_view (unsigned i0, unsigned ni, unsigned j0, unsigned nj) const
 Create a read/write view of a copy of this data.
virtual bool put_view (const vil_image_view_base &im, unsigned i0, unsigned j0)
 Put the data in this view back into the image source.
virtual char const * file_format () const
 Return a string describing the file format.
virtual bool get_property (char const *label, void *property_value=0) const
 Extra property information.
vil_image_view_base_sptr get_view () const
vil_image_view_base_sptr get_copy_view () const
virtual bool put_view (const vil_image_view_base &im)
virtual bool view_fits (const vil_image_view_base &im, unsigned i0, unsigned j0)
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)
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)
vil_image_resource_sptr vil_clamp (const vil_image_resource_sptr &src, double low, double hi)
bool vil_copy_deep (const vil_image_resource_sptr &src, vil_image_resource_sptr &dest)
vil_image_resource_sptr vil_crop (const vil_image_resource_sptr &src, unsigned i0, unsigned n_i, unsigned j0, unsigned n_j)
vil_image_resource_sptr vil_decimate (const vil_image_resource_sptr &src, unsigned i_factor, unsigned j_factor=0)
vil_image_resource_sptr vil_flip_lr (const vil_image_resource_sptr &src)
vil_image_resource_sptr vil_flip_ud (const vil_image_resource_sptr &src)
vil_image_resource_sptr vil_load_image_resource (char const *filename, bool verbose=true)
vil_image_resource_sptr vil_load_image_resource_raw (vil_stream *, bool verbose=true)
vil_image_resource_sptr vil_load_image_resource_raw (char const *, bool verbose=true)
vil_image_resource_sptr vil_load_image_resource_plugin (char const *)
vil_image_resource_sptr vil_new_image_resource (unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format)
vil_image_resource_sptr vil_new_image_resource (unsigned ni, unsigned nj, vil_image_resource_sptr const &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)
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)
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)
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)
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)
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)
vil_image_resource_sptr vil_new_image_resource_interleaved (unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format)
vil_image_resource_sptr vil_new_image_resource_of_view (vil_image_view_base const &view)
vil_image_resource_sptr vil_plane (const vil_image_resource_sptr &src, unsigned p)
bool vil_save_image_resource (const vil_image_resource_sptr &ir, char const *filename, char const *file_format)
bool vil_save_image_resource (const vil_image_resource_sptr &ir, char const *filename)
vil_image_resource_sptr vil_transpose (const vil_image_resource_sptr &src)

Protected Member Functions

void ref ()
void unref ()

Protected Attributes

vcl_atomic_count reference_count_

Private Member Functions

 vimt_vil_v2i_image (vil_stream *vs)
 Private constructor, use vil_load instead.
 vimt_vil_v2i_image (vil_stream *vs, vil_pixel_format f)
 Private constructor, use vil_load instead.
 vimt_vil_v2i_image (vil_stream *vs, unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format)
 Private constructor, use vil_save instead.

Private Attributes

vil_streamvs_
 Pointer to open image file.
vimt_image_2dim_
 Image cache.
bool dirty_
 If true, write image file on exit.
enum vil_pixel_format pixel_format_
 Expected pixel type.

Friends

class vimt_vil_v2i_format
friend class vil_smart_ptr

Detailed Description

Definition at line 56 of file vimt_vil_v2i.h.


Constructor & Destructor Documentation

vimt_vil_v2i_image::vimt_vil_v2i_image ( vil_stream vs) [private]

Private constructor, use vil_load instead.

This object takes ownership of the file.

Definition at line 145 of file vimt_vil_v2i.cxx.

vimt_vil_v2i_image::vimt_vil_v2i_image ( vil_stream vs,
vil_pixel_format  f 
) [private]

Private constructor, use vil_load instead.

Constructor to deal with directly created v2i files.

This object takes ownership of the file.

Definition at line 184 of file vimt_vil_v2i.cxx.

vimt_vil_v2i_image::vimt_vil_v2i_image ( vil_stream vs,
unsigned  ni,
unsigned  nj,
unsigned  nplanes,
vil_pixel_format  format 
) [private]

Private constructor, use vil_save instead.

This object takes ownership of the file, for writing.

Definition at line 248 of file vimt_vil_v2i.cxx.

vimt_vil_v2i_image::~vimt_vil_v2i_image ( ) [virtual]

Definition at line 278 of file vimt_vil_v2i.cxx.


Member Function Documentation

virtual char const* vimt_vil_v2i_image::file_format ( ) const [inline, virtual]

Return a string describing the file format.

Only file images have a format, others return 0

Reimplemented from vil_image_resource.

Definition at line 131 of file vimt_vil_v2i.h.

vil_image_view_base_sptr vimt_vil_v2i_image::get_copy_view ( unsigned  i0,
unsigned  ni,
unsigned  j0,
unsigned  nj 
) const [virtual]

Create a read/write view of a copy of this data.

This function will always return a multi-plane scalar-pixel view of the data.

Returns:
0 if unable to get view of correct size, or if resource is write-only.

Currently not yet implemented.

Returns:
0 if unable to get view of correct size.

Implements vil_image_resource.

Definition at line 356 of file vimt_vil_v2i.cxx.

bool vimt_vil_v2i_image::get_property ( char const *  label,
void *  property_value = 0 
) const [virtual]

Extra property information.

This will just return the property of the first slice in the list.

Implements vil_image_resource.

Definition at line 221 of file vimt_vil_v2i.cxx.

vil_image_view_base_sptr vimt_vil_v2i_image::get_view ( unsigned  i0,
unsigned  ni,
unsigned  j0,
unsigned  nj 
) const [virtual]

Create a read/write view of a copy of this data.

This function will always return a multi-plane scalar-pixel view of the data.

Returns:
0 if unable to get view of correct size, or if resource is write-only.
0 if unable to get view of correct size.

Reimplemented from vil_image_resource.

Definition at line 391 of file vimt_vil_v2i.cxx.

unsigned vimt_vil_v2i_image::ni ( ) const [virtual]

Dimensions: nplanes x ni x nj.

The number of pixels in each row.

Implements vil_image_resource.

Definition at line 308 of file vimt_vil_v2i.cxx.

unsigned vimt_vil_v2i_image::nj ( ) const [virtual]

Dimensions: nplanes x ni x nj.

The number of pixels in each column.

Implements vil_image_resource.

Definition at line 315 of file vimt_vil_v2i.cxx.

unsigned vimt_vil_v2i_image::nplanes ( ) const [virtual]

Dimensions: nplanes x ni x nj.

This concept is treated as a synonym to components.

Implements vil_image_resource.

Definition at line 301 of file vimt_vil_v2i.cxx.

enum vil_pixel_format vimt_vil_v2i_image::pixel_format ( ) const [virtual]

Pixel Format.

Implements vil_image_resource.

Definition at line 321 of file vimt_vil_v2i.cxx.

bool vimt_vil_v2i_image::put_view ( const vil_image_view_base im,
unsigned  i0,
unsigned  j0 
) [virtual]

Put the data in this view back into the image source.

Set the contents of the volume.

The view must be of scalar components. Assign your view to a scalar-component view if this is not the case.

Returns:
false if failed, because e.g. resource is read-only, format of view is not correct (if it is a compound pixel type, try assigning it to a multi-plane scalar pixel view.)

Implements vil_image_resource.

Definition at line 426 of file vimt_vil_v2i.cxx.

void vimt_vil_v2i_image::set_pixel_size ( float  i,
float  j 
)

Set the size of the each pixel in the i,j directions.

Set the size of the each pixel in the i,j,k directions.

Definition at line 339 of file vimt_vil_v2i.cxx.

void vimt_vil_v2i_image::set_world2im ( const vimt_transform_2d tr)

Set full world to image transform.

Call this before using put_view();

Definition at line 332 of file vimt_vil_v2i.cxx.

const vimt_transform_2d & vimt_vil_v2i_image::world2im ( ) const

Get full world to image transform.

Definition at line 327 of file vimt_vil_v2i.cxx.


Friends And Related Function Documentation

friend class vimt_vil_v2i_format [friend]

Definition at line 58 of file vimt_vil_v2i.h.


Member Data Documentation

If true, write image file on exit.

Definition at line 65 of file vimt_vil_v2i.h.

Image cache.

Currently the whole image is cached im memory. This should be fixed.

Definition at line 63 of file vimt_vil_v2i.h.

Expected pixel type.

Definition at line 68 of file vimt_vil_v2i.h.

Pointer to open image file.

Definition at line 60 of file vimt_vil_v2i.h.


The documentation for this class was generated from the following files: