11 |
13 Sep 07 |
nicklas |
1 |
///////////////////////////////////////////////////////////////// |
11 |
13 Sep 07 |
nicklas |
2 |
// |
11 |
13 Sep 07 |
nicklas |
// Copyright (C) 2005 Affymetrix, Inc. |
11 |
13 Sep 07 |
nicklas |
4 |
// |
11 |
13 Sep 07 |
nicklas |
// This library is free software; you can redistribute it and/or modify |
11 |
13 Sep 07 |
nicklas |
// it under the terms of the GNU Lesser General Public License as published |
11 |
13 Sep 07 |
nicklas |
// by the Free Software Foundation; either version 2.1 of the License, |
11 |
13 Sep 07 |
nicklas |
// or (at your option) any later version. |
11 |
13 Sep 07 |
nicklas |
9 |
// |
11 |
13 Sep 07 |
nicklas |
// This library is distributed in the hope that it will be useful, but |
11 |
13 Sep 07 |
nicklas |
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
11 |
13 Sep 07 |
nicklas |
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License |
11 |
13 Sep 07 |
nicklas |
// for more details. |
11 |
13 Sep 07 |
nicklas |
14 |
// |
11 |
13 Sep 07 |
nicklas |
// You should have received a copy of the GNU Lesser General Public License |
11 |
13 Sep 07 |
nicklas |
// along with this library; if not, write to the Free Software Foundation, Inc., |
11 |
13 Sep 07 |
nicklas |
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
11 |
13 Sep 07 |
nicklas |
18 |
// |
11 |
13 Sep 07 |
nicklas |
19 |
///////////////////////////////////////////////////////////////// |
11 |
13 Sep 07 |
nicklas |
20 |
|
11 |
13 Sep 07 |
nicklas |
21 |
|
11 |
13 Sep 07 |
nicklas |
22 |
package affymetrix.calvin.data; |
11 |
13 Sep 07 |
nicklas |
23 |
|
11 |
13 Sep 07 |
nicklas |
24 |
import java.util.*; |
11 |
13 Sep 07 |
nicklas |
25 |
import affymetrix.calvin.utils.*; |
11 |
13 Sep 07 |
nicklas |
26 |
import affymetrix.calvin.parameter.*; |
11 |
13 Sep 07 |
nicklas |
27 |
|
11 |
13 Sep 07 |
nicklas |
/** This is the container class for CEL data. */ |
11 |
13 Sep 07 |
nicklas |
29 |
public class CELData { |
11 |
13 Sep 07 |
nicklas |
30 |
|
11 |
13 Sep 07 |
nicklas |
/** Data Group name */ |
11 |
13 Sep 07 |
nicklas |
32 |
public static final String CelDataGroupName = "Default Group"; |
11 |
13 Sep 07 |
nicklas |
33 |
|
11 |
13 Sep 07 |
nicklas |
/** Name of the intensity data set */ |
11 |
13 Sep 07 |
nicklas |
35 |
public static final String CelIntensityLabel = "Intensity"; |
11 |
13 Sep 07 |
nicklas |
36 |
|
11 |
13 Sep 07 |
nicklas |
/** Name of the standard deviation data set */ |
11 |
13 Sep 07 |
nicklas |
38 |
public static final String CelStdDevLabel = "StdDev"; |
11 |
13 Sep 07 |
nicklas |
39 |
|
11 |
13 Sep 07 |
nicklas |
/** Name of the pixel data set */ |
11 |
13 Sep 07 |
nicklas |
41 |
public static final String CelPixelLabel = "Pixel"; |
11 |
13 Sep 07 |
nicklas |
42 |
|
11 |
13 Sep 07 |
nicklas |
/** Name of the outlier data set */ |
11 |
13 Sep 07 |
nicklas |
44 |
public static final String CelOutlierLabel = "Outlier"; |
11 |
13 Sep 07 |
nicklas |
45 |
|
11 |
13 Sep 07 |
nicklas |
/** Name of the mask data set */ |
11 |
13 Sep 07 |
nicklas |
47 |
public static final String CelMaskLabel = "Mask"; |
11 |
13 Sep 07 |
nicklas |
48 |
|
11 |
13 Sep 07 |
nicklas |
/** Cel file version */ |
11 |
13 Sep 07 |
nicklas |
50 |
public static final byte CurrentCelFileVersion = 1; |
11 |
13 Sep 07 |
nicklas |
51 |
|
11 |
13 Sep 07 |
nicklas |
/** The row parameter label. */ |
11 |
13 Sep 07 |
nicklas |
53 |
private static String CelRowsLabel = "affymetrix-cel-rows"; |
11 |
13 Sep 07 |
nicklas |
54 |
|
11 |
13 Sep 07 |
nicklas |
/** The col parameter label. */ |
11 |
13 Sep 07 |
nicklas |
56 |
private static String CelColsLabel = "affymetrix-cel-cols"; |
11 |
13 Sep 07 |
nicklas |
57 |
|
11 |
13 Sep 07 |
nicklas |
/** The attribute name of the cel file version number */ |
11 |
13 Sep 07 |
nicklas |
59 |
private static String CelFileVersionNumberName = "affymetrix-file-version"; |
11 |
13 Sep 07 |
nicklas |
60 |
|
11 |
13 Sep 07 |
nicklas |
/** The guid for the CEL file. */ |
11 |
13 Sep 07 |
nicklas |
62 |
private static String INTENSITY_DATA_TYPE = "affymetrix-calvin-intensity"; |
11 |
13 Sep 07 |
nicklas |
63 |
|
11 |
13 Sep 07 |
nicklas |
/** Default constructor */ |
11 |
13 Sep 07 |
nicklas |
65 |
public CELData() { |
11 |
13 Sep 07 |
nicklas |
66 |
dpInten = null; |
11 |
13 Sep 07 |
nicklas |
67 |
dpStdev = null; |
11 |
13 Sep 07 |
nicklas |
68 |
dpPixels = null; |
11 |
13 Sep 07 |
nicklas |
69 |
outliers = null; |
11 |
13 Sep 07 |
nicklas |
70 |
masked = null; |
11 |
13 Sep 07 |
nicklas |
71 |
genericData = new GenericData(); |
11 |
13 Sep 07 |
nicklas |
72 |
clear(); |
11 |
13 Sep 07 |
nicklas |
73 |
} |
11 |
13 Sep 07 |
nicklas |
74 |
|
11 |
13 Sep 07 |
nicklas |
/** Constructor |
11 |
13 Sep 07 |
nicklas |
* @param filename Name of the cel file. |
11 |
13 Sep 07 |
nicklas |
77 |
*/ |
11 |
13 Sep 07 |
nicklas |
78 |
public CELData(String filename) { |
11 |
13 Sep 07 |
nicklas |
79 |
|
11 |
13 Sep 07 |
nicklas |
80 |
dpInten = null; |
11 |
13 Sep 07 |
nicklas |
81 |
dpStdev = null; |
11 |
13 Sep 07 |
nicklas |
82 |
dpPixels = null; |
11 |
13 Sep 07 |
nicklas |
83 |
outliers = null; |
11 |
13 Sep 07 |
nicklas |
84 |
masked = null; |
11 |
13 Sep 07 |
nicklas |
85 |
|
11 |
13 Sep 07 |
nicklas |
86 |
genericData = new GenericData(); |
11 |
13 Sep 07 |
nicklas |
87 |
clear(); |
11 |
13 Sep 07 |
nicklas |
88 |
setFilename(filename); |
11 |
13 Sep 07 |
nicklas |
89 |
genericData.getHeader().getGenericDataHdr().setFileTypeId(INTENSITY_DATA_TYPE); |
11 |
13 Sep 07 |
nicklas |
90 |
DataGroupHeader dcHdr = new DataGroupHeader(CelDataGroupName); |
11 |
13 Sep 07 |
nicklas |
91 |
genericData.getHeader().addDataGroupHdr(dcHdr); |
11 |
13 Sep 07 |
nicklas |
92 |
} |
11 |
13 Sep 07 |
nicklas |
93 |
|
11 |
13 Sep 07 |
nicklas |
/** Generic layer object */ |
11 |
13 Sep 07 |
nicklas |
95 |
private GenericData genericData; |
11 |
13 Sep 07 |
nicklas |
96 |
private boolean setIntensityMetaData; |
11 |
13 Sep 07 |
nicklas |
97 |
private boolean setStdDevMetaData; |
11 |
13 Sep 07 |
nicklas |
98 |
private boolean setPixelMetaData; |
11 |
13 Sep 07 |
nicklas |
99 |
private boolean setOutlierMetaData; |
11 |
13 Sep 07 |
nicklas |
100 |
private boolean setMaskMetaData; |
11 |
13 Sep 07 |
nicklas |
101 |
private int intensityColumnType; |
11 |
13 Sep 07 |
nicklas |
102 |
|
11 |
13 Sep 07 |
nicklas |
// DataSet cache - initialized on first use and Delete in destructor |
11 |
13 Sep 07 |
nicklas |
/** Intensity DataSet */ |
11 |
13 Sep 07 |
nicklas |
105 |
private DataSet dpInten; |
11 |
13 Sep 07 |
nicklas |
/** Stdev DataSet */ |
11 |
13 Sep 07 |
nicklas |
107 |
private DataSet dpStdev; |
11 |
13 Sep 07 |
nicklas |
/** NumPixels DataSet */ |
11 |
13 Sep 07 |
nicklas |
109 |
private DataSet dpPixels; |
11 |
13 Sep 07 |
nicklas |
/** Indicates whether an attempt to read the outlier data set has been made. */ |
11 |
13 Sep 07 |
nicklas |
111 |
private boolean outlierPlaneRead; |
11 |
13 Sep 07 |
nicklas |
/** A set of outlier cell coordinates. */ |
11 |
13 Sep 07 |
nicklas |
113 |
private Map /*XYCoord*/ outliers; |
11 |
13 Sep 07 |
nicklas |
/** Indicates whether an attempt to read the mask data set has been made. */ |
11 |
13 Sep 07 |
nicklas |
115 |
private boolean maskPlaneRead; |
11 |
13 Sep 07 |
nicklas |
/** A set of masked cell coordinates. */ |
11 |
13 Sep 07 |
nicklas |
117 |
private Map /*XYCoord*/ masked; |
11 |
13 Sep 07 |
nicklas |
/** keep rows from being read from the header all the time */ |
11 |
13 Sep 07 |
nicklas |
119 |
private int cachedRows; |
11 |
13 Sep 07 |
nicklas |
/** keep cols from being read from the header all the time */ |
11 |
13 Sep 07 |
nicklas |
121 |
private int cachedCols; |
11 |
13 Sep 07 |
nicklas |
122 |
|
11 |
13 Sep 07 |
nicklas |
/** Clear the object members |
11 |
13 Sep 07 |
nicklas |
124 |
*/ |
11 |
13 Sep 07 |
nicklas |
125 |
public void clear() { |
11 |
13 Sep 07 |
nicklas |
126 |
genericData.getHeader().clear(); |
11 |
13 Sep 07 |
nicklas |
127 |
setIntensityMetaData = false; |
11 |
13 Sep 07 |
nicklas |
128 |
setStdDevMetaData = false; |
11 |
13 Sep 07 |
nicklas |
129 |
setPixelMetaData = false; |
11 |
13 Sep 07 |
nicklas |
130 |
setOutlierMetaData = false; |
11 |
13 Sep 07 |
nicklas |
131 |
setMaskMetaData = false; |
11 |
13 Sep 07 |
nicklas |
132 |
|
11 |
13 Sep 07 |
nicklas |
133 |
if (dpInten != null){ dpInten.delete(); dpInten = null; } |
11 |
13 Sep 07 |
nicklas |
134 |
if (dpStdev != null) { dpStdev.delete(); dpStdev = null; } |
11 |
13 Sep 07 |
nicklas |
135 |
if (dpPixels != null) { dpPixels.delete(); dpPixels = null; } |
11 |
13 Sep 07 |
nicklas |
136 |
outlierPlaneRead = false; |
11 |
13 Sep 07 |
nicklas |
137 |
outliers = null; |
11 |
13 Sep 07 |
nicklas |
138 |
maskPlaneRead = false; |
11 |
13 Sep 07 |
nicklas |
139 |
masked = null; |
11 |
13 Sep 07 |
nicklas |
140 |
cachedRows = -1; |
11 |
13 Sep 07 |
nicklas |
141 |
cachedCols = -1; |
11 |
13 Sep 07 |
nicklas |
142 |
intensityColumnType = -1; |
11 |
13 Sep 07 |
nicklas |
143 |
} |
11 |
13 Sep 07 |
nicklas |
144 |
|
11 |
13 Sep 07 |
nicklas |
/** set the file name |
11 |
13 Sep 07 |
nicklas |
* @param p file name |
11 |
13 Sep 07 |
nicklas |
147 |
*/ |
11 |
13 Sep 07 |
nicklas |
148 |
public void setFilename(String p) { genericData.getHeader().setFilename(p); } |
11 |
13 Sep 07 |
nicklas |
149 |
|
11 |
13 Sep 07 |
nicklas |
/** get the file name |
11 |
13 Sep 07 |
nicklas |
* @return file name |
11 |
13 Sep 07 |
nicklas |
152 |
*/ |
11 |
13 Sep 07 |
nicklas |
153 |
public String getFilename() { return genericData.getHeader().getFilename(); } |
11 |
13 Sep 07 |
nicklas |
154 |
|
11 |
13 Sep 07 |
nicklas |
155 |
public FileHeader getFileHeader() { return genericData.getHeader(); } |
11 |
13 Sep 07 |
nicklas |
156 |
|
11 |
13 Sep 07 |
nicklas |
/** get the version of the CEL file |
11 |
13 Sep 07 |
nicklas |
* @return CEL file version |
11 |
13 Sep 07 |
nicklas |
159 |
*/ |
11 |
13 Sep 07 |
nicklas |
160 |
public byte getVersion() { |
11 |
13 Sep 07 |
nicklas |
161 |
GenericDataHeader hdr = genericData.getHeader().getGenericDataHdr(); |
11 |
13 Sep 07 |
nicklas |
162 |
ParameterNameValue paramType=hdr.findNameValParam(CelFileVersionNumberName); |
11 |
13 Sep 07 |
nicklas |
163 |
if (paramType != null) |
11 |
13 Sep 07 |
nicklas |
164 |
{ |
11 |
13 Sep 07 |
nicklas |
165 |
return paramType.getValueUInt8(); |
11 |
13 Sep 07 |
nicklas |
166 |
} |
11 |
13 Sep 07 |
nicklas |
167 |
return 0; |
11 |
13 Sep 07 |
nicklas |
168 |
} |
11 |
13 Sep 07 |
nicklas |
169 |
|
11 |
13 Sep 07 |
nicklas |
/** get the array type |
11 |
13 Sep 07 |
nicklas |
* @return array type name |
11 |
13 Sep 07 |
nicklas |
172 |
*/ |
11 |
13 Sep 07 |
nicklas |
173 |
public String getArrayType() { |
11 |
13 Sep 07 |
nicklas |
174 |
return getWStringFromGenericHdr(AffymetrixParameterConsts.ARRAY_TYPE_PARAM_NAME); |
11 |
13 Sep 07 |
nicklas |
175 |
} |
11 |
13 Sep 07 |
nicklas |
176 |
|
11 |
13 Sep 07 |
nicklas |
/** Get the master file |
11 |
13 Sep 07 |
nicklas |
* @return The name of the master file. |
11 |
13 Sep 07 |
nicklas |
179 |
*/ |
11 |
13 Sep 07 |
nicklas |
180 |
public String getMasterFileName() { |
11 |
13 Sep 07 |
nicklas |
181 |
return getWStringFromGenericHdr(AffymetrixParameterConsts.MASTER_FILE_PARAM_NAME); |
11 |
13 Sep 07 |
nicklas |
182 |
} |
11 |
13 Sep 07 |
nicklas |
183 |
|
11 |
13 Sep 07 |
nicklas |
/** Get the library package |
11 |
13 Sep 07 |
nicklas |
* @return The name of the library package. |
11 |
13 Sep 07 |
nicklas |
186 |
*/ |
11 |
13 Sep 07 |
nicklas |
187 |
public String getLibraryPackageName() { |
11 |
13 Sep 07 |
nicklas |
188 |
return getWStringFromGenericHdr(AffymetrixParameterConsts.LIBRARY_PACKAGE_PARAM_NAME); |
11 |
13 Sep 07 |
nicklas |
189 |
} |
11 |
13 Sep 07 |
nicklas |
190 |
|
11 |
13 Sep 07 |
nicklas |
/** get the name of the algorithm used to generate the results. |
11 |
13 Sep 07 |
nicklas |
* @return Algorithm name |
11 |
13 Sep 07 |
nicklas |
193 |
*/ |
11 |
13 Sep 07 |
nicklas |
194 |
public String getAlgorithmName() { |
11 |
13 Sep 07 |
nicklas |
195 |
return getWStringFromGenericHdr(AffymetrixParameterConsts.ALGORITHM_NAME_PARAM_NAME); |
11 |
13 Sep 07 |
nicklas |
196 |
} |
11 |
13 Sep 07 |
nicklas |
197 |
|
11 |
13 Sep 07 |
nicklas |
/** get the number of rows of cells on the array. |
11 |
13 Sep 07 |
nicklas |
* @return Number of rows of cells. |
11 |
13 Sep 07 |
nicklas |
200 |
*/ |
11 |
13 Sep 07 |
nicklas |
201 |
public int getRows() { |
11 |
13 Sep 07 |
nicklas |
202 |
if (cachedRows == -1) |
11 |
13 Sep 07 |
nicklas |
203 |
cachedRows = getInt32FromGenericHdrParameterList(CelRowsLabel); |
11 |
13 Sep 07 |
nicklas |
204 |
return cachedRows; |
11 |
13 Sep 07 |
nicklas |
205 |
} |
11 |
13 Sep 07 |
nicklas |
206 |
|
11 |
13 Sep 07 |
nicklas |
/** get the number of columns of cells on the array. |
11 |
13 Sep 07 |
nicklas |
* @return Number of columns of cells. |
11 |
13 Sep 07 |
nicklas |
209 |
*/ |
11 |
13 Sep 07 |
nicklas |
210 |
public int getCols() { |
11 |
13 Sep 07 |
nicklas |
211 |
if (cachedCols == -1) |
11 |
13 Sep 07 |
nicklas |
212 |
cachedCols = getInt32FromGenericHdrParameterList(CelColsLabel); |
11 |
13 Sep 07 |
nicklas |
213 |
return cachedCols; |
11 |
13 Sep 07 |
nicklas |
214 |
} |
11 |
13 Sep 07 |
nicklas |
215 |
|
11 |
13 Sep 07 |
nicklas |
/** Return the number of cells on the array. |
11 |
13 Sep 07 |
nicklas |
* This is the number of the intensity data elements and is == getRows() * getCols() |
11 |
13 Sep 07 |
nicklas |
* Stdev, NumPixels, Outlier and Masked data is optional, but if present they will have getNumCells elements. |
11 |
13 Sep 07 |
nicklas |
* @return Number of cells in the array. |
11 |
13 Sep 07 |
nicklas |
220 |
*/ |
11 |
13 Sep 07 |
nicklas |
221 |
public int getNumCells() { |
11 |
13 Sep 07 |
nicklas |
222 |
int rows = 0; |
11 |
13 Sep 07 |
nicklas |
223 |
try |
11 |
13 Sep 07 |
nicklas |
224 |
{ |
11 |
13 Sep 07 |
nicklas |
225 |
prepareIntensityPlane(); |
11 |
13 Sep 07 |
nicklas |
226 |
if (dpInten != null) |
11 |
13 Sep 07 |
nicklas |
227 |
{ |
11 |
13 Sep 07 |
nicklas |
228 |
rows = dpInten.getRows(); |
11 |
13 Sep 07 |
nicklas |
229 |
} |
11 |
13 Sep 07 |
nicklas |
230 |
} |
11 |
13 Sep 07 |
nicklas |
231 |
catch(Throwable t) |
11 |
13 Sep 07 |
nicklas |
232 |
{ |
11 |
13 Sep 07 |
nicklas |
233 |
} |
11 |
13 Sep 07 |
nicklas |
234 |
return rows; |
11 |
13 Sep 07 |
nicklas |
235 |
} |
11 |
13 Sep 07 |
nicklas |
236 |
|
11 |
13 Sep 07 |
nicklas |
/** Return the algorithm parameters. The algorithm parameter prefix is removed from the name. |
11 |
13 Sep 07 |
nicklas |
* @return Vector with algorithm parameters. |
11 |
13 Sep 07 |
nicklas |
239 |
*/ |
11 |
13 Sep 07 |
nicklas |
240 |
public Vector getAlgorithmParameters() { |
11 |
13 Sep 07 |
nicklas |
241 |
Vector algParams = new Vector(); |
11 |
13 Sep 07 |
nicklas |
242 |
Vector allParams = genericData.getHeader().getGenericDataHdr().getNameValParams(); |
11 |
13 Sep 07 |
nicklas |
243 |
for (int i=0; i<allParams.size(); i++) |
11 |
13 Sep 07 |
nicklas |
244 |
{ |
11 |
13 Sep 07 |
nicklas |
245 |
ParameterNameValue param = (ParameterNameValue) allParams.elementAt(i); |
11 |
13 Sep 07 |
nicklas |
246 |
String name = param.getName(); |
11 |
13 Sep 07 |
nicklas |
247 |
if (name.startsWith(AffymetrixParameterConsts.ALGORITHM_PARAM_NAME_PREFIX) == true) |
11 |
13 Sep 07 |
nicklas |
248 |
{ |
11 |
13 Sep 07 |
nicklas |
249 |
ParameterNameValue algParam = new ParameterNameValue(param); |
11 |
13 Sep 07 |
nicklas |
250 |
algParam.setName( name.substring(AffymetrixParameterConsts.ALGORITHM_PARAM_NAME_PREFIX.length(), name.length())); |
11 |
13 Sep 07 |
nicklas |
251 |
algParams.add(algParam); |
11 |
13 Sep 07 |
nicklas |
252 |
} |
11 |
13 Sep 07 |
nicklas |
253 |
} |
11 |
13 Sep 07 |
nicklas |
254 |
return algParams; |
11 |
13 Sep 07 |
nicklas |
255 |
|
11 |
13 Sep 07 |
nicklas |
256 |
} |
11 |
13 Sep 07 |
nicklas |
257 |
|
11 |
13 Sep 07 |
nicklas |
/** Return an algorithm parameter given a name. |
11 |
13 Sep 07 |
nicklas |
* @param name Name of the parameter to find. |
11 |
13 Sep 07 |
nicklas |
* @return The found parameter. |
11 |
13 Sep 07 |
nicklas |
261 |
*/ |
11 |
13 Sep 07 |
nicklas |
262 |
public ParameterNameValue findAlgorithmParameter(String name) { |
11 |
13 Sep 07 |
nicklas |
263 |
String paramName = AffymetrixParameterConsts.ALGORITHM_PARAM_NAME_PREFIX + name; |
11 |
13 Sep 07 |
nicklas |
264 |
GenericDataHeader hdr = genericData.getHeader().getGenericDataHdr(); |
11 |
13 Sep 07 |
nicklas |
265 |
ParameterNameValue param = hdr.findNameValParam(paramName); |
11 |
13 Sep 07 |
nicklas |
266 |
if (param != null) |
11 |
13 Sep 07 |
nicklas |
267 |
{ |
11 |
13 Sep 07 |
nicklas |
268 |
ParameterNameValue foundParam = new ParameterNameValue(param); |
11 |
13 Sep 07 |
nicklas |
269 |
int len = AffymetrixParameterConsts.ALGORITHM_PARAM_NAME_PREFIX.length(); |
11 |
13 Sep 07 |
nicklas |
270 |
foundParam.setName(param.getName().substring(len)); |
11 |
13 Sep 07 |
nicklas |
271 |
return foundParam; |
11 |
13 Sep 07 |
nicklas |
272 |
} |
11 |
13 Sep 07 |
nicklas |
273 |
return null; |
11 |
13 Sep 07 |
nicklas |
274 |
} |
11 |
13 Sep 07 |
nicklas |
275 |
|
11 |
13 Sep 07 |
nicklas |
/** get the cell intensity. |
11 |
13 Sep 07 |
nicklas |
* @param cellIdx Index of the cell. |
11 |
13 Sep 07 |
nicklas |
* @return The intensity of the cell. |
11 |
13 Sep 07 |
nicklas |
279 |
*/ |
11 |
13 Sep 07 |
nicklas |
280 |
public float getIntensity(int cellIdx) { |
11 |
13 Sep 07 |
nicklas |
281 |
prepareIntensityPlane(); |
11 |
13 Sep 07 |
nicklas |
282 |
if (dpInten != null) |
11 |
13 Sep 07 |
nicklas |
283 |
{ |
11 |
13 Sep 07 |
nicklas |
284 |
if (intensityColumnType == ColumnInfo.FloatColType) |
11 |
13 Sep 07 |
nicklas |
285 |
return dpInten.getDataFloat(cellIdx, 0); |
11 |
13 Sep 07 |
nicklas |
286 |
else |
11 |
13 Sep 07 |
nicklas |
287 |
return dpInten.getDataShort(cellIdx, 0); |
11 |
13 Sep 07 |
nicklas |
288 |
} |
11 |
13 Sep 07 |
nicklas |
289 |
return 0.0f; |
11 |
13 Sep 07 |
nicklas |
290 |
} |
11 |
13 Sep 07 |
nicklas |
291 |
|
11 |
13 Sep 07 |
nicklas |
/** get the cell stdv. |
11 |
13 Sep 07 |
nicklas |
* @param cellIdx Index of the cell. |
11 |
13 Sep 07 |
nicklas |
* @return The stdv of the cell. |
11 |
13 Sep 07 |
nicklas |
295 |
*/ |
11 |
13 Sep 07 |
nicklas |
296 |
public float getStdv(int cellIdx) { |
11 |
13 Sep 07 |
nicklas |
297 |
prepareStdevPlane(); |
11 |
13 Sep 07 |
nicklas |
298 |
if (dpStdev != null) |
11 |
13 Sep 07 |
nicklas |
299 |
return dpStdev.getDataFloat(cellIdx, 0); |
11 |
13 Sep 07 |
nicklas |
300 |
return 0.0f; |
11 |
13 Sep 07 |
nicklas |
301 |
} |
11 |
13 Sep 07 |
nicklas |
302 |
|
11 |
13 Sep 07 |
nicklas |
/** get the cell stdv. |
11 |
13 Sep 07 |
nicklas |
* @param cellIdx Index of the cell. |
11 |
13 Sep 07 |
nicklas |
* @return The stdv of the cell. |
11 |
13 Sep 07 |
nicklas |
306 |
*/ |
11 |
13 Sep 07 |
nicklas |
307 |
public short getPixels(int cellIdx) { |
11 |
13 Sep 07 |
nicklas |
308 |
prepareNumPixelPlane(); |
11 |
13 Sep 07 |
nicklas |
309 |
if (dpPixels != null) |
11 |
13 Sep 07 |
nicklas |
310 |
return dpPixels.getDataShort(cellIdx, 0); |
11 |
13 Sep 07 |
nicklas |
311 |
return 0; |
11 |
13 Sep 07 |
nicklas |
312 |
} |
11 |
13 Sep 07 |
nicklas |
313 |
|
11 |
13 Sep 07 |
nicklas |
/** Indicates whether there are standard deviation values. |
11 |
13 Sep 07 |
nicklas |
* @return True if there are standard deviation values. |
11 |
13 Sep 07 |
nicklas |
316 |
*/ |
11 |
13 Sep 07 |
nicklas |
317 |
public boolean hasStdev() { |
11 |
13 Sep 07 |
nicklas |
318 |
DataSetHeader dph = findDataSetHeader(CelStdDevLabel); |
11 |
13 Sep 07 |
nicklas |
319 |
if (dph != null) |
11 |
13 Sep 07 |
nicklas |
320 |
return (dph.getRowCnt() > 0); |
11 |
13 Sep 07 |
nicklas |
321 |
return false; |
11 |
13 Sep 07 |
nicklas |
322 |
} |
11 |
13 Sep 07 |
nicklas |
323 |
|
11 |
13 Sep 07 |
nicklas |
/** Indicates whether there are number of pixel values. |
11 |
13 Sep 07 |
nicklas |
* @return True if there are number of pixels values. |
11 |
13 Sep 07 |
nicklas |
326 |
*/ |
11 |
13 Sep 07 |
nicklas |
327 |
public boolean hasNumPixels() { |
11 |
13 Sep 07 |
nicklas |
328 |
DataSetHeader dph = findDataSetHeader(CelPixelLabel); |
11 |
13 Sep 07 |
nicklas |
329 |
if (dph != null) |
11 |
13 Sep 07 |
nicklas |
330 |
return (dph.getRowCnt() > 0); |
11 |
13 Sep 07 |
nicklas |
331 |
return false; |
11 |
13 Sep 07 |
nicklas |
332 |
} |
11 |
13 Sep 07 |
nicklas |
333 |
|
11 |
13 Sep 07 |
nicklas |
/** Return a reference to the generic layer object |
11 |
13 Sep 07 |
nicklas |
* @return Generic layer object |
11 |
13 Sep 07 |
nicklas |
336 |
*/ |
11 |
13 Sep 07 |
nicklas |
337 |
public GenericData getGenericData() { return genericData; } // should be a friend method only |
11 |
13 Sep 07 |
nicklas |
338 |
|
11 |
13 Sep 07 |
nicklas |
/** Prepare to read intensity data */ |
11 |
13 Sep 07 |
nicklas |
340 |
private void prepareIntensityPlane() { |
11 |
13 Sep 07 |
nicklas |
341 |
if (dpInten == null) |
11 |
13 Sep 07 |
nicklas |
342 |
{ |
11 |
13 Sep 07 |
nicklas |
343 |
try |
11 |
13 Sep 07 |
nicklas |
344 |
{ |
11 |
13 Sep 07 |
nicklas |
345 |
dpInten = genericData.getDataSet(CelDataGroupName, CelIntensityLabel); |
11 |
13 Sep 07 |
nicklas |
346 |
if (dpInten != null) |
11 |
13 Sep 07 |
nicklas |
347 |
{ |
11 |
13 Sep 07 |
nicklas |
348 |
dpInten.open(); |
11 |
13 Sep 07 |
nicklas |
349 |
intensityColumnType = dpInten.getHeader().getColumnInfo(0).getColumnType(); |
11 |
13 Sep 07 |
nicklas |
350 |
} |
11 |
13 Sep 07 |
nicklas |
351 |
} |
11 |
13 Sep 07 |
nicklas |
352 |
catch (Throwable t) |
11 |
13 Sep 07 |
nicklas |
353 |
{ |
11 |
13 Sep 07 |
nicklas |
354 |
} |
11 |
13 Sep 07 |
nicklas |
355 |
} |
11 |
13 Sep 07 |
nicklas |
356 |
} |
11 |
13 Sep 07 |
nicklas |
357 |
|
11 |
13 Sep 07 |
nicklas |
/** Prepare to read the standard deviation data */ |
11 |
13 Sep 07 |
nicklas |
359 |
private void prepareStdevPlane() { |
11 |
13 Sep 07 |
nicklas |
360 |
if (dpStdev == null) |
11 |
13 Sep 07 |
nicklas |
361 |
{ |
11 |
13 Sep 07 |
nicklas |
362 |
try |
11 |
13 Sep 07 |
nicklas |
363 |
{ |
11 |
13 Sep 07 |
nicklas |
364 |
dpStdev = genericData.getDataSet(CelDataGroupName, CelStdDevLabel); |
11 |
13 Sep 07 |
nicklas |
365 |
if (dpStdev != null) |
11 |
13 Sep 07 |
nicklas |
366 |
dpStdev.open(); |
11 |
13 Sep 07 |
nicklas |
367 |
} |
11 |
13 Sep 07 |
nicklas |
368 |
catch (Throwable t) |
11 |
13 Sep 07 |
nicklas |
369 |
{ |
11 |
13 Sep 07 |
nicklas |
370 |
} |
11 |
13 Sep 07 |
nicklas |
371 |
} |
11 |
13 Sep 07 |
nicklas |
372 |
} |
11 |
13 Sep 07 |
nicklas |
373 |
|
11 |
13 Sep 07 |
nicklas |
/** Prepare to read the number of pixel data */ |
11 |
13 Sep 07 |
nicklas |
375 |
private void prepareNumPixelPlane() { |
11 |
13 Sep 07 |
nicklas |
376 |
if (dpPixels == null) |
11 |
13 Sep 07 |
nicklas |
377 |
{ |
11 |
13 Sep 07 |
nicklas |
378 |
try |
11 |
13 Sep 07 |
nicklas |
379 |
{ |
11 |
13 Sep 07 |
nicklas |
380 |
dpPixels = genericData.getDataSet(CelDataGroupName, CelPixelLabel); |
11 |
13 Sep 07 |
nicklas |
381 |
if (dpPixels != null) |
11 |
13 Sep 07 |
nicklas |
382 |
dpPixels.open(); |
11 |
13 Sep 07 |
nicklas |
383 |
} |
11 |
13 Sep 07 |
nicklas |
384 |
catch (Throwable t) |
11 |
13 Sep 07 |
nicklas |
385 |
{ |
11 |
13 Sep 07 |
nicklas |
386 |
} |
11 |
13 Sep 07 |
nicklas |
387 |
} |
11 |
13 Sep 07 |
nicklas |
388 |
} |
11 |
13 Sep 07 |
nicklas |
/** Prepare to read the outlier data */ |
11 |
13 Sep 07 |
nicklas |
390 |
private void prepareOutlierPlane() { |
11 |
13 Sep 07 |
nicklas |
391 |
if (outlierPlaneRead) |
11 |
13 Sep 07 |
nicklas |
392 |
return; |
11 |
13 Sep 07 |
nicklas |
393 |
|
11 |
13 Sep 07 |
nicklas |
394 |
outlierPlaneRead = true; // Read attempted |
11 |
13 Sep 07 |
nicklas |
395 |
|
11 |
13 Sep 07 |
nicklas |
396 |
try |
11 |
13 Sep 07 |
nicklas |
397 |
{ |
11 |
13 Sep 07 |
nicklas |
398 |
DataSet dpOutlier = genericData.getDataSet(CelDataGroupName, CelOutlierLabel); |
11 |
13 Sep 07 |
nicklas |
399 |
if (dpOutlier != null) |
11 |
13 Sep 07 |
nicklas |
400 |
{ |
11 |
13 Sep 07 |
nicklas |
401 |
if (dpOutlier.open() == true) |
11 |
13 Sep 07 |
nicklas |
402 |
{ |
11 |
13 Sep 07 |
nicklas |
403 |
outliers = new HashMap(); |
11 |
13 Sep 07 |
nicklas |
404 |
int rows = dpOutlier.getRows(); |
11 |
13 Sep 07 |
nicklas |
405 |
for (int row = 0; row < rows; ++row) |
11 |
13 Sep 07 |
nicklas |
406 |
{ |
11 |
13 Sep 07 |
nicklas |
407 |
short x = dpOutlier.getDataShort(row, 0); |
11 |
13 Sep 07 |
nicklas |
408 |
short y = dpOutlier.getDataShort(row, 1); |
11 |
13 Sep 07 |
nicklas |
409 |
outliers.put(new Integer(xyToIndex(x, y)), new Boolean(true)); |
11 |
13 Sep 07 |
nicklas |
410 |
} |
11 |
13 Sep 07 |
nicklas |
411 |
} |
11 |
13 Sep 07 |
nicklas |
412 |
dpOutlier.delete(); |
11 |
13 Sep 07 |
nicklas |
413 |
dpOutlier = null; |
11 |
13 Sep 07 |
nicklas |
414 |
} |
11 |
13 Sep 07 |
nicklas |
415 |
} |
11 |
13 Sep 07 |
nicklas |
416 |
catch (Throwable t) |
11 |
13 Sep 07 |
nicklas |
417 |
{ |
11 |
13 Sep 07 |
nicklas |
418 |
} |
11 |
13 Sep 07 |
nicklas |
419 |
} |
11 |
13 Sep 07 |
nicklas |
420 |
|
11 |
13 Sep 07 |
nicklas |
/** Prepare to read the mask data */ |
11 |
13 Sep 07 |
nicklas |
422 |
private void prepareMaskedPlane() { |
11 |
13 Sep 07 |
nicklas |
423 |
if (maskPlaneRead) |
11 |
13 Sep 07 |
nicklas |
424 |
return; |
11 |
13 Sep 07 |
nicklas |
425 |
|
11 |
13 Sep 07 |
nicklas |
426 |
maskPlaneRead = true; // Read attempted |
11 |
13 Sep 07 |
nicklas |
427 |
|
11 |
13 Sep 07 |
nicklas |
428 |
try |
11 |
13 Sep 07 |
nicklas |
429 |
{ |
11 |
13 Sep 07 |
nicklas |
430 |
DataSet dpMasked = genericData.getDataSet(CelDataGroupName, CelMaskLabel); |
11 |
13 Sep 07 |
nicklas |
431 |
if (dpMasked != null) |
11 |
13 Sep 07 |
nicklas |
432 |
{ |
11 |
13 Sep 07 |
nicklas |
433 |
if (dpMasked.open() == true) |
11 |
13 Sep 07 |
nicklas |
434 |
{ |
11 |
13 Sep 07 |
nicklas |
435 |
masked = new HashMap(); |
11 |
13 Sep 07 |
nicklas |
436 |
int rows = dpMasked.getRows(); |
11 |
13 Sep 07 |
nicklas |
437 |
for (int row = 0; row < rows; ++row) |
11 |
13 Sep 07 |
nicklas |
438 |
{ |
11 |
13 Sep 07 |
nicklas |
439 |
short x = dpMasked.getDataShort(row, 0); |
11 |
13 Sep 07 |
nicklas |
440 |
short y = dpMasked.getDataShort(row, 1); |
11 |
13 Sep 07 |
nicklas |
441 |
masked.put(new Integer(xyToIndex(x, y)), new Boolean(true)); |
11 |
13 Sep 07 |
nicklas |
442 |
} |
11 |
13 Sep 07 |
nicklas |
443 |
} |
11 |
13 Sep 07 |
nicklas |
444 |
dpMasked.delete(); |
11 |
13 Sep 07 |
nicklas |
445 |
dpMasked = null; |
11 |
13 Sep 07 |
nicklas |
446 |
} |
11 |
13 Sep 07 |
nicklas |
447 |
|
11 |
13 Sep 07 |
nicklas |
448 |
} |
11 |
13 Sep 07 |
nicklas |
449 |
catch (Throwable t) |
11 |
13 Sep 07 |
nicklas |
450 |
{ |
11 |
13 Sep 07 |
nicklas |
451 |
} |
11 |
13 Sep 07 |
nicklas |
452 |
} |
11 |
13 Sep 07 |
nicklas |
453 |
|
11 |
13 Sep 07 |
nicklas |
/** Prepare to read all data */ |
11 |
13 Sep 07 |
nicklas |
455 |
private void prepareAllPlanes() { |
11 |
13 Sep 07 |
nicklas |
456 |
prepareIntensityPlane(); |
11 |
13 Sep 07 |
nicklas |
457 |
prepareStdevPlane(); |
11 |
13 Sep 07 |
nicklas |
458 |
prepareNumPixelPlane(); |
11 |
13 Sep 07 |
nicklas |
459 |
prepareOutlierPlane(); |
11 |
13 Sep 07 |
nicklas |
460 |
prepareMaskedPlane(); |
11 |
13 Sep 07 |
nicklas |
461 |
} |
11 |
13 Sep 07 |
nicklas |
/** Read an int value from the GenericDataHeader parameter list. |
11 |
13 Sep 07 |
nicklas |
* @param name Name of the parameter to read |
11 |
13 Sep 07 |
nicklas |
* @return int value of the named parameter |
11 |
13 Sep 07 |
nicklas |
465 |
*/ |
11 |
13 Sep 07 |
nicklas |
466 |
private int getInt32FromGenericHdrParameterList(String name) { |
11 |
13 Sep 07 |
nicklas |
467 |
int result = 0; |
11 |
13 Sep 07 |
nicklas |
468 |
GenericDataHeader hdr = genericData.getHeader().getGenericDataHdr(); |
11 |
13 Sep 07 |
nicklas |
469 |
ParameterNameValue paramType = hdr.findNameValParam(name); |
11 |
13 Sep 07 |
nicklas |
470 |
if (paramType != null) |
11 |
13 Sep 07 |
nicklas |
471 |
{ |
11 |
13 Sep 07 |
nicklas |
472 |
result = paramType.getValueInt32(); |
11 |
13 Sep 07 |
nicklas |
473 |
} |
11 |
13 Sep 07 |
nicklas |
474 |
return result; |
11 |
13 Sep 07 |
nicklas |
475 |
} |
11 |
13 Sep 07 |
nicklas |
/** Read an wstring value from the GenericDataHeader parameter list. |
11 |
13 Sep 07 |
nicklas |
* @param name Name of the parameter to read |
11 |
13 Sep 07 |
nicklas |
* @return wstring value of the named parameter |
11 |
13 Sep 07 |
nicklas |
479 |
*/ |
11 |
13 Sep 07 |
nicklas |
480 |
private String getWStringFromGenericHdr(String name) { |
11 |
13 Sep 07 |
nicklas |
481 |
String result = null; |
11 |
13 Sep 07 |
nicklas |
482 |
GenericDataHeader hdr = genericData.getHeader().getGenericDataHdr(); |
11 |
13 Sep 07 |
nicklas |
483 |
ParameterNameValue paramType = hdr.findNameValParam(name); |
11 |
13 Sep 07 |
nicklas |
484 |
if (paramType != null) |
11 |
13 Sep 07 |
nicklas |
485 |
{ |
11 |
13 Sep 07 |
nicklas |
486 |
result = paramType.getValueText(); |
11 |
13 Sep 07 |
nicklas |
487 |
} |
11 |
13 Sep 07 |
nicklas |
488 |
return result; |
11 |
13 Sep 07 |
nicklas |
489 |
} |
11 |
13 Sep 07 |
nicklas |
490 |
|
11 |
13 Sep 07 |
nicklas |
/** Get the number of outliers */ |
11 |
13 Sep 07 |
nicklas |
492 |
public int getNumOutliers() { |
11 |
13 Sep 07 |
nicklas |
493 |
prepareOutlierPlane(); |
11 |
13 Sep 07 |
nicklas |
494 |
if (outliers == null) |
11 |
13 Sep 07 |
nicklas |
495 |
return 0; |
11 |
13 Sep 07 |
nicklas |
496 |
return outliers.size(); |
11 |
13 Sep 07 |
nicklas |
497 |
} |
11 |
13 Sep 07 |
nicklas |
498 |
|
11 |
13 Sep 07 |
nicklas |
/** Check if the cell is an outlier (outlier flag is true) |
11 |
13 Sep 07 |
nicklas |
* @param cellIdx Cell index |
11 |
13 Sep 07 |
nicklas |
* @return True if the cell outlier flag is true |
11 |
13 Sep 07 |
nicklas |
502 |
*/ |
11 |
13 Sep 07 |
nicklas |
503 |
public boolean isOutlier(int cellIdx) { |
11 |
13 Sep 07 |
nicklas |
504 |
prepareOutlierPlane(); |
11 |
13 Sep 07 |
nicklas |
505 |
if (outliers == null) |
11 |
13 Sep 07 |
nicklas |
506 |
return false; |
11 |
13 Sep 07 |
nicklas |
507 |
Boolean outlier = (Boolean)outliers.get(new Integer(cellIdx)); |
11 |
13 Sep 07 |
nicklas |
508 |
if (outlier != null ) |
11 |
13 Sep 07 |
nicklas |
509 |
return outlier.booleanValue(); |
11 |
13 Sep 07 |
nicklas |
510 |
return false; |
11 |
13 Sep 07 |
nicklas |
511 |
} |
11 |
13 Sep 07 |
nicklas |
512 |
|
11 |
13 Sep 07 |
nicklas |
/** Get the number of outliers */ |
11 |
13 Sep 07 |
nicklas |
514 |
public int getNumMasked() { |
11 |
13 Sep 07 |
nicklas |
515 |
prepareMaskedPlane(); |
11 |
13 Sep 07 |
nicklas |
516 |
if (masked == null) |
11 |
13 Sep 07 |
nicklas |
517 |
return 0; |
11 |
13 Sep 07 |
nicklas |
518 |
return masked.size(); |
11 |
13 Sep 07 |
nicklas |
519 |
} |
11 |
13 Sep 07 |
nicklas |
520 |
|
11 |
13 Sep 07 |
nicklas |
/** Check if the cell is masked (mask flag is true) |
11 |
13 Sep 07 |
nicklas |
* @param cellIdx cell index |
11 |
13 Sep 07 |
nicklas |
* @return True if the cell mask flag is true |
11 |
13 Sep 07 |
nicklas |
524 |
*/ |
11 |
13 Sep 07 |
nicklas |
525 |
public boolean isMasked(int cellIdx) { |
11 |
13 Sep 07 |
nicklas |
526 |
prepareMaskedPlane(); |
11 |
13 Sep 07 |
nicklas |
527 |
if (masked == null) |
11 |
13 Sep 07 |
nicklas |
528 |
return false; |
11 |
13 Sep 07 |
nicklas |
529 |
Boolean m = (Boolean)masked.get(new Integer(cellIdx)); |
11 |
13 Sep 07 |
nicklas |
530 |
if (m != null ) |
11 |
13 Sep 07 |
nicklas |
531 |
return m.booleanValue(); |
11 |
13 Sep 07 |
nicklas |
532 |
return false; |
11 |
13 Sep 07 |
nicklas |
533 |
} |
11 |
13 Sep 07 |
nicklas |
534 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the X coordinates from index. |
11 |
13 Sep 07 |
nicklas |
* @param index The 0 based index to the entry array. |
11 |
13 Sep 07 |
nicklas |
* @return X coordinate |
11 |
13 Sep 07 |
nicklas |
538 |
*/ |
11 |
13 Sep 07 |
nicklas |
539 |
public int indexToX(int index) { return index % getCols(); } |
11 |
13 Sep 07 |
nicklas |
540 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the Y coordinates from index. |
11 |
13 Sep 07 |
nicklas |
* @param index The 0 based index to the entry array. |
11 |
13 Sep 07 |
nicklas |
* @return Y coordinate |
11 |
13 Sep 07 |
nicklas |
544 |
*/ |
11 |
13 Sep 07 |
nicklas |
545 |
public int indexToY(int index) { return index / getCols(); } |
11 |
13 Sep 07 |
nicklas |
546 |
|
11 |
13 Sep 07 |
nicklas |
/** Maps X/Y coordinates to CEL file index. |
11 |
13 Sep 07 |
nicklas |
* @param x The x coordinate |
11 |
13 Sep 07 |
nicklas |
* @param y The y coordinate. |
11 |
13 Sep 07 |
nicklas |
* @return The index to the entry array. |
11 |
13 Sep 07 |
nicklas |
551 |
*/ |
11 |
13 Sep 07 |
nicklas |
552 |
public int xyToIndex(int x, int y) { return xyToIndex(x,y, getRows(), getCols()); } |
11 |
13 Sep 07 |
nicklas |
553 |
|
11 |
13 Sep 07 |
nicklas |
/** Maps X/Y coordinates to CEL file index. |
11 |
13 Sep 07 |
nicklas |
* @param x The x coordinate. |
11 |
13 Sep 07 |
nicklas |
* @param y The y coordinate. |
11 |
13 Sep 07 |
nicklas |
* @param r The number of rows. |
11 |
13 Sep 07 |
nicklas |
* @param c The number of columns. |
11 |
13 Sep 07 |
nicklas |
* @return The index to the intensity arrays. |
11 |
13 Sep 07 |
nicklas |
560 |
*/ |
11 |
13 Sep 07 |
nicklas |
561 |
public static int xyToIndex(int x, int y, int r, int c) { return ((y*c) + x); } |
11 |
13 Sep 07 |
nicklas |
562 |
|
11 |
13 Sep 07 |
nicklas |
/** Determine the xy coordinate given a cell index. |
11 |
13 Sep 07 |
nicklas |
* @param cellIdx Cell index |
11 |
13 Sep 07 |
nicklas |
* @return Cell coordinate |
11 |
13 Sep 07 |
nicklas |
566 |
*/ |
11 |
13 Sep 07 |
nicklas |
567 |
private XYCoord computeXY(int cellIdx) { |
11 |
13 Sep 07 |
nicklas |
568 |
XYCoord coord = new XYCoord(); |
11 |
13 Sep 07 |
nicklas |
569 |
coord.setY((short)(cellIdx/getCols())); |
11 |
13 Sep 07 |
nicklas |
570 |
coord.setX((short)(cellIdx - getCols()*coord.getY())); |
11 |
13 Sep 07 |
nicklas |
571 |
return coord; |
11 |
13 Sep 07 |
nicklas |
572 |
} |
11 |
13 Sep 07 |
nicklas |
573 |
|
11 |
13 Sep 07 |
nicklas |
/** Find a DataSetHeader by name. |
11 |
13 Sep 07 |
nicklas |
* @param name DataSetHeader name |
11 |
13 Sep 07 |
nicklas |
* @return Pointer to a DataSetHeader with name parameter, otherwise 0 |
11 |
13 Sep 07 |
nicklas |
577 |
*/ |
11 |
13 Sep 07 |
nicklas |
578 |
private DataSetHeader findDataSetHeader(String name) { |
11 |
13 Sep 07 |
nicklas |
579 |
DataGroupHeader dch = genericData.findDataGroupHeader(CelDataGroupName); |
11 |
13 Sep 07 |
nicklas |
580 |
if (dch != null) |
11 |
13 Sep 07 |
nicklas |
581 |
{ |
11 |
13 Sep 07 |
nicklas |
582 |
DataSetHeader dph = genericData.findDataSetHeader(dch, name); |
11 |
13 Sep 07 |
nicklas |
583 |
if (dph != null) |
11 |
13 Sep 07 |
nicklas |
584 |
return dph; |
11 |
13 Sep 07 |
nicklas |
585 |
} |
11 |
13 Sep 07 |
nicklas |
586 |
return null; |
11 |
13 Sep 07 |
nicklas |
587 |
} |
11 |
13 Sep 07 |
nicklas |
588 |
|
11 |
13 Sep 07 |
nicklas |
589 |
} |