<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MiniTIAS 照明均一性評価レポート</title>
<style>
body {
font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
font-size: 14px;
color: #333;
margin: 0;
padding: 0;
background: #f5f5f5;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 24px;
}
h1 {
font-size: 24px;
border-bottom: 3px solid #2c7bb6;
padding-bottom: 8px;
color: #1a1a2e;
}
h2 {
font-size: 18px;
border-left: 5px solid #2c7bb6;
padding-left: 10px;
margin-top: 36px;
color: #1a1a2e;
}
h3 {
font-size: 15px;
color: #2c7bb6;
margin-top: 24px;
}
.meta {
color: #666;
font-size: 13px;
margin-bottom: 24px;
}
table {
width: 100%;
border-collapse: collapse;
background: #fff;
box-shadow: 0 1px 4px rgba(0,0,0,0.1);
margin-bottom: 24px;
}
th {
background: #2c7bb6;
color: #fff;
padding: 8px 12px;
text-align: left;
font-weight: normal;
}
td {
padding: 7px 12px;
border-bottom: 1px solid #e5e5e5;
}
tr:last-child td {
border-bottom: none;
}
tr:nth-child(even) td {
background: #f9f9f9;
}
.image-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
margin-bottom: 16px;
}
.image-grid img {
width: 100%;
height: auto;
border: 1px solid #ddd;
border-radius: 4px;
}
.image-card {
background: #fff;
border-radius: 6px;
box-shadow: 0 1px 4px rgba(0,0,0,0.1);
padding: 16px;
margin-bottom: 32px;
}
.image-card h3 {
margin-top: 0;
}
.caption {
font-size: 12px;
color: #888;
text-align: center;
margin-top: 4px;
}
.tag-good {
background: #d4edda;
color: #155724;
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
}
.tag-warn {
background: #fff3cd;
color: #856404;
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
}
.tag-bad {
background: #f8d7da;
color: #721c24;
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
}
</style>
</head>
<body>
<div class="container">
<!-- タイトル + 生成日時 -->
<h1>MiniTIAS 照明均一性評価レポート</h1>
<p class="meta">生成日時: {{ generated_at }}</p>
<!-- 均一性サマリ表 -->
<h2>均一性サマリ</h2>
<table>
<thead>
<tr>
<th>画像名</th>
<th>平均輝度</th>
<th>標準偏差</th>
<th>CoV</th>
<th>最大/最小比</th>
<th>最大輝度</th>
<th>最小輝度</th>
</tr>
</thead>
<tbody>
{% for row in summary_rows %}
<tr>
<td>{{ row.image_name }}</td>
<td>{{ "%.2f"|format(row.mean|float) }}</td>
<td>{{ "%.2f"|format(row.std|float) }}</td>
<td>{{ "%.4f"|format(row.cov|float) }}</td>
<td>{{ "%.4f"|format(row.max_min_ratio|float) }}</td>
<td>{{ "%.2f"|format(row.max|float) }}</td>
<td>{{ "%.2f"|format(row.min|float) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<!-- 空間解析サマリ表 -->
<h2>空間解析サマリ(中心-周辺勾配)</h2>
<table>
<thead>
<tr>
<th>画像名</th>
<th>中心平均輝度</th>
<th>中間平均輝度</th>
<th>周辺平均輝度</th>
<th>中心/周辺比</th>
<th>勾配量 (%)</th>
</tr>
</thead>
<tbody>
{% for row in spatial_rows %}
<tr>
<td>{{ row.image_name }}</td>
<td>{{ "%.2f"|format(row.center_mean|float) }}</td>
<td>{{ "%.2f"|format(row.middle_mean|float) }}</td>
<td>{{ "%.2f"|format(row.periphery_mean|float) }}</td>
<td>{{ "%.4f"|format(row.center_periphery_ratio|float) }}</td>
<td>{{ "%.2f"|format(row.gradient_magnitude|float) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<!-- 画像別詳細 -->
<h2>画像別詳細</h2>
{% for item in image_details %}
<div class="image-card">
<h3>{{ item.name }}</h3>
<div class="image-grid">
{% if item.luminance_map %}
<div>
<img src="{{ item.luminance_map }}" alt="輝度マップ">
<p class="caption">輝度マップ</p>
</div>
{% endif %}
{% if item.histogram %}
<div>
<img src="{{ item.histogram }}" alt="輝度ヒストグラム">
<p class="caption">輝度ヒストグラム</p>
</div>
{% endif %}
{% if item.radial_profile %}
<div>
<img src="{{ item.radial_profile }}" alt="放射状プロファイル">
<p class="caption">放射状輝度プロファイル</p>
</div>
{% endif %}
{% if item.zone_map %}
<div>
<img src="{{ item.zone_map }}" alt="ゾーンマップ">
<p class="caption">ゾーンマップ(中心 / 中間 / 周辺)</p>
</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</body>
</html>