feat: Enhance series splitting functionality with DICOM tag analysis and improved user feedback
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -1,17 +1,41 @@
|
||||
{% load django_htmx %}
|
||||
<form method="post"
|
||||
action="{% url 'atlas:series_split_by_tag' pk=series.pk %}"
|
||||
hx-post="{% url 'atlas:series_split_by_tag' pk=series.pk %}"
|
||||
hx-target="#split-by-tag-result"
|
||||
hx-swap="innerHTML">
|
||||
{% csrf_token %}
|
||||
<div class="input-group input-group-sm">
|
||||
<select name="dicom_tag" class="form-select form-select-sm">
|
||||
{% for tag_value, tag_label in split_tags %}
|
||||
<option value="{{ tag_value }}">{{ tag_label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit" class="btn btn-outline-warning btn-sm">Split</button>
|
||||
<div id="series-split-by-tag-panel" class="d-flex flex-column gap-2">
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
<button type="button"
|
||||
class="btn btn-outline-warning btn-sm"
|
||||
hx-get="{% url 'atlas:series_split_by_tag' pk=series.pk %}?analyze=1"
|
||||
hx-target="#series-split-by-tag-panel"
|
||||
hx-swap="outerHTML">
|
||||
Analyze split options
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div id="split-by-tag-result" class="mt-2"></div>
|
||||
|
||||
{% if analyze_requested %}
|
||||
{% if split_options %}
|
||||
<form method="post"
|
||||
action="{% url 'atlas:series_split_by_tag' pk=series.pk %}"
|
||||
hx-post="{% url 'atlas:series_split_by_tag' pk=series.pk %}"
|
||||
hx-target="#split-by-tag-result"
|
||||
hx-swap="innerHTML">
|
||||
{% csrf_token %}
|
||||
<div class="input-group input-group-sm">
|
||||
<select name="dicom_tag" class="form-select form-select-sm">
|
||||
{% for option in split_options %}
|
||||
<option value="{{ option.tag_value }}">{{ option.tag_label }} ({{ option.split_count }} series)</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit" class="btn btn-outline-warning btn-sm">Split</button>
|
||||
</div>
|
||||
</form>
|
||||
<p class="small text-muted mb-0">Only tags that can produce more than one output series are shown.</p>
|
||||
{% else %}
|
||||
<div class="alert alert-secondary mb-0 small">
|
||||
No common split tags were found that can divide this series into multiple groups.
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p class="small text-muted mb-0">Run analysis to detect valid split tags and estimated output series count.</p>
|
||||
{% endif %}
|
||||
|
||||
<div id="split-by-tag-result"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user