creaImageIO_lib
|
Generic image reader which uses all the specific concrete image reader of the lib (tif, jpg, dicom, ...) More...
#include <creaImageIOImageReader.h>
Public Member Functions | |
ImageReader () | |
~ImageReader () | |
void | PushBackExtensions (std::vector< std::string > &) |
Pushes back all kwown extensions (without dot) in the vector given. More... | |
bool | CanRead (const std::string &filename) |
Returns true iff the file is readable. More... | |
vtkImageData * | ReadImage (const std::string &filename) |
void | ReadAttributes (const std::string &filename, tree::AttributeMapType &attr) |
void | getAttributes (const std::string filename, std::map< std::string, std::string > &infos, std::vector< std::string > i_attr) |
Another function to read attributes for a file. More... | |
const std::string & | GetName () const |
Get the reader's name. More... | |
Protected Member Functions | |
void | Register (boost::shared_ptr< AbstractImageReader >) |
Register a reader. More... | |
bool | ShallNotRead (const std::string &filename) |
void | UnRegister (const std::string i_val) |
void | SetName (const std::string &s) |
Set the reader's name. More... | |
Protected Attributes | |
std::vector< boost::shared_ptr < AbstractImageReader > > | mReader |
vtkImageData * | mUnreadableImage |
std::string | mLastFilename |
boost::shared_ptr < AbstractImageReader > | mLastReader |
std::vector< std::string > | mUnReader |
Generic image reader which uses all the specific concrete image reader of the lib (tif, jpg, dicom, ...)
Definition at line 43 of file creaImageIOImageReader.h.
creaImageIO::ImageReader::ImageReader | ( | ) |
Definition at line 55 of file creaImageIOImageReader.cpp.
References mUnreadableImage, Register(), and UnRegister().
creaImageIO::ImageReader::~ImageReader | ( | ) |
|
virtual |
Returns true iff the file is readable.
Reimplemented from creaImageIO::AbstractImageReader.
Definition at line 148 of file creaImageIOImageReader.cpp.
References mLastFilename, mLastReader, mReader, and ShallNotRead().
Referenced by getAttributes(), creaImageIO::TreeHandlerImageAdder::IsHandledFile(), ReadAttributes(), creaImageIO::SimpleView::readDirectory(), creaImageIO::SimpleView::readFile(), and ReadImage().
|
virtual |
Another function to read attributes for a file.
Exclude specific readers TO DO...
Reimplemented from creaImageIO::AbstractImageReader.
Definition at line 197 of file creaImageIOImageReader.cpp.
References CanRead(), mLastFilename, and mLastReader.
Referenced by creaImageIO::MultiThreadImageReader::getAttributes().
|
inlineinherited |
Get the reader's name.
Definition at line 56 of file creaImageIOAbstractImageReader.h.
References creaImageIO::AbstractImageReader::mName.
Referenced by creaImageIO::VtkImageReader::ReadImage().
|
virtual |
Pushes back all kwown extensions (without dot) in the vector given.
Reimplemented from creaImageIO::AbstractImageReader.
Definition at line 227 of file creaImageIOImageReader.cpp.
References mReader.
|
virtual |
Reads the attributes of the image. Requested attributes names are provided as keys in a string to string map On return, the values of the map are the values of the attributes (empty string if not available).
Reimplemented from creaImageIO::AbstractImageReader.
Definition at line 210 of file creaImageIOImageReader.cpp.
References CanRead(), mLastFilename, and mLastReader.
Referenced by creaImageIO::TreeHandlerImageAdder::AddFile(), creaImageIO::Synchronizer::AttributesMatch(), and creaImageIO::TreeHandlerImageAdder::CheckAttributes().
|
virtual |
Reads and returns the image data. Returns an "Unreadable image" picture if fails
Reimplemented from creaImageIO::AbstractImageReader.
Definition at line 176 of file creaImageIOImageReader.cpp.
References CanRead(), mLastFilename, mLastReader, and mUnreadableImage.
Referenced by creaImageIO::MultiThreadImageReader::GetImage(), creaImageIO::ThreadedImageReader::Read(), creaImageIO::SimpleView::readDirectory(), creaImageIO::SimpleView::readFile(), and creaImageIO::MultiThreadImageReader::Request().
|
protected |
Register a reader.
Definition at line 112 of file creaImageIOImageReader.cpp.
References mReader.
Referenced by ImageReader().
|
inlineprotectedinherited |
Set the reader's name.
Definition at line 79 of file creaImageIOAbstractImageReader.h.
References creaImageIO::AbstractImageReader::mName.
Referenced by creaImageIO::DicomImageReader::DicomImageReader(), creaImageIO::UltrasonixImageReader::UltrasonixImageReader(), and creaImageIO::VtkImageReader::VtkImageReader().
|
protected |
Definition at line 127 of file creaImageIOImageReader.cpp.
References mUnReader.
Referenced by CanRead().
|
protected |
Definition at line 118 of file creaImageIOImageReader.cpp.
References mUnReader.
Referenced by ImageReader().
|
protected |
Definition at line 82 of file creaImageIOImageReader.h.
Referenced by CanRead(), getAttributes(), ReadAttributes(), and ReadImage().
|
protected |
Definition at line 83 of file creaImageIOImageReader.h.
Referenced by CanRead(), getAttributes(), ReadAttributes(), and ReadImage().
|
protected |
Definition at line 79 of file creaImageIOImageReader.h.
Referenced by CanRead(), PushBackExtensions(), and Register().
|
protected |
Definition at line 80 of file creaImageIOImageReader.h.
Referenced by ImageReader(), ReadImage(), and ~ImageReader().
|
protected |
Definition at line 89 of file creaImageIOImageReader.h.
Referenced by ShallNotRead(), and UnRegister().