A modern desktop application built with Tauri (Rust + React + TypeScript) for viewing and inspecting KFB (KFBIO) microscopy files. Designed to handle large files (1GB+) efficiently with native performance.
- Hierarchical Tree View: Browse KFB file structure with expandable/collapsible nodes
- Smart Icons: Visual indicators for different data types (folders, images, tiles, errors)
- Quick Selection: Click any node to view its detailed information
- File Header Analysis: Complete metadata including dimensions, tile count, zoom levels
- Associated Images: View macro, label, and preview image information
- Tile Organization: Browse tiles organized by zoom level with detailed properties
- Raw Data Access: Hex dump viewer for low-level data inspection
- Resizable Panels: Drag to adjust sidebar and content area sizes
- Dark/Light Theme Support: Modern shadcn/ui components with Tailwind CSS v4
- Drag & Drop: Simply drag KFB files into the application
- Responsive Design: Clean, professional interface optimized for desktop use
- Rust Backend: Native speed for parsing large binary files
- Memory Mapping: Efficient handling of GB-sized files without loading entirely into RAM
- Lazy Loading: Load data on-demand for optimal performance
- TypeScript Frontend: Type-safe React components for reliable UI
-
Clone the repository
git clone <repository-url> cd kfb-inspector
-
Install dependencies
npm install
-
Run in development mode
npm run tauri dev
-
Build for production
npm run tauri build
- File Menu: Click "Open KFB File" button in the toolbar
- Drag & Drop: Drag any
.kfbfile into the application window - File Validation: Automatic validation ensures only valid KFB files are processed
- File Tree: Left sidebar shows the complete file structure
- Expandable Nodes: Click arrows or folder icons to expand/collapse sections
- Content Viewer: Right panel displays detailed information for selected nodes
- Resizable Layout: Drag the separator to adjust panel sizes
- Header Information: View file metadata, dimensions, and scan parameters
- Associated Images: Inspect macro, label, and preview images with size and offset info
- Tile Analysis: Browse tiles by zoom level with position and size details
- Hex Dump: Raw binary data viewer for low-level file analysis
The application supports the KFBIO file format commonly used in digital microscopy:
- Magic Number:
KFBidentifier at offset 4 - Multi-level Structure: Pyramid of tiles at different zoom levels
- JPEG Compression: Tiles are JPEG-compressed for efficient storage
- Associated Images: Macro, label, and preview images for navigation
- Binary Format: Little-endian binary structure with specific offsets
src-tauri/src/main.rs: Main application entry pointsrc-tauri/src/kfb.rs: KFB file parser implementationsrc-tauri/src/commands.rs: Tauri command handlers for frontend communication
src/App.tsx: Main application component with file handlingsrc/components/FileTree.tsx: Tree view component for file structuresrc/components/ContentViewer.tsx: Content display componentsrc/components/ui/: shadcn/ui component library
- Tauri: Cross-platform desktop app framework
- Memory Mapping: Efficient large file handling with
memmap2 - Tailwind CSS v4: Modern utility-first CSS framework
- shadcn/ui: High-quality React component library
- Lucide React: Beautiful icon system
- Format: KFB (KFBIO) files with
.kfbextension - Size: Optimized for large files (1GB+)
- Compression: JPEG-compressed tiles
- Structure: Multi-level tile pyramids with associated images
kfb-inspector/
βββ src-tauri/ # Rust backend
β βββ src/
β β βββ main.rs # Main entry point
β β βββ kfb.rs # KFB parser
β β βββ commands.rs # Tauri commands
β βββ Cargo.toml # Rust dependencies
βββ src/ # React frontend
β βββ components/ # React components
β βββ lib/ # Utility functions
β βββ types.ts # TypeScript definitions
βββ package.json # Node.js dependencies
βββ tailwind.config.js # Tailwind CSS configuration
npm run dev # Start development server
npm run build # Build frontend
npm run tauri dev # Run Tauri development mode
npm run tauri build # Build production app- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.