8 # include <vcl_msvc_warnings.h> 25 std::cerr << __FILE__
" : trying \'" << (*p)->tag() <<
"\'\n";
35 std::cerr << __FILE__
": Unable to load image;\ntried";
39 std::cerr <<
" \'" << p->tag() <<
"\'" << std::flush;
40 std::cerr << std::endl;
64 std::cerr << __FILE__
": Failed to load [" << filename <<
"]\n";
75 std::cerr << __FILE__
": Failed to load [" << filename <<
"]\n";
91 im_view->nplanes(),im_view->pixel_format());
105 std::cerr << __FILE__
" : trying \'" << (*p)->tag() <<
"\'\n";
108 std::cerr <<
"make_input_pyramid_image(" << directory_or_file <<
")\n";
111 p->make_input_pyramid_image(directory_or_file);
117 std::cerr << __FILE__
": Unable to load pyramid image;\ntried";
121 std::cerr <<
" \'" << p->tag() <<
"\'" << std::flush;
122 std::cerr << std::endl;
131 if (!data)
return nullptr;
132 return data -> get_view();
136 #if defined(_WIN32) && VXL_USE_WIN_WCHAR_T 148 std::wcerr << __FILE__ << L
": Failed to load [" << filename << L
"]\n";
167 return data -> get_view();
170 #endif //defined(_WIN32) && VXL_USE_WIN_WCHAR_T Stream interface for VIL image loaders.
An abstract base class of smart pointers to actual image data in memory.
vil_image_resource_sptr vil_load_image_resource_raw(vil_stream *, bool verbose=true)
Load from a stream.
Concrete view of image data of type T held in memory.
vil_image_resource_sptr vil_new_image_resource(unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format)
Make a new image of given format.
vil_image_resource_sptr vil_load_image_resource_plugin(char const *)
Load from a filename with a plugin.
virtual void seek(vil_streampos position)=0
Goto file pointer.
vil_smart_ptr< vil_image_resource > vil_image_resource_sptr
Exceptions thrown by vil, and a mechanism for turning them off.
Interface for loading new image formats.
virtual bool can_be_loaded(const std::string &filename)
Check whether a filename is a potential candidate for loading and if it is available.
read an image from a file
Stream interface for VIL image loaders.
Indicates unexpected problems image file's data.
virtual bool load_the_image(vil_image_view_base_sptr &image, const std::string &path)
Attempt to load image from named file.
std::string function_name
A base class reference-counting view of some image data.
make a vil_stream from a filename, an URL, etc.
T * as_pointer() const
These methods all return the raw/dumb pointer.
vil_image_resource_sptr vil_load_image_resource(char const *filename, bool verbose=true)
Load an image resource object from a file.
Representation of a generic image source or destination.
vil_stream * vil_open(char const *what, char const *how="r")
make a vil_stream from a filename, an URL, etc.
A base class for a plugin for vil images loading.
vil_image_view_base_sptr vil_load(const char *, bool verbose=true)
Convenience function for loading an image into an image view.
vil_pyramid_image_resource_sptr vil_load_pyramid_resource(char const *directory_or_file, bool verbose=true)
Load a pyramid image resource object from a file or directory.