SlicDiagWeb/src/main/webapp
diff -u -r1.2 -r1.3
--- plotFrame.jsp 28 Sep 2007 21:37:46 -0000 1.2
+++ plotFrame.jsp 18 Oct 2007 23:37:24 -0000 1.3
@@ -11,39 +11,99 @@
<title>AIDA Plot Frame</title>
<base target="_self">
</head>
-<body>
- <c:set var="sv" value="styleVar" scope="session"/>
- <aida:plotterStyleEditor
- selectorText="Style Editor"
- action="plotFrame.jsp"
- var="styleVar"
- />
- <!--
- <br>
- showPlotStyle=${styleVar.showPlotStyle} <br>
- showStatistics=${styleVar.showStatistics} <br>
- showLegend=${styleVar.showLegend} <br>
- <br>
- -->
+<body>
<c:if test="${!empty param.plotHref}">
<c:set var="aidaPath" value="${param.plotHref}" scope="session"/>
</c:if>
- <h3><c:out value="Path=${aidaPath}"/></h3>
-
+ <c:set var="ref" value="plotFrame.jsp?plotHref=${aidaPath}"/>
+
+ <!! Plotter Style Editor -->
+ <aida:plotterStyleEditor
+ selectorText="Style Editor"
+ action="${ref}"
+ var="styleVar"
+ />
+
+ <h3>
+ <c:out value="Path=${aidaPath}"/>
+ </h3>
+
<c:if test="${!empty selectedFileId && !(selectedFileId == initParam.no_selection) && !(empty aidaPath)}">
+ <!-- get data objects -->
<c:set var="aidaDataFile" value="${initParam.slic_file_base}/${selectedFileId}" scope="page"/>
<aida:objects storeName="${aidaDataFile}"
path="${aidaPath}"
var="aidaDataObject">
</aida:objects>
- <!--
- <aida:plotBrowser nplots="${fn:length(aidaDataObject)}" url="plotFrame.jsp" layoutVar="layout" maxplots="16" id="plotBrowserID"/>
- -->
- <aida:plotter allowDownload="true" format="png">
- <aida:region>
+ <!-- get reference objects -->
+ <c:if test="${!empty selectedRefId && !(selectedRefId == initParam.no_selection)}">
+ <c:set var="aidaRefFile" value="${initParam.slic_file_base}/${selectedRefId}" scope="page"/>
+ <c:catch var="fileException">
+ <aida:objects storeName="${aidaRefFile}"
+ path="${aidaPath}"
+ var="aidaRefObject">
+ </aida:objects>
+ </c:catch>
+ </c:if>
+
+
+ <!-- statistical comparison here, for single plots only -->
+ <c:if test="${!empty aidaDataObject && fn:length(aidaDataObject) == 1}">
+ <c:if test="${!empty aidaDataObject && fn:length(aidaDataObject) == 1}">
+ <c:if test="${!empty styleVar.showPlotStyle && styleVar.showPlotStyle != false}">
+ <c:if test="${!empty styleVar.statCompareAlgorithm && styleVar.statCompareAlgorithm != initParam.no_selection}">
+ <c:catch var="statException">
+ <p><font size=+1><b><u>Statistical Comparison:</u> <i>
+ <aida:statcompare
+ algorithm="${styleVar.statCompareAlgorithm}"
+ var1="${aidaDataObject[0]}"
+ var2="${aidaRefObject[0]}"
+ verbose="true"/>
+ </i></b><br></font>
+ </c:catch>
+ <c:if test="${! empty statException}">
+ <b>${statException.message}</b></i></font><br>
+ </c:if>
+ </c:if>
+ </c:if>
+ </c:if>
+ </c:if>
+
+ <!-- do plotting here -->
+ <c:set var="imgMap" value="false"/>
+ <c:if test="${!empty aidaDataObject && fn:length(aidaDataObject) > 1}">
+ <c:set var="imgMap" value="true"/>
+ </c:if>
+
+ <aida:plotset statusvar="status" nplots="${fn:length(aidaDataObject)}" createImageMap="${imgMap}" allowDownload="true" format="png">
+
+ <aida:plotsetbar var="href" url="${ref}">
+ <c:if test="${href.npages > 1}">
+ <TABLE bgcolor="D0D0D0" border="1">
+ <TR>
+ <TD>
+ ${href.defaultbar}
+ </TD>
+ </TR>
+ </TABLE><br>
+ </c:if>
+ </aida:plotsetbar>
+
+ <c:if test="${!empty styleVar.showPlotStyle && styleVar.showPlotStyle != false}">
+ <aida:style>
+ <aida:style type="statisticsBox">
+ <aida:attribute name="isVisible" value="${styleVar.showStatistics}"/>
+ </aida:style>
+ <aida:style type="legendBox">
+ <aida:attribute name="isVisible" value="${styleVar.showLegend}"/>
+ </aida:style>
+ </aida:style>
+ </c:if>
+
+ <aida:region href="${ref}/${aida:objectName(aidaDataObject[status.index])}">
<c:if test="${!empty styleVar.showPlotStyle && styleVar.showPlotStyle != false}">
<aida:style>
<c:if test="${!empty styleVar.markerSize && styleVar.markerSize != initParam.no_selection}">
@@ -54,56 +114,39 @@
</aida:style>
</aida:style>
</c:if>
- <aida:style type="statisticsBox">
- <aida:attribute name="isVisible" value="${styleVar.showStatistics}"/>
- </aida:style>
- <aida:style type="legendBox">
- <aida:attribute name="isVisible" value="${styleVar.showLegend}"/>
- </aida:style>
</aida:style>
</c:if>
- <aida:plot var="${aidaDataObject[0]}">
- </aida:plot>
+ <aida:plot var="${aidaDataObject[status.index]}">
+ </aida:plot>
- <c:if test="${!empty selectedRefId && !(selectedRefId == initParam.no_selection)}">
- <c:set var="aidaRefFile" value="${initParam.slic_file_base}/${selectedRefId}" scope="page"/>
- <c:catch var="exception">
- <aida:objects storeName="${aidaRefFile}"
- path="${aidaPath}"
- var="aidaRefObject">
- </aida:objects>
-
- <c:if test="${!empty styleVar.showPlotStyle && styleVar.showPlotStyle != false}">
- <c:if test="${!empty styleVar.statCompareAlgorithm && styleVar.statCompareAlgorithm != initParam.no_selection}">
- <font size=+1><b><u>Statistical Comparison:</u> <i>
- <aida:statCompare
- algorithm="${styleVar.statCompareAlgorithm}"
- var1="${aidaDataObject[0]}"
- var2="${aidaRefObject[0]}"
- verbose="true"/>
- </i></b><br></font>
- </c:if>
- </c:if>
-
- <aida:plot var="${aidaRefObject[0]}">
+ <c:if test="${!empty aidaRefFile}">
+ <c:catch var="plotException">
+ <aida:plot var="${aidaRefObject[status.index]}">
<c:if test="${!empty styleVar.showPlotStyle && styleVar.showPlotStyle != false}">
- <c:if test="${!empty styleVar.normalization && styleVar.normalization != initParam.no_selection}">
- <aida:style>
- <aida:attribute name="normalization" value="${styleVar.normalization}"/>
- </aida:style>
- </c:if>
+ <c:if test="${!empty styleVar.normalization && styleVar.normalization != initParam.no_selection}">
+ <aida:style>
+ <aida:attribute name="normalization" value="${styleVar.normalization}"/>
+ </aida:style>
+ </c:if>
</c:if>
</aida:plot>
</c:catch>
</c:if>
+
</aida:region>
- </aida:plotter>
- <p/>
- <c:if test="${! empty exception}">
- <br><b>*** Problem plotting reference histogram:</b><br>
- ${exception.message}
+ </aida:plotset>
+
+ <c:if test="${! empty fileException}">
+ <p><b>*** Problem openning Ref file: ${aidaRefFile}</b><br>
+ ${fileException.message}
</c:if>
+
+ <c:if test="${! empty plotException}">
+ <p><b>*** Problem plotting reference histograms for path: ${aidaPath}</b><br>
+ ${plotException.message}
+ </c:if>
+
</c:if>
</body>