00001
00002
00003 package ros.pkg.sensor_msgs.msg;
00004
00005 import java.nio.ByteBuffer;
00006
00007 public class RegionOfInterest extends ros.communication.Message {
00008
00009 public long x_offset;
00010 public long y_offset;
00011 public long height;
00012 public long width;
00013 public boolean do_rectify;
00014
00015 public RegionOfInterest() {
00016 }
00017
00018 public static java.lang.String __s_getDataType() { return "sensor_msgs/RegionOfInterest"; }
00019 public java.lang.String getDataType() { return __s_getDataType(); }
00020 public static java.lang.String __s_getMD5Sum() { return "bdb633039d588fcccb441a4d43ccfe09"; }
00021 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00022 public static java.lang.String __s_getMessageDefinition() { return "# This message is used to specify a region of interest within an image.\n" +
00023 "#\n" +
00024 "# When used to specify the ROI setting of the camera when the image was\n" +
00025 "# taken, the height and width fields should either match the height and\n" +
00026 "# width fields for the associated image; or height = width = 0\n" +
00027 "# indicates that the full resolution image was captured.\n" +
00028 "\n" +
00029 "uint32 x_offset # Leftmost pixel of the ROI\n" +
00030 " # (0 if the ROI includes the left edge of the image)\n" +
00031 "uint32 y_offset # Topmost pixel of the ROI\n" +
00032 " # (0 if the ROI includes the top edge of the image)\n" +
00033 "uint32 height # Height of ROI\n" +
00034 "uint32 width # Width of ROI\n" +
00035 "\n" +
00036 "# True if a distinct rectified ROI should be calculated from the \"raw\"\n" +
00037 "# ROI in this message. Typically this should be False if the full image\n" +
00038 "# is captured (ROI not used), and True if a subwindow is captured (ROI\n" +
00039 "# used).\n" +
00040 "bool do_rectify\n" +
00041 "\n" +
00042 ""; }
00043 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00044
00045 public RegionOfInterest clone() {
00046 RegionOfInterest c = new RegionOfInterest();
00047 c.deserialize(serialize(0));
00048 return c;
00049 }
00050
00051 public void setTo(ros.communication.Message m) {
00052 deserialize(m.serialize(0));
00053 }
00054
00055 public int serializationLength() {
00056 int __l = 0;
00057 __l += 4;
00058 __l += 4;
00059 __l += 4;
00060 __l += 4;
00061 __l += 1;
00062 return __l;
00063 }
00064
00065 public void serialize(ByteBuffer bb, int seq) {
00066 bb.putInt((int)x_offset);
00067 bb.putInt((int)y_offset);
00068 bb.putInt((int)height);
00069 bb.putInt((int)width);
00070 bb.put((byte)(do_rectify ? 1 : 0));
00071 }
00072
00073 public void deserialize(ByteBuffer bb) {
00074 x_offset = (long)(bb.getInt() & 0xffffffff);
00075 y_offset = (long)(bb.getInt() & 0xffffffff);
00076 height = (long)(bb.getInt() & 0xffffffff);
00077 width = (long)(bb.getInt() & 0xffffffff);
00078 do_rectify = bb.get() != 0 ? true : false;
00079 }
00080
00081 @SuppressWarnings("all")
00082 public boolean equals(Object o) {
00083 if(!(o instanceof RegionOfInterest))
00084 return false;
00085 RegionOfInterest other = (RegionOfInterest) o;
00086 return
00087 x_offset == other.x_offset &&
00088 y_offset == other.y_offset &&
00089 height == other.height &&
00090 width == other.width &&
00091 do_rectify == other.do_rectify &&
00092 true;
00093 }
00094
00095 @SuppressWarnings("all")
00096 public int hashCode() {
00097 final int prime = 31;
00098 int result = 1;
00099 long tmp;
00100 result = prime * result + (int)(this.x_offset ^ (this.x_offset >>> 32));
00101 result = prime * result + (int)(this.y_offset ^ (this.y_offset >>> 32));
00102 result = prime * result + (int)(this.height ^ (this.height >>> 32));
00103 result = prime * result + (int)(this.width ^ (this.width >>> 32));
00104 result = prime * result + (this.do_rectify ? 1231 : 1237);
00105 return result;
00106 }
00107 }
00108