Rename and Shuffle
Back to MIB | User interface | Menu | File
Overview
The Rename and Shuffle tool in Microscopy Image Browser (MIB) shuffles files for blind modeling or classification, ensuring users don’t know which file corresponds to which condition. Models from shuffled files can later be restored to their original filenames for analysis.
Rename and Shuffle -> Rename and Shuffle
This mode renames and shuffles files from input directories into multiple output subdirectories.
Prerequisites
- Files for each condition must be in separate folders.
- Images in each folder must have the same width and height.
- Recommended: Each file contains a single image (no stacking).
- For models, masks, or annotations: Only one file per type per directory (e.g., one
*.model
,*.mask
, or*.ann
file). - For models: All model files must contain the same materials.
Setup
Copy images from different conditions into separate directories
(e.g., Control
for control images, another folder for treatment images).
There are may be multiple conditions processed at the same time.
The only requirement is to have separate conditions in its own directory.
Settings
- : populate the list of input directories with images from different conditions.
- : remove a selected directory from the list.
- : shuffle existing models (one
*.model
file per folder). - : shuffle existing masks (one
*.mask
file per folder). - : shuffle existing annotations (one
*.ann
file per folder). - : shuffle existing measurements (one
*.measure
file per folder). - : a positive number setting the random number generator seed; same value ensures consistent shuffling.
TIF
).
: specify the extension for image filenames (e.g., - : define the naming pattern for shuffled images.
- : set the destination directory for shuffled files.
Subset_001
,Subset_002
) to create under the output directory.
: number of subdirectories (e.g., - : in addition to
automatically generated
.mibShuffle
MATLAB-compatible file with shuffling details, generate an Excel sheet where the shuffling order is stored in human-readable format. - : start the shuffling process. During the shuffling an automatically generated `.mibShuffle' MATLAB-compatible file with sorting details is generated
Rename and Shuffle -> Restore
This mode restores shuffled models and masks to match their original image filenames.
Prerequisites
- Images in each folder must have the same width and height.
- For models, masks, or annotations: only one file per type per directory.
Steps
- Press
.mibShuffle
), saved in the original shuffle output directory.
to select the project file ( - The Directory with shuffled images and Destination directories lists populate automatically.
- Right-click for a popup menu to edit directories, copy names to the clipboard, or open in File Explorer.
- Optionally, save updated directory settings with .
- If masks or annotations are present, check or to restore them.
- Press to start.
Output
- Restored models:
Labels_RestoreRand_YYMMDD.model
(e.g.,Labels_RestoreRand_250405.model
for April 5, 2025). - Restored masks:
Mask_RestoreRand_YYMMDD.mask
. YYMMDD
reflects the restoration date.
Usage Tips
Shuffling for Blind Analysis
To anonymize files:
- Organize conditions into separate folders (e.g.,
Control
,Treatment
). - Set
Subset_001
toSubset_003
).
(e.g., 3 for - Shuffle with a consistent .
Back to MIB | User interface | Menu | File