Issue #239 Got radar and radar mosaic working for collaboration
Former-commit-id: a8c0dd15e221a6415c44f73897a80bc4b69e5ca0
This commit is contained in:
parent
2d822df43f
commit
96c81a03df
23 changed files with 1122 additions and 59 deletions
|
@ -22,6 +22,7 @@
|
|||
<import feature="com.raytheon.uf.viz.core.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.cots.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.eclipse.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.viz.radar.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
|
@ -114,4 +115,11 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.viz.collaboration.radar"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
|
7
cave/com.raytheon.uf.viz.collaboration.radar/.classpath
Normal file
7
cave/com.raytheon.uf.viz.collaboration.radar/.classpath
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
28
cave/com.raytheon.uf.viz.collaboration.radar/.project
Normal file
28
cave/com.raytheon.uf.viz.collaboration.radar/.project
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.raytheon.uf.viz.collaboration.radar</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,8 @@
|
|||
#Thu Apr 12 17:10:20 CDT 2012
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -0,0 +1,21 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Radar Collaboration
|
||||
Bundle-SymbolicName: com.raytheon.uf.viz.collaboration.radar;singleton:=true
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Activator: com.raytheon.uf.viz.collaboration.radar.Activator
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Eclipse-RegisterBuddy: com.raytheon.uf.viz.core
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.dataplugin.radar;bundle-version="1.0.0",
|
||||
com.raytheon.viz.radar;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.viz.remote.graphics;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
||||
org.geotools;bundle-version="2.6.4",
|
||||
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.viz.collaboration.ui;bundle-version="1.0.0",
|
||||
com.raytheon.uf.viz.collaboration;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-ActivationPolicy: lazy
|
|
@ -0,0 +1,4 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
38
cave/com.raytheon.uf.viz.collaboration.radar/plugin.xml
Normal file
38
cave/com.raytheon.uf.viz.collaboration.radar/plugin.xml
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
|
||||
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
|
||||
|
||||
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
|
||||
This_software_product_contains_export-restricted_data_whose
|
||||
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
|
||||
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
|
||||
an_export_license_or_other_authorization.
|
||||
|
||||
Contractor_Name:________Raytheon_Company
|
||||
Contractor_Address:_____6825_Pine_Street,_Suite_340
|
||||
________________________Mail_Stop_B8
|
||||
________________________Omaha,_NE_68106
|
||||
________________________402.291.0100
|
||||
|
||||
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
|
||||
further_licensing_information.
|
||||
-->
|
||||
<?eclipse version="3.2"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="com.raytheon.uf.viz.core.graphicsExtension">
|
||||
<graphicsExtension
|
||||
class="com.raytheon.uf.viz.collaboration.radar.mesh.DispatchingRadarMeshExtension">
|
||||
</graphicsExtension>
|
||||
<graphicsExtension
|
||||
class="com.raytheon.uf.viz.collaboration.radar.mosaic.DispatchingRadarMosaicExtension">
|
||||
</graphicsExtension>
|
||||
</extension>
|
||||
<extension
|
||||
point="com.raytheon.uf.viz.collaboration.ui.renderingExtension">
|
||||
<renderingExtension
|
||||
class="com.raytheon.uf.viz.collaboration.radar.rendering.RadarGraphicsExtRenderingHandler">
|
||||
</renderingExtension>
|
||||
</extension>
|
||||
</plugin>
|
|
@ -0,0 +1,30 @@
|
|||
package com.raytheon.uf.viz.collaboration.radar;
|
||||
|
||||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
public class Activator implements BundleActivator {
|
||||
|
||||
private static BundleContext context;
|
||||
|
||||
static BundleContext getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext bundleContext) throws Exception {
|
||||
Activator.context = bundleContext;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext bundleContext) throws Exception {
|
||||
Activator.context = null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,261 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.collaboration.radar.mesh;
|
||||
|
||||
import org.geotools.coverage.grid.GeneralGridGeometry;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.AbstractDispatchingObjectEvent;
|
||||
|
||||
/**
|
||||
* Event class used to specify the creation of a radar radial mesh
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 16, 2012 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
@DynamicSerialize
|
||||
public class CreateRadarRadialMesh extends AbstractDispatchingObjectEvent {
|
||||
|
||||
@DynamicSerializeElement
|
||||
private Integer numBins;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private Integer numRadials;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private float[] angleData;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private Integer gateResolution;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private Float trueElevationAngle;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private Integer jstart;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private String format;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private Float latitude;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private Float longitude;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private GeneralGridGeometry targetGeometry;
|
||||
|
||||
/**
|
||||
* @return the radarRecord
|
||||
*/
|
||||
public RadarRecord getRadarRecord() {
|
||||
RadarRecord radarRecord = new RadarRecord();
|
||||
radarRecord.setAngleData(angleData);
|
||||
radarRecord.setFormat(format);
|
||||
radarRecord.setGateResolution(gateResolution);
|
||||
radarRecord.setJstart(jstart);
|
||||
radarRecord.setLatitude(latitude);
|
||||
radarRecord.setLongitude(longitude);
|
||||
radarRecord.setNumBins(numBins);
|
||||
radarRecord.setNumRadials(numRadials);
|
||||
radarRecord.setTrueElevationAngle(trueElevationAngle);
|
||||
return radarRecord;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param radarRecord
|
||||
* the radarRecord to set
|
||||
*/
|
||||
public void setRadarRecord(RadarRecord radarRecord) {
|
||||
this.angleData = radarRecord.getAngleData();
|
||||
this.format = radarRecord.getFormat();
|
||||
this.gateResolution = radarRecord.getGateResolution();
|
||||
this.jstart = radarRecord.getJstart();
|
||||
this.latitude = radarRecord.getLatitude();
|
||||
this.longitude = radarRecord.getLongitude();
|
||||
this.numBins = radarRecord.getNumBins();
|
||||
this.numRadials = radarRecord.getNumRadials();
|
||||
this.trueElevationAngle = radarRecord.getTrueElevationAngle();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the targetGeometry
|
||||
*/
|
||||
public GeneralGridGeometry getTargetGeometry() {
|
||||
return targetGeometry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param targetGeometry
|
||||
* the targetGeometry to set
|
||||
*/
|
||||
public void setTargetGeometry(GeneralGridGeometry targetGeometry) {
|
||||
this.targetGeometry = targetGeometry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the numBins
|
||||
*/
|
||||
public Integer getNumBins() {
|
||||
return numBins;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param numBins
|
||||
* the numBins to set
|
||||
*/
|
||||
public void setNumBins(Integer numBins) {
|
||||
this.numBins = numBins;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the numRadials
|
||||
*/
|
||||
public Integer getNumRadials() {
|
||||
return numRadials;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param numRadials
|
||||
* the numRadials to set
|
||||
*/
|
||||
public void setNumRadials(Integer numRadials) {
|
||||
this.numRadials = numRadials;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the angleData
|
||||
*/
|
||||
public float[] getAngleData() {
|
||||
return angleData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param angleData
|
||||
* the angleData to set
|
||||
*/
|
||||
public void setAngleData(float[] angleData) {
|
||||
this.angleData = angleData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the gateResolution
|
||||
*/
|
||||
public Integer getGateResolution() {
|
||||
return gateResolution;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gateResolution
|
||||
* the gateResolution to set
|
||||
*/
|
||||
public void setGateResolution(Integer gateResolution) {
|
||||
this.gateResolution = gateResolution;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the trueElevationAngle
|
||||
*/
|
||||
public Float getTrueElevationAngle() {
|
||||
return trueElevationAngle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param trueElevationAngle
|
||||
* the trueElevationAngle to set
|
||||
*/
|
||||
public void setTrueElevationAngle(Float trueElevationAngle) {
|
||||
this.trueElevationAngle = trueElevationAngle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the jstart
|
||||
*/
|
||||
public Integer getJstart() {
|
||||
return jstart;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jstart
|
||||
* the jstart to set
|
||||
*/
|
||||
public void setJstart(Integer jstart) {
|
||||
this.jstart = jstart;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the format
|
||||
*/
|
||||
public String getFormat() {
|
||||
return format;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param format
|
||||
* the format to set
|
||||
*/
|
||||
public void setFormat(String format) {
|
||||
this.format = format;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the latitude
|
||||
*/
|
||||
public Float getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param latitude
|
||||
* the latitude to set
|
||||
*/
|
||||
public void setLatitude(Float latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the longitude
|
||||
*/
|
||||
public Float getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param longitude
|
||||
* the longitude to set
|
||||
*/
|
||||
public void setLongitude(Float longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.collaboration.radar.mesh;
|
||||
|
||||
import org.geotools.coverage.grid.GeneralGridGeometry;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
||||
import com.raytheon.uf.viz.core.IMesh;
|
||||
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.remote.graphics.DispatchGraphicsTarget;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.RemoteGraphicsEventFactory;
|
||||
import com.raytheon.uf.viz.remote.graphics.objects.DispatchingMesh;
|
||||
import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension;
|
||||
|
||||
/**
|
||||
* Radar mesh extension implementation which creates dispatching mesh that
|
||||
* forwards key events
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 13, 2012 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class DispatchingRadarMeshExtension extends
|
||||
GraphicsExtension<DispatchGraphicsTarget> implements
|
||||
IRadialMeshExtension {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.radar.rsc.image.IRadialMeshExtension#constructMesh(com
|
||||
* .raytheon.uf.common.dataplugin.radar.RadarRecord,
|
||||
* org.geotools.coverage.grid.GeneralGridGeometry)
|
||||
*/
|
||||
@Override
|
||||
public IMesh constructMesh(RadarRecord radarData,
|
||||
GeneralGridGeometry targetGeometry) throws VizException {
|
||||
DispatchingMesh wrapping = new DispatchingMesh(target
|
||||
.getWrappedObject().getExtension(IRadialMeshExtension.class)
|
||||
.constructMesh(radarData, targetGeometry),
|
||||
target.getDispatcher());
|
||||
CreateRadarRadialMesh create = RemoteGraphicsEventFactory.createEvent(
|
||||
CreateRadarRadialMesh.class, wrapping);
|
||||
create.setRadarRecord(radarData);
|
||||
create.setTargetGeometry(targetGeometry);
|
||||
target.dispatch(create);
|
||||
return wrapping;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension#
|
||||
* getCompatibilityValue(com.raytheon.uf.viz.core.IGraphicsTarget)
|
||||
*/
|
||||
@Override
|
||||
public int getCompatibilityValue(DispatchGraphicsTarget target) {
|
||||
return Compatibilty.TARGET_COMPATIBLE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.collaboration.radar.mosaic;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.AbstractDispatchingObjectEvent;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.colormap.UpdateColorMapParametersEvent;
|
||||
|
||||
/**
|
||||
* Event for creating a new mosaic image
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 16, 2012 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
@DynamicSerialize
|
||||
public class CreateMosaicImageEvent extends AbstractDispatchingObjectEvent {
|
||||
|
||||
@DynamicSerializeElement
|
||||
private int[] bounds;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private UpdateMosaicExtent extent;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private UpdateColorMapParametersEvent colorMapParameters;
|
||||
|
||||
/**
|
||||
* @return the bounds
|
||||
*/
|
||||
public int[] getBounds() {
|
||||
return bounds;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bounds
|
||||
* the bounds to set
|
||||
*/
|
||||
public void setBounds(int[] bounds) {
|
||||
this.bounds = bounds;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the extent
|
||||
*/
|
||||
public UpdateMosaicExtent getExtent() {
|
||||
return extent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param extent
|
||||
* the extent to set
|
||||
*/
|
||||
public void setExtent(UpdateMosaicExtent extent) {
|
||||
this.extent = extent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the colorMapParameters
|
||||
*/
|
||||
public UpdateColorMapParametersEvent getColorMapParameters() {
|
||||
return colorMapParameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param colorMapParameters
|
||||
* the colorMapParameters to set
|
||||
*/
|
||||
public void setColorMapParameters(
|
||||
UpdateColorMapParametersEvent colorMapParameters) {
|
||||
this.colorMapParameters = colorMapParameters;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.collaboration.radar.mosaic;
|
||||
|
||||
import com.raytheon.uf.viz.core.DrawableImage;
|
||||
import com.raytheon.uf.viz.core.IExtent;
|
||||
import com.raytheon.uf.viz.core.drawables.ColorMapParameters;
|
||||
import com.raytheon.uf.viz.core.drawables.ext.IImagingExtension;
|
||||
import com.raytheon.uf.viz.remote.graphics.Dispatcher;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.RemoteGraphicsEventFactory;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.imagery.PaintImagesEvent;
|
||||
import com.raytheon.uf.viz.remote.graphics.objects.DispatchingColormappedImage;
|
||||
import com.raytheon.viz.radar.rsc.mosaic.ext.IRadarMosaicImageExtension.IMosaicImage;
|
||||
|
||||
/**
|
||||
* Dispatching mosaic image object created from graphics image and forwards key
|
||||
* events to remote clients
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 16, 2012 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class DispatchingMosaicImage extends
|
||||
DispatchingColormappedImage<IMosaicImage> implements IMosaicImage {
|
||||
|
||||
/**
|
||||
* @param targetObject
|
||||
* @param extensionClass
|
||||
* @param dispatcher
|
||||
*/
|
||||
public DispatchingMosaicImage(IMosaicImage targetObject,
|
||||
Class<? extends IImagingExtension> extensionClass,
|
||||
Dispatcher dispatcher, ColorMapParameters parameters) {
|
||||
super(targetObject, extensionClass, dispatcher, parameters);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.radar.rsc.mosaic.ext.IRadarMosaicImageExtension.IMosaicImage
|
||||
* #setImagesToMosaic(com.raytheon.uf.viz.core.DrawableImage[])
|
||||
*/
|
||||
@Override
|
||||
public void setImagesToMosaic(DrawableImage... images) {
|
||||
UpdateImagesToMosaic event = RemoteGraphicsEventFactory.createEvent(
|
||||
UpdateImagesToMosaic.class, this);
|
||||
event.setImagesToMosaic(PaintImagesEvent.toPaintEvents(images));
|
||||
wrappedObject.setImagesToMosaic(PaintImagesEvent
|
||||
.extractTargetImages(images));
|
||||
dispatch(event);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.radar.rsc.mosaic.ext.IRadarMosaicImageExtension.IMosaicImage
|
||||
* #setImageExtent(com.raytheon.uf.viz.core.IExtent)
|
||||
*/
|
||||
@Override
|
||||
public void setImageExtent(IExtent imageExtent) {
|
||||
wrappedObject.setImageExtent(imageExtent);
|
||||
UpdateMosaicExtent extentUpdate = RemoteGraphicsEventFactory
|
||||
.createEvent(UpdateMosaicExtent.class, this);
|
||||
extentUpdate.setIExtent(imageExtent);
|
||||
dispatch(extentUpdate);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.collaboration.radar.mosaic;
|
||||
|
||||
import com.raytheon.uf.viz.core.IExtent;
|
||||
import com.raytheon.uf.viz.core.drawables.ColorMapParameters;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.RemoteGraphicsEventFactory;
|
||||
import com.raytheon.uf.viz.remote.graphics.extensions.AbstractDispatchingImageExtension;
|
||||
import com.raytheon.viz.radar.rsc.mosaic.ext.IRadarMosaicImageExtension;
|
||||
|
||||
/**
|
||||
* Dispatching radar mosaic extension, creates dispatching IMosaicImage
|
||||
* implementation that forwards key image events
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 13, 2012 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class DispatchingRadarMosaicExtension extends
|
||||
AbstractDispatchingImageExtension implements IRadarMosaicImageExtension {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.radar.rsc.mosaic.ext.IRadarMosaicImageExtension#
|
||||
* initializeRaster(int[], com.raytheon.uf.viz.core.IExtent,
|
||||
* com.raytheon.uf.viz.core.drawables.ColorMapParameters)
|
||||
*/
|
||||
@Override
|
||||
public IMosaicImage initializeRaster(int[] imageBounds,
|
||||
IExtent imageExtent, ColorMapParameters params) throws VizException {
|
||||
DispatchingMosaicImage image = new DispatchingMosaicImage(target
|
||||
.getWrappedObject()
|
||||
.getExtension(IRadarMosaicImageExtension.class)
|
||||
.initializeRaster(imageBounds, imageExtent, params),
|
||||
DispatchingRadarMosaicExtension.class, target.getDispatcher(),
|
||||
params);
|
||||
// Send creation event
|
||||
CreateMosaicImageEvent creation = RemoteGraphicsEventFactory
|
||||
.createEvent(CreateMosaicImageEvent.class, image);
|
||||
creation.setBounds(imageBounds);
|
||||
if (params != null) {
|
||||
creation.setColorMapParameters(DispatchingMosaicImage
|
||||
.createColorMapParametersUpdateEvent(image));
|
||||
}
|
||||
if (imageExtent != null) {
|
||||
UpdateMosaicExtent extentUpdate = RemoteGraphicsEventFactory
|
||||
.createEvent(UpdateMosaicExtent.class, image);
|
||||
extentUpdate.setIExtent(imageExtent);
|
||||
creation.setExtent(extentUpdate);
|
||||
}
|
||||
target.dispatch(creation);
|
||||
return image;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.collaboration.radar.mosaic;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.AbstractDispatchingObjectEvent;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.imagery.PaintImageEvent;
|
||||
|
||||
/**
|
||||
* Event for updating what images should be in the mosaic
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 16, 2012 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
@DynamicSerialize
|
||||
public class UpdateImagesToMosaic extends AbstractDispatchingObjectEvent {
|
||||
|
||||
@DynamicSerializeElement
|
||||
private PaintImageEvent[] imagesToMosaic;
|
||||
|
||||
/**
|
||||
* @return the imagesToMosaic
|
||||
*/
|
||||
public PaintImageEvent[] getImagesToMosaic() {
|
||||
return imagesToMosaic;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param imagesToMosaic
|
||||
* the imagesToMosaic to set
|
||||
*/
|
||||
public void setImagesToMosaic(PaintImageEvent[] imagesToMosaic) {
|
||||
this.imagesToMosaic = imagesToMosaic;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.collaboration.radar.mosaic;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.viz.core.IExtent;
|
||||
import com.raytheon.uf.viz.core.PixelExtent;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.AbstractDispatchingObjectEvent;
|
||||
|
||||
/**
|
||||
* Event object for updating mosaic images extent
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 17, 2012 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
@DynamicSerialize
|
||||
public class UpdateMosaicExtent extends AbstractDispatchingObjectEvent {
|
||||
|
||||
@DynamicSerializeElement
|
||||
private double[] extent;
|
||||
|
||||
/**
|
||||
* @return the extent
|
||||
*/
|
||||
public double[] getExtent() {
|
||||
return extent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param extent
|
||||
* the extent to set
|
||||
*/
|
||||
public void setExtent(double[] extent) {
|
||||
this.extent = extent;
|
||||
}
|
||||
|
||||
public void setIExtent(IExtent extent) {
|
||||
if (extent != null) {
|
||||
setExtent(new double[] { extent.getMinX(), extent.getMaxX(),
|
||||
extent.getMinY(), extent.getMaxY() });
|
||||
}
|
||||
}
|
||||
|
||||
public IExtent getIExtent() {
|
||||
return new PixelExtent(extent[0], extent[1], extent[2], extent[3]);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.collaboration.radar.rendering;
|
||||
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import com.raytheon.uf.viz.collaboration.radar.mesh.CreateRadarRadialMesh;
|
||||
import com.raytheon.uf.viz.collaboration.radar.mosaic.CreateMosaicImageEvent;
|
||||
import com.raytheon.uf.viz.collaboration.radar.mosaic.UpdateImagesToMosaic;
|
||||
import com.raytheon.uf.viz.collaboration.radar.mosaic.UpdateMosaicExtent;
|
||||
import com.raytheon.uf.viz.collaboration.ui.rsc.rendering.CollaborationRenderingHandler;
|
||||
import com.raytheon.uf.viz.collaboration.ui.rsc.rendering.ImagingRenderingHandler;
|
||||
import com.raytheon.uf.viz.core.IExtent;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.drawables.ColorMapParameters;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension;
|
||||
import com.raytheon.viz.radar.rsc.mosaic.ext.IRadarMosaicImageExtension;
|
||||
import com.raytheon.viz.radar.rsc.mosaic.ext.IRadarMosaicImageExtension.IMosaicImage;
|
||||
|
||||
/**
|
||||
* Rendering handler for radar graphics extension objects
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 17, 2012 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class RadarGraphicsExtRenderingHandler extends
|
||||
CollaborationRenderingHandler {
|
||||
|
||||
@Subscribe
|
||||
public void createRadarMesh(CreateRadarRadialMesh event)
|
||||
throws VizException {
|
||||
int meshId = event.getObjectId();
|
||||
IGraphicsTarget target = getTarget();
|
||||
dataManager.putRenderableObject(
|
||||
meshId,
|
||||
target.getExtension(IRadialMeshExtension.class).constructMesh(
|
||||
event.getRadarRecord(), event.getTargetGeometry()));
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void createMosaicImage(CreateMosaicImageEvent event)
|
||||
throws VizException {
|
||||
int imageId = event.getObjectId();
|
||||
IGraphicsTarget target = getTarget();
|
||||
IExtent imageExtent = null;
|
||||
ColorMapParameters parameters = null;
|
||||
if (event.getExtent() != null) {
|
||||
imageExtent = event.getExtent().getIExtent();
|
||||
}
|
||||
if (event.getColorMapParameters() != null) {
|
||||
parameters = event.getColorMapParameters().asColorMapParameters();
|
||||
}
|
||||
dataManager.putRenderableObject(
|
||||
imageId,
|
||||
target.getExtension(IRadarMosaicImageExtension.class)
|
||||
.initializeRaster(event.getBounds(), imageExtent,
|
||||
parameters));
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void updateImagesToMosaic(UpdateImagesToMosaic event) {
|
||||
IMosaicImage image = dataManager.getRenderableObject(
|
||||
event.getObjectId(), IMosaicImage.class);
|
||||
if (image != null) {
|
||||
image.setImagesToMosaic(ImagingRenderingHandler.toDrawableImages(
|
||||
event.getImagesToMosaic(), dataManager));
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void updateMosaicImageExtent(UpdateMosaicExtent event) {
|
||||
IMosaicImage image = dataManager.getRenderableObject(
|
||||
event.getObjectId(), IMosaicImage.class);
|
||||
if (image != null) {
|
||||
image.setImageExtent(event.getIExtent());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,7 +6,8 @@ Bundle-Version: 1.0.0.qualifier
|
|||
Bundle-Activator: com.raytheon.uf.viz.collaboration.ui.Activator
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Eclipse-RegisterBuddy: com.raytheon.uf.viz.core
|
||||
Export-Package: com.raytheon.uf.viz.collaboration.ui
|
||||
Export-Package: com.raytheon.uf.viz.collaboration.ui,
|
||||
com.raytheon.uf.viz.collaboration.ui.rsc.rendering
|
||||
Require-Bundle: com.raytheon.viz.ui,
|
||||
org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
|
@ -15,7 +16,6 @@ Require-Bundle: com.raytheon.viz.ui,
|
|||
org.eclipse.ecf;bundle-version="3.1.0",
|
||||
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
|
||||
org.geotools;bundle-version="2.6.4",
|
||||
com.google.guava;bundle-version="1.0.0",
|
||||
com.raytheon.viz.core;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.viz.drawing;bundle-version="1.0.0",
|
||||
com.raytheon.uf.viz.remote.graphics;bundle-version="1.0.0"
|
||||
|
|
|
@ -72,6 +72,24 @@ public class ImagingRenderingHandler extends CollaborationRenderingHandler {
|
|||
PaintProperties paintProps = getPaintProperties();
|
||||
IGraphicsTarget target = getTarget();
|
||||
PaintImageEvent[] events = event.getImageEvents();
|
||||
DrawableImage[] images = toDrawableImages(events, dataManager);
|
||||
if (images.length > 0) {
|
||||
PaintProperties imageProps = new PaintProperties(paintProps);
|
||||
imageProps.setAlpha(event.getAlpha());
|
||||
target.drawRasters(imageProps, images);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts PaintImageEvent[] into DrawableImage[] by looking up image and
|
||||
* mesh objects from dataManager
|
||||
*
|
||||
* @param events
|
||||
* @param dataManager
|
||||
* @return
|
||||
*/
|
||||
public static DrawableImage[] toDrawableImages(PaintImageEvent[] events,
|
||||
CollaborationRenderingDataManager dataManager) {
|
||||
List<DrawableImage> images = new ArrayList<DrawableImage>(events.length);
|
||||
for (PaintImageEvent pie : events) {
|
||||
IImage image = dataManager.getRenderableObject(pie.getObjectId(),
|
||||
|
@ -89,12 +107,7 @@ public class ImagingRenderingHandler extends CollaborationRenderingHandler {
|
|||
// TODO: Log?
|
||||
}
|
||||
}
|
||||
if (images.size() > 0) {
|
||||
PaintProperties imageProps = new PaintProperties(paintProps);
|
||||
imageProps.setAlpha(event.getAlpha());
|
||||
target.drawRasters(imageProps,
|
||||
images.toArray(new DrawableImage[images.size()]));
|
||||
}
|
||||
return images.toArray(new DrawableImage[images.size()]);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
|
|
@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.core.runtime,
|
|||
org.eclipse.ecf;bundle-version="3.1.300",
|
||||
org.eclipse.ecf.presence;bundle-version="2.0.0",
|
||||
org.eclipse.ecf.provider.xmpp;bundle-version="3.2.0",
|
||||
com.google.guava;bundle-version="1.0.0",
|
||||
com.google.guava;bundle-version="1.0.0";visibility:=reexport,
|
||||
com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
|
||||
org.jivesoftware.smack;bundle-version="3.1.100"
|
||||
|
|
|
@ -168,8 +168,8 @@ public class GLRadarMosaicImageExtension extends AbstractGLSLImagingExtension
|
|||
program.setUniform("mosaicTexture", 1);
|
||||
|
||||
// pass in width and height
|
||||
program.setUniform("height", (paintProps.getCanvasBounds().height));
|
||||
program.setUniform("width", (paintProps.getCanvasBounds().width));
|
||||
program.setUniform("height", writeToImage.getHeight());
|
||||
program.setUniform("width", writeToImage.getWidth());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -484,6 +484,7 @@ public class DispatchGraphicsTarget extends DispatchingObject<IGraphicsTarget>
|
|||
private void sendDrawWireframeShapeEvent(DispatchingWireframeShape shape,
|
||||
RGB color, float lineWidth, LineStyle lineStyle, IFont font,
|
||||
Float alpha) {
|
||||
shape.updateState();
|
||||
RenderWireframeShapeEvent event = RemoteGraphicsEventFactory
|
||||
.createEvent(RenderWireframeShapeEvent.class, shape);
|
||||
event.setColor(color);
|
||||
|
|
|
@ -21,8 +21,15 @@ package com.raytheon.uf.viz.remote.graphics.events.imagery;
|
|||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.viz.core.DrawableImage;
|
||||
import com.raytheon.uf.viz.core.IMesh;
|
||||
import com.raytheon.uf.viz.core.PixelCoverage;
|
||||
import com.raytheon.uf.viz.core.drawables.IImage;
|
||||
import com.raytheon.uf.viz.remote.graphics.AbstractRemoteGraphicsEvent;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.IRenderEvent;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.RemoteGraphicsEventFactory;
|
||||
import com.raytheon.uf.viz.remote.graphics.objects.AbstractDispatchingImage;
|
||||
import com.raytheon.uf.viz.remote.graphics.objects.DispatchingMesh;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
|
@ -80,4 +87,69 @@ public class PaintImagesEvent extends AbstractRemoteGraphicsEvent implements
|
|||
this.alpha = alpha;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param images
|
||||
* the images to set
|
||||
*/
|
||||
public static PaintImageEvent[] toPaintEvents(DrawableImage[] images) {
|
||||
PaintImageEvent[] imageEvents = new PaintImageEvent[images.length];
|
||||
|
||||
for (int i = 0; i < images.length; ++i) {
|
||||
DrawableImage di = images[i];
|
||||
AbstractDispatchingImage<?> dispatchingImage = (AbstractDispatchingImage<?>) di
|
||||
.getImage();
|
||||
|
||||
// If image parameters have been modified, update
|
||||
dispatchingImage.updateState();
|
||||
|
||||
PixelCoverage coverage = di.getCoverage();
|
||||
PixelCoverage targetCoverage = new PixelCoverage(coverage.getUl(),
|
||||
coverage.getUr(), coverage.getLr(), coverage.getLl());
|
||||
|
||||
PaintImageEvent paintEvent = RemoteGraphicsEventFactory
|
||||
.createEvent(PaintImageEvent.class, dispatchingImage);
|
||||
paintEvent.setPixelCoverage(coverage);
|
||||
|
||||
IMesh mesh = coverage.getMesh();
|
||||
IMesh targetMesh = null;
|
||||
if (mesh != null) {
|
||||
DispatchingMesh dmesh = (DispatchingMesh) mesh;
|
||||
targetMesh = dmesh.getWrappedObject();
|
||||
paintEvent.setMeshId(dmesh.getObjectId());
|
||||
targetCoverage.setMesh(targetMesh);
|
||||
}
|
||||
|
||||
imageEvents[i] = paintEvent;
|
||||
}
|
||||
return imageEvents;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param images
|
||||
* the images to set
|
||||
*/
|
||||
public static DrawableImage[] extractTargetImages(DrawableImage[] images) {
|
||||
DrawableImage[] targeted = new DrawableImage[images.length];
|
||||
|
||||
for (int i = 0; i < images.length; ++i) {
|
||||
DrawableImage di = images[i];
|
||||
AbstractDispatchingImage<?> dispatchingImage = (AbstractDispatchingImage<?>) di
|
||||
.getImage();
|
||||
|
||||
IImage targetImage = dispatchingImage.getWrappedObject();
|
||||
PixelCoverage coverage = di.getCoverage();
|
||||
PixelCoverage targetCoverage = new PixelCoverage(coverage.getUl(),
|
||||
coverage.getUr(), coverage.getLr(), coverage.getLl());
|
||||
|
||||
IMesh mesh = coverage.getMesh();
|
||||
if (mesh != null) {
|
||||
DispatchingMesh dmesh = (DispatchingMesh) mesh;
|
||||
targetCoverage.setMesh(dmesh.getWrappedObject());
|
||||
}
|
||||
|
||||
targeted[i] = new DrawableImage(targetImage, targetCoverage,
|
||||
di.getMode());
|
||||
}
|
||||
return targeted;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,23 +19,14 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.remote.graphics.extensions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.uf.viz.core.DrawableImage;
|
||||
import com.raytheon.uf.viz.core.IMesh;
|
||||
import com.raytheon.uf.viz.core.PixelCoverage;
|
||||
import com.raytheon.uf.viz.core.drawables.IImage;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension;
|
||||
import com.raytheon.uf.viz.core.drawables.ext.IImagingExtension;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.remote.graphics.DispatchGraphicsTarget;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.RemoteGraphicsEventFactory;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.imagery.PaintImageEvent;
|
||||
import com.raytheon.uf.viz.remote.graphics.events.imagery.PaintImagesEvent;
|
||||
import com.raytheon.uf.viz.remote.graphics.objects.AbstractDispatchingImage;
|
||||
import com.raytheon.uf.viz.remote.graphics.objects.DispatchingMesh;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
|
@ -79,49 +70,13 @@ public abstract class AbstractDispatchingImageExtension extends
|
|||
@Override
|
||||
public boolean drawRasters(PaintProperties paintProps,
|
||||
DrawableImage... images) throws VizException {
|
||||
// All of these images are ready for actual rendering (status == LOADED)
|
||||
List<DrawableImage> targeted = new ArrayList<DrawableImage>(
|
||||
images.length);
|
||||
PaintImageEvent[] imageEvents = new PaintImageEvent[images.length];
|
||||
|
||||
for (int i = 0; i < images.length; ++i) {
|
||||
DrawableImage di = images[i];
|
||||
AbstractDispatchingImage<?> dispatchingImage = (AbstractDispatchingImage<?>) di
|
||||
.getImage();
|
||||
|
||||
// If image parameters have been modified, update
|
||||
dispatchingImage.updateState();
|
||||
|
||||
IImage targetImage = dispatchingImage.getWrappedObject();
|
||||
PixelCoverage coverage = di.getCoverage();
|
||||
PixelCoverage targetCoverage = new PixelCoverage(coverage.getUl(),
|
||||
coverage.getUr(), coverage.getLr(), coverage.getLl());
|
||||
|
||||
PaintImageEvent paintEvent = RemoteGraphicsEventFactory
|
||||
.createEvent(PaintImageEvent.class, dispatchingImage);
|
||||
paintEvent.setPixelCoverage(coverage);
|
||||
|
||||
IMesh mesh = coverage.getMesh();
|
||||
IMesh targetMesh = null;
|
||||
if (mesh != null) {
|
||||
DispatchingMesh dmesh = (DispatchingMesh) mesh;
|
||||
targetMesh = dmesh.getWrappedObject();
|
||||
paintEvent.setMeshId(dmesh.getObjectId());
|
||||
targetCoverage.setMesh(targetMesh);
|
||||
}
|
||||
|
||||
targeted.add(new DrawableImage(targetImage, targetCoverage, di
|
||||
.getMode()));
|
||||
|
||||
imageEvents[i] = paintEvent;
|
||||
}
|
||||
|
||||
PaintImagesEvent bulkRender = RemoteGraphicsEventFactory.createEvent(
|
||||
PaintImagesEvent.class, target);
|
||||
bulkRender.setImageEvents(imageEvents);
|
||||
bulkRender.setImageEvents(PaintImagesEvent.toPaintEvents(images));
|
||||
DrawableImage[] targeted = PaintImagesEvent.extractTargetImages(images);
|
||||
bulkRender.setAlpha(paintProps.getAlpha());
|
||||
boolean rval = target.getWrappedObject().drawRasters(paintProps,
|
||||
targeted.toArray(new DrawableImage[targeted.size()]));
|
||||
targeted);
|
||||
target.dispatch(bulkRender);
|
||||
return rval;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue