|
VR-Engage
2.2
|
This class encapsulates the response from the RadarFX server to a SAR image request. It contains the image data itself (or a file path to the saved image), metadata about the image, and any error or warning information. The class also provides methods to access the platform position, orientation, and other contextual information at the time the image was captured.
#include <rfxSarMessage.h>
Public Member Functions | |
| DtSarResponse () | |
| virtual | ~DtSarResponse () |
| virtual void | setError (DtImageError error) |
| virtual DtImageError | error () |
| virtual void | setWarning (DtImageWarning error) |
| virtual DtImageWarning | warning () |
| virtual void | setReturnMethod (unsigned int method) |
| virtual unsigned int | returnMethod () |
| virtual void | setImageFormat (DtImageFormat format) |
| virtual DtImageFormat | imageFormat () |
| virtual void | setImageSize (const DtImageSize &size) |
| virtual DtImageSize | imageSize () |
| virtual void | setImageDataType (DtImageDataType type) |
| virtual DtImageDataType | imageDataType () |
| virtual void | setFilename (const std::string &filename) |
| virtual std::string | filename () |
| virtual int | dataLength () |
| virtual void | setData (unsigned char *buffer, int length) |
| virtual unsigned char * | data () |
| virtual void | setOwnshipLocation (DtVector location) |
| virtual DtVector | ownshipLocation () |
| virtual void | setOwnshipOrientation (DtTaitBryan orientation) |
| virtual DtTaitBryan | ownshipOrientation () |
| virtual void | setSystemTime (double time) |
| virtual double | systemTime () |
| virtual void | setCenterPosition (double lat, double lon, double alt) |
| virtual void | getCenterPosition (double &lat, double &lon, double &alt) |
| virtual void | setSensorViewDirection (double azimuth, double elevation) |
| virtual void | getSensorViewDirection (double &azimuth, double &elevation) |
| virtual int | messageSize () |
| virtual DtBaseMessage * | clone () |
Public Member Functions inherited from makRadarFx::DtImageResponse | |
| DtImageResponse () | |
| virtual | ~DtImageResponse () |
Static Public Member Functions | |
| static DtBaseMessage * | decode (unsigned char *buffer, int length) |
Protected Member Functions | |
| virtual void | serialize (DtStreamWriter &writer) |
| virtual void | deserialize (DtStreamReader &reader) |
Protected Attributes | |
| DtImageError | myError |
| DtImageWarning | myWarning |
| DtImageSize | myImageSize |
| unsigned int | myReturnMethod |
| DtImageFormat | myImageFormat |
| DtImageDataType | myImageDataType |
| std::string | myFilename |
| int | myDataLength |
| unsigned char * | myData |
| DtVector | myOwnshipLocation |
| DtTaitBryan | myOwnshipOrientation |
| double | mySystemTime |
| double | myCenterLat |
| double | myCenterLon |
| double | myCenterAlt |
| double | mySensorDirectionAzimuth |
| double | mySensorDirectionElevation |
| makRadarFx::DtSarResponse::DtSarResponse | ( | ) |
Default constructor.
Initializes a new SAR image response message with default settings
|
virtual |
Virtual destructor.
Cleans up the response resources, including any allocated image data
|
virtual |
Sets the error code for this response.
| error | The error code to set |
Sets the error status for this SAR image response. Use IMAGE_NO_ERROR if the image was generated successfully.
References error().
|
virtual |
Gets the error code for this response.
Returns the error status for this SAR image response.
Referenced by setError(), and setWarning().
|
virtual |
Sets the warning code for this response.
| error | The warning code to set |
Sets the warning status for this SAR image response. Unlike errors, warnings indicate that the image was generated but there may be quality issues or other non-critical problems.
References error().
|
virtual |
Gets the warning code for this response.
Returns the warning status for this SAR image response.
|
virtual |
Sets the image delivery method used.
| method | Bitfield of DtImageReturnMethod values |
Sets the delivery method actually used for this SAR image response. This may differ from what was requested if there were problems with the requested method.
|
virtual |
Gets the image delivery method used.
Returns the delivery method that was actually used for this SAR image.
|
virtual |
Sets the image format used.
| format | The image format enumeration value used |
Sets the format that was actually used for the returned SAR image data. This may differ from what was requested if there were compatibility issues.
|
virtual |
Gets the image format used.
Returns the format that was actually used for the SAR image.
|
virtual |
Sets the actual dimensions of the returned image.
| size | The actual image dimensions in pixels |
Sets the actual dimensions of the returned SAR image in pixels. This may differ from what was requested due to image rotation or other processing requirements.
|
virtual |
Gets the actual dimensions of the returned image.
Returns the actual dimensions of the returned SAR image.
|
virtual |
Sets the image data type used.
| type | The image data type enumeration value used |
Sets the data type that was actually used for the pixel values in the SAR image. This is only relevant for RAW and NITF image formats and may differ from what was requested if there were compatibility issues.
|
virtual |
Gets the image data type used.
Returns the data type that was actually used for the SAR image pixels.
|
virtual |
Sets the full path of the saved image.
| filename | Full path to the saved image file |
Sets the full path of the image file that was saved on the server. This is only applicable when the FILESYSTEM return method was used.
References filename().
|
virtual |
Gets the full path of the saved image.
Returns the full path of the image file that was saved on the server. This will be empty if the FILESYSTEM return method was not used or if the save operation failed.
Referenced by setFilename().
|
virtual |
Gets the size of the image data in bytes.
Returns the size of the binary image data in bytes. This is only applicable when the STREAM return method was used.
|
virtual |
Sets the binary image data.
| buffer | Pointer to the image data buffer |
| length | Length of the image data in bytes |
Sets the binary image data for this response. This message class will take ownership of the buffer and manage its memory. This is only applicable when the STREAM return method is used.
|
virtual |
Gets the binary image data.
Returns a pointer to the binary image data. This will be nullptr if the STREAM return method was not used or if there was an error. The caller should not attempt to free this memory, as it is owned by this message object.
|
virtual |
Sets the platform position at the time of image capture.
| location | Vector containing the platform position (latitude, longitude, altitude) |
Sets the position of the platform (ownship) at the time when the SAR image was captured. This provides context for the image and can be used for geolocation purposes.
|
virtual |
Gets the platform position at the time of image capture.
Returns the position of the platform (ownship) at the time the image was captured.
|
virtual |
Sets the platform orientation at the time of image capture.
| orientation | Tait-Bryan angles representing the platform orientation |
Sets the orientation of the platform (ownship) at the time when the SAR image was captured. This provides context for the image and can be used for geolocation purposes.
|
virtual |
Gets the platform orientation at the time of image capture.
Returns the orientation of the platform (ownship) at the time the image was captured.
|
virtual |
Sets the UTC time when the image was captured.
| time | UTC time value (seconds since Unix epoch) |
Sets the UTC time when the SAR image was captured. This provides temporal context for the image and can be used for synchronization with other data.
|
virtual |
Gets the UTC time when the image was captured.
Returns the UTC time when the SAR image was captured.
|
virtual |
Sets the center position of the SAR image.
| lat | Latitude in degrees |
| lon | Longitude in degrees |
| alt | Altitude in meters |
Sets the geographic coordinates of the center point of the SAR image. This is the point where the sensor's view vector intersects with the terrain.
|
virtual |
Gets the center position of the SAR image.
| lat | Reference to store the latitude in degrees |
| lon | Reference to store the longitude in degrees |
| alt | Reference to store the altitude in meters |
Retrieves the geographic coordinates of the center point of the SAR image.
|
virtual |
Sets the sensor view direction.
| azimuth | Azimuth angle in radians (clockwise from north) |
| elevation | Elevation angle in radians (from horizontal) |
Sets the direction in which the radar sensor was pointing when the SAR image was captured. The azimuth is measured clockwise from north, and the elevation is measured from the horizontal plane.
|
virtual |
Gets the sensor view direction.
| azimuth | Reference to store the azimuth angle in radians |
| elevation | Reference to store the elevation angle in radians |
Retrieves the direction in which the radar sensor was pointing when the SAR image was captured.
|
virtual |
size of the message
Reimplemented from makRadarFx::DtBaseMessage.
|
static |
decode a message. Used by the factory
|
virtual |
clone a message. Caller of function is responsible managing this memory
Implements makRadarFx::DtBaseMessage.
|
protectedvirtual |
Serializes the message data to a stream writer.
| writer | Reference to the stream writer to write the data to |
Writes the message data to the provided stream writer. This protected method is called by the encode() method to convert the object to a byte array.
Reimplemented from makRadarFx::DtBaseMessage.
|
protectedvirtual |
Deserializes message data from a stream reader.
| reader | Reference to the stream reader to read the data from |
Reads the message data from the provided stream reader. This protected method is called by the decode() method to convert a byte array back to an object.
Reimplemented from makRadarFx::DtBaseMessage.
|
protected |
Error code for this response.
|
protected |
Warning code for this response.
|
protected |
Actual dimensions of the returned image.
|
protected |
Delivery method used for the image.
|
protected |
Format used for the image data.
|
protected |
Data type used for the image pixels.
|
protected |
Full path to the saved image file.
|
protected |
Length of the image data in bytes.
|
protected |
Pointer to the binary image data.
|
protected |
Platform position at time of image capture.
|
protected |
Platform orientation at time of image capture.
|
protected |
UTC time of image capture.
|
protected |
Latitude of the image center point.
|
protected |
Longitude of the image center point.
|
protected |
Altitude of the image center point.
|
protected |
Azimuth angle of the sensor view direction.
|
protected |
Elevation angle of the sensor view direction.