Revision 2127 org.gvsig.raster.principalcomponents/trunk/org.gvsig.raster.principalcomponents/org.gvsig.raster.principalcomponents.swing/org.gvsig.raster.principalcomponents.swing.impl/src/main/java/org/gvsig/raster/principalcomponents/swing/impl/main/PCAMainPanelImpl.java

View differences:

PCAMainPanelImpl.java
41 41
import org.gvsig.raster.algorithm.process.DataProcess;
42 42
import org.gvsig.raster.algorithm.process.ProcessException;
43 43
import org.gvsig.raster.principalcomponents.algorithm.PrincipalComponentsAlgorithmLibrary;
44
import org.gvsig.raster.roi.ROI;
45 44
import org.gvsig.raster.swing.RasterSwingLocator;
46 45
import org.gvsig.raster.swing.RasterSwingManager;
47 46
import org.gvsig.raster.swing.newlayer.CreateNewLayerPanel;
......
59 58
	private PagedTable                      table                = null;
60 59
	private JCheckBox                       roisCheck            = null;
61 60
	private int                             bandList             = 0;
62
	private List<ROI>                       rois                 = null;
61
	private String                          roisEPSG             = null;
63 62
	
64
	public PCAMainPanelImpl(Object inputStore, String layerName, int bandList, List<ROI> rois) {
63
	public PCAMainPanelImpl(Object inputStore, String layerName, int bandList, String roisEPSG) {
65 64
		this.inputStore = inputStore;
66 65
		this.layerName = layerName;
67 66
		this.bandList = bandList;
68
		this.rois = rois;
67
		this.roisEPSG = roisEPSG;
69 68
		init();
70 69
	}
71 70
	
......
83 82
		gridBagConstraints1.gridy = 2;
84 83
		add((JComponent)getCreateNewLayerPanel(), gridBagConstraints1);
85 84
		
86
		if(rois != null && rois.size() > 0) {
85
		if(roisEPSG != null) {
87 86
			gridBagConstraints1.gridy = 3;
88 87
			add(getROIsCheck(), gridBagConstraints1);
89 88
		}
......
164 163
			if(paramType == RasterDataStore.class) {
165 164
				task.addParam(paramName, (RasterDataStore)inputStore);
166 165
			}
167
			if(paramType == String.class) {
166
			if(paramName.equals("PATH")) {
168 167
				String filename = newLayerPanel.getDirectorySelected() + File.separator + newLayerPanel.getFileSelected();
169 168
				if(!filename.endsWith(".tif"))
170 169
					filename += ".tif";
......
181 180
			}
182 181
			
183 182
			if(getROIsCheck().isSelected()) {
184
				if(paramType == List.class) {
185
					task.addParam(paramName, rois);
183
				if(paramName.equals("ROI_EPSG")) {
184
					task.addParam(paramName, roisEPSG);
186 185
				}
187 186
			}
188 187
		}

Also available in: Unified diff