.
This commit is contained in:
@@ -36,6 +36,7 @@ from easy_thumbnails.files import get_thumbnailer
|
||||
from easy_thumbnails.exceptions import InvalidImageFormatError
|
||||
|
||||
import pydicom
|
||||
import dicom
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
|
||||
@@ -314,6 +315,9 @@ class LongSeriesImage(models.Model):
|
||||
class Meta:
|
||||
ordering = ['position']
|
||||
|
||||
def get_dicom_info(self):
|
||||
return(dicom.read_file(self.image))
|
||||
|
||||
|
||||
@reversion.register
|
||||
class LongSeries(models.Model):
|
||||
|
||||
@@ -26,6 +26,7 @@ This series is not associated with any cases.
|
||||
</div>
|
||||
{% for image in series.images.all %}
|
||||
{{image.image.url}}, pos: {{image.position}}, {{image.upload_filename}} [{{image.image.size|filesizeformat}}]<br />
|
||||
{{image.get_dicom_info}}<br/>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ urlpatterns = [
|
||||
path("", views.RapidExamViews.index, name="index"),
|
||||
path("author/<int:pk>/", views.author_detail, name="author_detail"),
|
||||
path("author/", views.author_list, name="author_list"),
|
||||
path("question/", cache_control(private=True)(cache_page(60 * 1)(views.RapidView.as_view())), name="rapid_view"),
|
||||
path("question/", views.RapidView.as_view(), name="rapid_view"),
|
||||
# path("unchecked/", views.unchecked_list, name="unchecked_list"),
|
||||
# path("verified/<int:pk>/", views.verified_detail, name="verified_detail"),
|
||||
path(
|
||||
|
||||
Reference in New Issue
Block a user