Revision 2308 org.gvsig.raster/branches/org.gvsig.raster_dataaccess_refactoring/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/grid/filter/band/ColorBalanceCMYManager.java
ColorBalanceCMYManager.java | ||
---|---|---|
39 | 39 |
/** |
40 | 40 |
* Gestor del filtro de balance de color |
41 | 41 |
* |
42 |
* @version 30/11/2007 |
|
43 | 42 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
44 | 43 |
*/ |
45 | 44 |
public class ColorBalanceCMYManager implements RasterFilterListManager { |
... | ... | |
110 | 109 |
return filters; |
111 | 110 |
} |
112 | 111 |
|
113 |
/* |
|
114 |
* (non-Javadoc) |
|
115 |
* @see org.gvsig.fmap.dal.coverage.grid.RasterFilterListManager#getFilterList() |
|
116 |
*/ |
|
117 | 112 |
public RasterFilterList getFilterList() { |
118 | 113 |
return filterList; |
119 | 114 |
} |
120 | 115 |
|
121 |
/* |
|
122 |
* (non-Javadoc) |
|
123 |
* @see org.gvsig.fmap.dal.coverage.grid.RasterFilterListManager#setFilterList(org.gvsig.fmap.dal.coverage.grid.RasterFilterList) |
|
124 |
*/ |
|
125 | 116 |
public void setFilterList(RasterFilterList filterList) { |
126 | 117 |
this.filterList = filterList; |
127 | 118 |
} |
... | ... | |
131 | 122 |
if (ColorBalanceCMYFilter.class.isAssignableFrom(classFilter)) { |
132 | 123 |
double cyan = 0, magenta = 0, yellow = 0; |
133 | 124 |
boolean luminosity = false; |
134 |
int[] renderBands = { 0, 1, 2 }; |
|
125 |
int[] renderBands = { 0, 1, 2, 3 };
|
|
135 | 126 |
|
136 | 127 |
for (int i = 0; i < params.getNumParams(); i++) { |
137 | 128 |
if (((ParamImpl)params.getParam(i)).getId().equals("RenderBands") && |
... | ... | |
142 | 133 |
renderBands[2] = new Integer(bands[2]).intValue(); |
143 | 134 |
continue; |
144 | 135 |
} |
136 |
if (((ParamImpl)params.getParam(i)).getId().equals("alphaBand") && |
|
137 |
((ParamImpl)params.getParam(i)).getDefaultValue() instanceof Integer) { |
|
138 |
renderBands[3] = (Integer)((ParamImpl)params.getParam(i)).getDefaultValue(); |
|
139 |
continue; |
|
140 |
} |
|
145 | 141 |
if (((ParamImpl)params.getParam(i)).getId().equals("cyan")) |
146 | 142 |
cyan = ((Double) ((ParamImpl)params.getParam(i)).getDefaultValue()).doubleValue(); |
147 | 143 |
if (((ParamImpl)params.getParam(i)).getId().equals("magenta")) |
... | ... | |
156 | 152 |
} |
157 | 153 |
} |
158 | 154 |
|
159 |
/* |
|
160 |
* (non-Javadoc) |
|
161 |
* @see org.gvsig.fmap.dal.coverage.grid.RasterFilterListManager#createFilter(org.gvsig.fmap.dal.coverage.datastruct.Params) |
|
162 |
*/ |
|
163 | 155 |
public RasterFilter createFilter(Params params) { |
164 | 156 |
int[] renderBands = { 0, 1, 2 }; |
165 | 157 |
String b = ((String) params.getParamById("RenderBands").getDefaultValue()); |
... | ... | |
181 | 173 |
return filter; |
182 | 174 |
} |
183 | 175 |
|
184 |
/* |
|
185 |
* (non-Javadoc) |
|
186 |
* @see org.gvsig.fmap.dal.coverage.grid.RasterFilterListManager#addFilter(org.gvsig.fmap.dal.coverage.datastruct.Params) |
|
187 |
*/ |
|
188 | 176 |
public void addFilter(Params params) throws FilterTypeException { |
189 | 177 |
addFilter(ColorBalanceCMYFilter.class, params); |
190 | 178 |
} |
191 | 179 |
|
192 |
/* |
|
193 |
* (non-Javadoc) |
|
194 |
* @see org.gvsig.raster.grid.filter.IRasterFilterListManager#createFilterListFromStrings(java.util.ArrayList, java.lang.String, int) |
|
195 |
*/ |
|
196 | 180 |
public int createFilterListFromStrings(List<String> filters, String fil, int filteri) { |
197 | 181 |
return filteri; |
198 | 182 |
} |
199 | 183 |
|
200 |
/* |
|
201 |
* (non-Javadoc) |
|
202 |
* @see org.gvsig.raster.grid.filter.IRasterFilterListManager#getStringsFromFilterList(java.util.ArrayList, org.gvsig.raster.grid.filter.RasterFilter) |
|
203 |
*/ |
|
204 | 184 |
public List<String> getStringsFromFilterList(List<String> filterList, RasterFilter rf) { |
205 | 185 |
return filterList; |
206 | 186 |
} |
Also available in: Unified diff