casa
5.7.0-16
|
Implementation of RSFileReader for DS9 regions. More...
#include <DS9FileReader.h>
Public Member Functions | |
DS9FileReader () | |
Constructor. More... | |
~DS9FileReader () | |
Destructor. More... | |
bool | read (std::vector< RegionShape * > &shapes) |
RSFileReader methods //. More... | |
Public Member Functions inherited from casa::RSFileReader | |
RSFileReader () | |
Constructor. More... | |
virtual | ~RSFileReader () |
Destructor. More... | |
virtual bool | readFile (const casacore::String &file, std::vector< RegionShape * > &shapes) |
Calls setFile() then read(). More... | |
Public Member Functions inherited from casa::RSFileReaderWriter | |
RSFileReaderWriter () | |
Non-Static Members //. More... | |
virtual | ~RSFileReaderWriter () |
Destructor. More... | |
virtual void | setFile (const casacore::String &filename) |
Sets the file to be read/written to the given. More... | |
virtual const RFError & | lastError () const |
Returns the last error set during read/write. More... | |
Private Member Functions | |
bool | processLine (const QString &line, stringstream &invalid) |
Processes the given line and returns whether an error occurred or not. More... | |
bool | processRegion (QStringList &line, QString &comment, stringstream &invalid, bool include=true) |
Processes the given region and returns whether an error occurred or not. More... | |
bool | processCoordSys (QString &line, stringstream &invalid) |
Processes the given coordinate system and returns whether an error occurred or not. More... | |
bool | processGlobal (QString &line, stringstream &invalid) |
Processes the given global line and returns whether an error occurred or not. More... | |
bool | processComment (DS9Region ®ion, QString &comment, stringstream &invalid) |
Processes the given comment into properties for the given region, and returns whether an error occurred or not. More... | |
bool | readPointType (QString &comment, DS9::RegionType &type) |
For "point" regions. More... | |
bool | readProperties (casacore::Record &record, QString &line) |
Reads properties in the given line into the given record. More... | |
Private Attributes | |
pair< DS9::CoordinateSystem, bool > | m_nextSystem |
Whether a coordinate system has been set in the file, and what it is. More... | |
std::vector< DS9Region > | m_regions |
Read regions. More... | |
casacore::Record | m_globals |
Current read global properties. More... | |
Additional Inherited Members | |
Public Types inherited from casa::RSFileReaderWriter | |
enum | SupportedType { DS9, CASA_XML } |
Public Static Methods //. More... | |
Static Public Member Functions inherited from casa::RSFileReaderWriter | |
static SupportedType | supportedType (casacore::String type) |
Converts between enum and casacore::String for SupportedType. More... | |
static casacore::String | supportedType (SupportedType type) |
static casacore::String | extensionForType (SupportedType type) |
Returns the file extension for the given SupportedType. More... | |
static std::vector< SupportedType > | supportedTypes () |
Returns all known SupportedTypes. More... | |
static std::vector < casacore::String > | supportedTypesStrings () |
static RSFileReader * | readerForType (SupportedType type) |
Returns an appropriate child RegionFileReader class for the given SupportedType, or NULL for an error (shouldn't happen). More... | |
static RSFileWriter * | writerForType (SupportedType type) |
Returns an new appropriate child RegionFileWriter class for the given SupportedType, or NULL for an error (shouldn't happen). More... | |
static QWidget * | optionsWidgetForType (SupportedType type) |
Returns an new appropriate options widget for the given SupportedType, or NULL for an error (shouldn't happen). More... | |
Protected Member Functions inherited from casa::RSFileReaderWriter | |
virtual void | setError (const casacore::String &error, bool isFatal=false) const |
Convenience method for setting last error during read/write. More... | |
Protected Attributes inherited from casa::RSFileReaderWriter | |
casacore::String | m_filename |
Filename to be read/written. More... | |
RFError | m_lastError |
Last error seen during read/write. More... | |
Implementation of RSFileReader for DS9 regions.
Definition at line 649 of file DS9FileReader.h.
casa::DS9FileReader::DS9FileReader | ( | ) |
Constructor.
casa::DS9FileReader::~DS9FileReader | ( | ) |
Destructor.
|
private |
Processes the given comment into properties for the given region, and returns whether an error occurred or not.
If an error occurred, the details are appended to invalid.
|
private |
Processes the given coordinate system and returns whether an error occurred or not.
If an error occurred, the details are appended to invalid.
|
private |
Processes the given global line and returns whether an error occurred or not.
If an error occurred, the details are appended to invalid.
|
private |
Processes the given line and returns whether an error occurred or not.
If an error occurred, the details are appended to invalid.
|
private |
Processes the given region and returns whether an error occurred or not.
If an error occurred, the details are appended to invalid. line should contain the comma-, parentheses-, or whitespace-separated text before the comment symbol, while "comment" should contain all text after the comment symbol. The include flag is used to set the include property.
|
virtual |
|
private |
For "point" regions.
Parses the given comment for a point=type property and places the correct type into "type". Returns whether the operation succeeded or not.
|
private |
Reads properties in the given line into the given record.
|
private |
Current read global properties.
Definition at line 671 of file DS9FileReader.h.
|
private |
Whether a coordinate system has been set in the file, and what it is.
Definition at line 665 of file DS9FileReader.h.
|
private |
Read regions.
Definition at line 668 of file DS9FileReader.h.