Revision 1864 org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/raster/process/FilterProcess.java

View differences:

FilterProcess.java
90 90
		do {
91 91
			// Si tiene una tabla de color asignamos las tres bandas
92 92
			if (grid.getFilterList().isActive("colortable")) {
93
				colorInterpretation = rManager.createColorInterpretation(new String[] { ColorInterpretation.RED_BAND, ColorInterpretation.GREEN_BAND, ColorInterpretation.BLUE_BAND });
93
				colorInterpretation = rManager.getDataStructFactory().createColorInterpretation(
94
						new String[] { 
95
								ColorInterpretation.RED_BAND, 
96
								ColorInterpretation.GREEN_BAND, 
97
								ColorInterpretation.BLUE_BAND 
98
								});
94 99
				break;
95 100
			}
96 101

  
......
109 114
				}
110 115
				colorInterp[i] = rasterDataSource.getColorInterpretation().getValues()[i];
111 116
			}
112
			colorInterpretation = rManager.createColorInterpretation(colorInterp);
117
			colorInterpretation = rManager.getDataStructFactory().createColorInterpretation(colorInterp);
113 118
		} while (false);
114 119

  
115 120
		return colorInterpretation;
......
179 184
			//Calculo de la interpretaci?n de color
180 185
			ColorInterpretation colorInterpretation = null;
181 186
			if(lyr.existColorTable() || buffer.getBandCount() > 1)
182
				colorInterpretation = rManager.createColorInterpretation(new String[] { ColorInterpretation.RED_BAND, ColorInterpretation.GREEN_BAND, ColorInterpretation.BLUE_BAND });
187
				colorInterpretation = rManager.getDataStructFactory().createColorInterpretation(
188
						new String[] { ColorInterpretation.RED_BAND, ColorInterpretation.GREEN_BAND, ColorInterpretation.BLUE_BAND });
183 189
			else if(buffer.getBandCount() == 2) {
184 190
				renderBands = lyr.getRender().getRenderBands();
185 191
				String[] ci = new String[renderBands.length];
......
191 197
					default: ci[i] = ColorInterpretation.UNDEF_BAND; 
192 198
					}
193 199
				}
194
				colorInterpretation = rManager.createColorInterpretation(ci);
200
				colorInterpretation = rManager.getDataStructFactory().createColorInterpretation(ci);
195 201
			} else
196
				colorInterpretation = rManager.createColorInterpretation(new String[] { ColorInterpretation.GRAY_BAND });
202
				colorInterpretation = rManager.getDataStructFactory().createColorInterpretation(
203
						new String[] { ColorInterpretation.GRAY_BAND });
197 204
			
198 205
			//Si la imagen original ten?a una banda de transparencia se asignar? esta. Si los filtros generados
199 206
			//crean una banda se mezclar? con la original. 
......
207 214
					alpha = rManager.getColorConversion().mergeTransparencyBuffers(alpha, grid.getFilterList().getAlphaBand());
208 215
				writerBufferServer.setAlphaBuffer(alpha);
209 216
				//Asignamos la interpretaci?n de color de la banda alpha				
210
				ColorInterpretation alphaI = rManager.createColorInterpretation(new String[] { ColorInterpretation.ALPHA_BAND });
217
				ColorInterpretation alphaI = rManager.getDataStructFactory().createColorInterpretation(
218
						new String[] { ColorInterpretation.ALPHA_BAND });
211 219
				colorInterpretation.addColorInterpretation(alphaI);
212 220
				nbands ++;
213 221
			} else if(grid.getFilterList().getAlphaBand() != null) {
214 222
				writerBufferServer.setAlphaBuffer(grid.getFilterList().getAlphaBand());
215 223
				//Asignamos la interpretaci?n de color de la banda alpha
216
				ColorInterpretation alphaI = rManager.createColorInterpretation(new String[] { ColorInterpretation.ALPHA_BAND });
224
				ColorInterpretation alphaI = rManager.getDataStructFactory().createColorInterpretation(
225
						new String[] { ColorInterpretation.ALPHA_BAND });
217 226
				colorInterpretation.addColorInterpretation(alphaI);
218 227
				nbands ++;
219 228
			}

Also available in: Unified diff