feat: Dockerize and complete project
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class CoreConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "apps.core"
|
||||
verbose_name = "Core"
|
||||
@@ -0,0 +1,10 @@
|
||||
from apps.products.models import MainProduct
|
||||
|
||||
|
||||
def navigation(request):
|
||||
main_products = (
|
||||
MainProduct.objects.filter(is_active=True)
|
||||
.prefetch_related("sub_products")
|
||||
.order_by("order", "name")
|
||||
)
|
||||
return {"nav_main_products": main_products}
|
||||
@@ -0,0 +1,400 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.db import transaction
|
||||
|
||||
from apps.pages.models import DownloadItem, FAQEntry
|
||||
from apps.products.models import Article, ArticleSection, MainProduct, SubProduct
|
||||
|
||||
MAIN_PRODUCTS = [
|
||||
{
|
||||
"name": "ViSERA",
|
||||
"slug": "visera",
|
||||
"short_description": "Visualized & Standardized Environment for Radiomics Analysis",
|
||||
"description": (
|
||||
"ViSERA is a free, open-source software specialized for visualization, "
|
||||
"processing, segmentation, registration, fusion and analysis of medical and "
|
||||
"biomedical images, including radiomics and machine learning analysis. "
|
||||
"ViSERA is a major, entirely-revamped upgrade to the original SERA "
|
||||
"(Matlab-based), now built on Python for broader accessibility and community "
|
||||
"contribution. It enables standardized and reproducible radiomic feature "
|
||||
"extraction in compliance with the Image Biomarker Standardization Initiative "
|
||||
"(IBSI 1.0), and implements image filters standardized against IBSI 2.0."
|
||||
),
|
||||
"order": 1,
|
||||
"sub_products": [
|
||||
{
|
||||
"name": "Image Processing",
|
||||
"slug": "image-processing",
|
||||
"short_description": "Standardized filtering, registration, and fusion techniques",
|
||||
"description": (
|
||||
"Advanced image processing capabilities including standardized filtering "
|
||||
"techniques compliant with IBSI 2.0, image registration, fusion, and "
|
||||
"Standardized Uptake Value (SUV) conversion. ViSERA employs popular "
|
||||
"image processing algorithms to create end-to-end standardized workflows "
|
||||
"for consistent, reproducible research outcomes."
|
||||
),
|
||||
"order": 1,
|
||||
"articles": [
|
||||
{
|
||||
"title": "Image Filtering Techniques",
|
||||
"description": (
|
||||
"ViSERA implements a comprehensive set of image filtering techniques "
|
||||
"fully standardized against the Image Biomarker Standardization "
|
||||
"Initiative (IBSI) phase 2. These filters enable reproducible "
|
||||
"preprocessing across institutions and studies."
|
||||
),
|
||||
"order": 1,
|
||||
"sections": [
|
||||
{"title": "Standardization", "value": "IBSI 2.0 compliant", "order": 1},
|
||||
{
|
||||
"title": "Available Filters",
|
||||
"value": "Mean, Gaussian, Laplacian of Gaussian (LoG), Laws kernels, Gabor, Wavelets (PyWavelets), Log-Sigma",
|
||||
"order": 2,
|
||||
},
|
||||
{"title": "Author", "value": "Tecvico Corp R&D Team", "order": 3},
|
||||
],
|
||||
},
|
||||
{
|
||||
"title": "Image Registration & Fusion",
|
||||
"description": (
|
||||
"ViSERA provides robust image registration and fusion methods, "
|
||||
"enabling multi-modal image alignment for PET/CT, PET/MRI, and "
|
||||
"other combined modality studies. Standardized Uptake Value (SUV) "
|
||||
"conversion is also supported."
|
||||
),
|
||||
"order": 2,
|
||||
"sections": [
|
||||
{"title": "Registration Methods", "value": "Rigid, Affine, Deformable (B-spline)", "order": 1},
|
||||
{"title": "Fusion Techniques", "value": "Overlay, weighted average, multi-modal blending", "order": 2},
|
||||
{"title": "Special Feature", "value": "Standardized Uptake Value (SUV) conversion", "order": 3},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Radiomics Features",
|
||||
"slug": "radiomics-features",
|
||||
"short_description": "IBSI 1.0 compliant handcrafted radiomic feature extraction",
|
||||
"description": (
|
||||
"ViSERA provides comprehensive handcrafted radiomic feature extraction "
|
||||
"fully standardized by the Image Biomarker Standardization Initiative "
|
||||
"(IBSI 1.0). Features are computed from segmented regions of interest "
|
||||
"across multiple image modalities, enabling reproducible quantitative "
|
||||
"imaging biomarker research."
|
||||
),
|
||||
"order": 2,
|
||||
"articles": [
|
||||
{
|
||||
"title": "IBSI Compliant Feature Extraction",
|
||||
"description": (
|
||||
"ViSERA computes a comprehensive set of radiomic features "
|
||||
"covering all IBSI 1.0 feature classes. Features are extracted "
|
||||
"from segmented Regions of Interest (ROIs) and are fully "
|
||||
"reproducible across different platforms and institutions."
|
||||
),
|
||||
"order": 1,
|
||||
"sections": [
|
||||
{"title": "Standardization", "value": "IBSI 1.0 compliant", "order": 1},
|
||||
{
|
||||
"title": "Feature Classes",
|
||||
"value": "Shape (3D & 2D), First-order Statistics, GLCM, GLRLM, GLSZM, GLDM, NGTDM",
|
||||
"order": 2,
|
||||
},
|
||||
{"title": "Output Formats", "value": "CSV, JSON, Excel", "order": 3},
|
||||
{"title": "Reference", "value": "Zwanenburg et al. (2020), Radiology", "order": 4},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Medical Image Visualization",
|
||||
"slug": "medical-image-visualization",
|
||||
"short_description": "Professional multi-modality medical image viewer",
|
||||
"description": (
|
||||
"ViSERA includes a professional medical image viewer that supports "
|
||||
"multiple imaging modalities and file formats. The viewer provides "
|
||||
"comfortable, intuitive controls for slice navigation, windowing, "
|
||||
"zoom, and annotation, suitable for radiation oncologists, radiologists, "
|
||||
"physicists, and data scientists."
|
||||
),
|
||||
"order": 3,
|
||||
"articles": [
|
||||
{
|
||||
"title": "Multi-Modal Image Viewer",
|
||||
"description": (
|
||||
"The integrated viewer supports simultaneous display of multiple "
|
||||
"image modalities with linked cursors, adjustable window/level, "
|
||||
"and overlay capabilities. RT struct contours are rendered "
|
||||
"directly over the underlying images."
|
||||
),
|
||||
"order": 1,
|
||||
"sections": [
|
||||
{"title": "Supported Modalities", "value": "CT, MRI, PET, SPECT, CBCT", "order": 1},
|
||||
{"title": "File Formats", "value": "DICOM, NIFTI (.nii, .nii.gz), NRRD, MHA, NII", "order": 2},
|
||||
{"title": "Special Support", "value": "RT Struct, RT Dose, RT Plan visualization", "order": 3},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Format Conversion",
|
||||
"slug": "format-conversion",
|
||||
"short_description": "Professional converter for medical imaging file formats",
|
||||
"description": (
|
||||
"ViSERA provides a professional image format converter supporting all "
|
||||
"major medical imaging standards. Seamlessly convert between DICOM, "
|
||||
"NIFTI, NRRD, MHA, and other formats without loss of spatial metadata "
|
||||
"or patient information integrity."
|
||||
),
|
||||
"order": 4,
|
||||
"articles": [
|
||||
{
|
||||
"title": "Medical Image Format Converter",
|
||||
"description": (
|
||||
"The built-in converter handles complex DICOM series reconstruction, "
|
||||
"preserving spatial orientation, voxel spacing, and relevant metadata "
|
||||
"throughout conversion. Batch conversion is supported for large "
|
||||
"research datasets."
|
||||
),
|
||||
"order": 1,
|
||||
"sections": [
|
||||
{"title": "Input Formats", "value": "DICOM (all SOP classes), NIFTI, NRRD, NII, MHA, MetaImage", "order": 1},
|
||||
{"title": "Output Formats", "value": "NIFTI (.nii.gz), NRRD, MHA, NII", "order": 2},
|
||||
{"title": "Batch Processing", "value": "Supported — process entire datasets automatically", "order": 3},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Workflow Management",
|
||||
"slug": "workflow-management",
|
||||
"short_description": "Reproducible research workflow creation and sharing",
|
||||
"description": (
|
||||
"ViSERA's workflow management system allows researchers to design, save, "
|
||||
"share, and reuse analysis pipelines. Workflows connect individual "
|
||||
"processing steps — from image loading and preprocessing to feature "
|
||||
"extraction and machine learning — into reproducible, shareable sequences "
|
||||
"that ensure consistency across studies and institutions."
|
||||
),
|
||||
"order": 5,
|
||||
"articles": [
|
||||
{
|
||||
"title": "Reproducible Research Workflows",
|
||||
"description": (
|
||||
"Create end-to-end analysis pipelines by visually connecting "
|
||||
"processing nodes. Each workflow can be exported, shared with "
|
||||
"collaborators, and re-executed to reproduce results on new datasets."
|
||||
),
|
||||
"order": 1,
|
||||
"sections": [
|
||||
{"title": "Key Benefit", "value": "Usability, Reusability and Reproducibility (URR)", "order": 1},
|
||||
{"title": "Collaboration", "value": "Share workflows, datasets, and results with research teams", "order": 2},
|
||||
{"title": "Compatibility", "value": "Works with all supported image modalities and feature extractors", "order": 3},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
FAQ_ENTRIES = [
|
||||
{
|
||||
"question": "What is the ViSERA license?",
|
||||
"answer": (
|
||||
"ViSERA is free and open-source for research purposes.\n\n"
|
||||
"License: CC BY-NC-SA (Creative Commons Attribution-NonCommercial-ShareAlike). "
|
||||
"This means you may use, share, and adapt the software for non-commercial "
|
||||
"research purposes, provided you give appropriate credit and distribute "
|
||||
"derivatives under the same license."
|
||||
),
|
||||
"order": 1,
|
||||
},
|
||||
{
|
||||
"question": "How do I cite ViSERA in my research?",
|
||||
"answer": (
|
||||
"Please cite the following reference if you publish results obtained with "
|
||||
"the help of ViSERA:\n\n"
|
||||
"M. R. Salmanpour, I. Shiri, M. Hosseinzadeh, H. Zaidi, S. Ashrafinia, "
|
||||
"M. Oveisi, A. Rahmim. ViSERA: Visualized & Standardized Environment for "
|
||||
"Radiomics Analysis — A Shareable, Executable, and Reproducible Workflow "
|
||||
"Generator. Proc. IEEE Medical Imaging Conference, 2023."
|
||||
),
|
||||
"order": 2,
|
||||
},
|
||||
{
|
||||
"question": "Which operating systems does ViSERA support?",
|
||||
"answer": (
|
||||
"ViSERA currently fully supports Windows 10 and above (64-bit). "
|
||||
"New versions to support macOS and Linux systems are under active development "
|
||||
"and coming soon. Follow our Discord or check the Downloads page for updates."
|
||||
),
|
||||
"order": 3,
|
||||
},
|
||||
{
|
||||
"question": "Can I install a new version over an existing installation?",
|
||||
"answer": (
|
||||
"Yes, you can install the new version without removing the previous one. "
|
||||
"However, if you encounter any problems after upgrading, we recommend "
|
||||
"uninstalling the old version first, then performing a clean installation "
|
||||
"of the new release."
|
||||
),
|
||||
"order": 4,
|
||||
},
|
||||
{
|
||||
"question": "Is ViSERA suitable for clinical use?",
|
||||
"answer": (
|
||||
"ViSERA is designed and intended exclusively for research purposes. "
|
||||
"It is not certified for clinical diagnostic use. Always consult with "
|
||||
"qualified medical professionals for clinical decisions."
|
||||
),
|
||||
"order": 5,
|
||||
},
|
||||
{
|
||||
"question": "Where can I get support or report issues?",
|
||||
"answer": (
|
||||
"Support is available via email at support@tecvico.com and through our "
|
||||
"community Discord server. For bug reports and feature requests, please "
|
||||
"use the Discord forum or contact us directly by email."
|
||||
),
|
||||
"order": 6,
|
||||
},
|
||||
]
|
||||
|
||||
DOWNLOAD_ITEMS = [
|
||||
{
|
||||
"name": "ViSERA Desktop",
|
||||
"platform": "windows",
|
||||
"version": "1.0.0",
|
||||
"download_url": "https://github.com/tecvico/visera/releases/latest/download/ViSERA-Setup.exe",
|
||||
"description": "Windows 10 and above (64-bit). Installer package.",
|
||||
"is_active": True,
|
||||
"order": 1,
|
||||
},
|
||||
{
|
||||
"name": "ViSERA Desktop",
|
||||
"platform": "macos",
|
||||
"version": "Coming Soon",
|
||||
"download_url": "#",
|
||||
"description": "macOS version is under development.",
|
||||
"is_active": False,
|
||||
"order": 2,
|
||||
},
|
||||
{
|
||||
"name": "ViSERA Desktop",
|
||||
"platform": "linux",
|
||||
"version": "Coming Soon",
|
||||
"download_url": "#",
|
||||
"description": "Linux version is under development.",
|
||||
"is_active": False,
|
||||
"order": 3,
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Seed the database with initial Tecvico / ViSERA content from visera.ca"
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument(
|
||||
"--flush",
|
||||
action="store_true",
|
||||
help="Delete all existing seed data before re-seeding",
|
||||
)
|
||||
|
||||
@transaction.atomic
|
||||
def handle(self, *args, **options):
|
||||
if options["flush"]:
|
||||
self.stdout.write("Flushing existing seed data...")
|
||||
ArticleSection.objects.all().delete()
|
||||
Article.objects.all().delete()
|
||||
SubProduct.objects.all().delete()
|
||||
MainProduct.objects.all().delete()
|
||||
FAQEntry.objects.all().delete()
|
||||
DownloadItem.objects.all().delete()
|
||||
|
||||
self._seed_products()
|
||||
self._seed_faq()
|
||||
self._seed_downloads()
|
||||
|
||||
self.stdout.write(self.style.SUCCESS("Content seeded successfully."))
|
||||
|
||||
def _seed_products(self):
|
||||
for product_data in MAIN_PRODUCTS:
|
||||
sub_products_data = product_data.pop("sub_products")
|
||||
main_product, created = MainProduct.objects.get_or_create(
|
||||
slug=product_data["slug"],
|
||||
defaults=product_data,
|
||||
)
|
||||
if not created:
|
||||
for field, value in product_data.items():
|
||||
setattr(main_product, field, value)
|
||||
main_product.save()
|
||||
|
||||
action = "Created" if created else "Updated"
|
||||
self.stdout.write(f" {action} main product: {main_product.name}")
|
||||
|
||||
for sub_data in sub_products_data:
|
||||
articles_data = sub_data.pop("articles")
|
||||
sub_product, sub_created = SubProduct.objects.get_or_create(
|
||||
main_product=main_product,
|
||||
slug=sub_data["slug"],
|
||||
defaults=sub_data,
|
||||
)
|
||||
if not sub_created:
|
||||
for field, value in sub_data.items():
|
||||
setattr(sub_product, field, value)
|
||||
sub_product.save()
|
||||
|
||||
sub_action = "Created" if sub_created else "Updated"
|
||||
self.stdout.write(f" {sub_action} sub-product: {sub_product.name}")
|
||||
|
||||
for article_data in articles_data:
|
||||
sections_data = article_data.pop("sections")
|
||||
article, art_created = Article.objects.get_or_create(
|
||||
sub_product=sub_product,
|
||||
title=article_data["title"],
|
||||
defaults=article_data,
|
||||
)
|
||||
if not art_created:
|
||||
for field, value in article_data.items():
|
||||
setattr(article, field, value)
|
||||
article.save()
|
||||
|
||||
art_action = "Created" if art_created else "Updated"
|
||||
self.stdout.write(f" {art_action} article: {article.title}")
|
||||
|
||||
for section_data in sections_data:
|
||||
section, _ = ArticleSection.objects.get_or_create(
|
||||
article=article,
|
||||
title=section_data["title"],
|
||||
defaults=section_data,
|
||||
)
|
||||
|
||||
def _seed_faq(self):
|
||||
for entry_data in FAQ_ENTRIES:
|
||||
faq, created = FAQEntry.objects.get_or_create(
|
||||
question=entry_data["question"],
|
||||
defaults=entry_data,
|
||||
)
|
||||
if not created:
|
||||
for field, value in entry_data.items():
|
||||
setattr(faq, field, value)
|
||||
faq.save()
|
||||
|
||||
action = "Created" if created else "Updated"
|
||||
self.stdout.write(f" {action} FAQ: {faq.question[:60]}...")
|
||||
|
||||
def _seed_downloads(self):
|
||||
for item_data in DOWNLOAD_ITEMS:
|
||||
item, created = DownloadItem.objects.get_or_create(
|
||||
name=item_data["name"],
|
||||
platform=item_data["platform"],
|
||||
defaults=item_data,
|
||||
)
|
||||
if not created:
|
||||
for field, value in item_data.items():
|
||||
setattr(item, field, value)
|
||||
item.save()
|
||||
|
||||
action = "Created" if created else "Updated"
|
||||
self.stdout.write(f" {action} download: {item}")
|
||||
Reference in New Issue
Block a user