This desktop application helps organize and upload dental patient data including CBCT scans, IOS files, intraoral photos, and radiographs to a Django backend system.
- Automated File Analysis: Intelligently categorizes dental data files based on folder structure, filename patterns, and image content
- Patient Data Validation: Ensures each patient has required data types (CBCT, IOS scans, radiographs, etc.)
- Interactive File Management: Drag-and-drop interface for resolving ambiguous file classifications
- Bulk Upload: Efficient batch uploading to Django API with progress tracking
- Comprehensive Reporting: Detailed validation reports and missing data summaries
Each patient folder should contain:
-
CBCT Folder: Contains DICOM files from cone beam CT scans
- Folder name patterns: "CBCT", "cone beam", "3d", "dicom", "ct"
-
IOS Folder: Contains STL files from intraoral scans
- Folder name patterns: "scansioni", "scan", "ios", "intraoral scan", "stl"
- Should contain two files: upper and lower jaw scans
- Files should contain "upper"/"superiore" or "lower"/"inferiore" in their names
-
Intraoral Photos: RGB images of the mouth interior
- Multiple JPG/PNG files
- No specific naming convention
-
Teleradiography: Grayscale lateral cephalometric image
- Square aspect ratio (approximately 1:1)
- JPG/PNG format
- May contain "tele", "lateral", "cefalometria" in filename
-
Orthopantomography: Grayscale panoramic dental X-ray
- Rectangular aspect ratio
- JPG/PNG format
- May contain "ortho", "panoramic", "opt" in filename
- Clone or download this repository
- Install Python 3.8 or higher
- Install required packages:
pip install -r requirements.txt
-
Run the application:
python main.py -
Open Project Folder: Select the root folder containing patient subfolders
-
Analyze: Click "Analyze" to scan and categorize all patient data
-
Review Results: Use the Patient Browser to review detected files and resolve any ambiguities
-
Configure API: Go to Settings to configure your Django API endpoint and authentication
-
Upload: Use the Upload Manager to batch upload complete patient data
- Base URL: Your Django API endpoint (e.g.,
http://localhost:8000) - API Key: Authentication token for API access
- Timeout: Request timeout in seconds
- Confidence Threshold: Minimum confidence for automatic file classification
- Folder Patterns: Customize patterns for detecting CBCT and IOS folders
- File Matching: Configure case sensitivity and subfolder inclusion
The application uses multiple methods to classify files:
- Folder Structure: Analyzes folder names using regex patterns
- Filename Analysis: Looks for keywords in filenames
- Image Content Analysis:
- Detects grayscale vs color images
- Analyzes aspect ratios
- Distinguishes between different radiograph types
The application expects a Django REST API with the following endpoints:
GET /api/health/- Health checkGET/POST /api/patients/- Patient managementPOST /api/uploads/- File upload endpoint
Files are uploaded with the following data:
patient_id: Patient identifierdata_type: Type of dental data (cbct_dicom, ios_upper, ios_lower, etc.)file: Binary file datafilename: Original filename
The application provides comprehensive error handling and reporting:
- Validation Errors: Missing or incomplete patient data
- File Conflicts: Ambiguous file classifications
- Upload Failures: Network or server errors during upload
- Progress Tracking: Real-time upload progress and ETA
-
"No patients found": Ensure patient folders are direct subfolders of the selected root folder
-
"Files not detected": Check folder naming conventions and file extensions
-
"API connection failed": Verify Django server is running and API settings are correct
-
"Upload timeout": Increase timeout setting for large files
Upload logs are available in the Upload Manager tab and can be saved for debugging.
dental_data_manager/
├── main.py # Application entry point
├── core/ # Core business logic
│ ├── models.py # Data models
│ ├── file_analyzer.py # File analysis logic
│ ├── project_manager.py # Project coordination
│ └── api_client.py # API communication
├── gui/ # User interface
│ ├── main_window.py # Main application window
│ ├── patient_browser.py # Patient data browser
│ ├── upload_manager.py # Upload management
│ └── settings_dialog.py # Configuration dialog
└── utils/ # Utility functions
To support additional dental data types:
- Add new
DataTypeenum value inmodels.py - Update file analysis patterns in
file_analyzer.py - Add UI elements in
patient_browser.py - Update API client upload logic
This software is developed for TF4M dental data management purposes.