Automation: conversion to .mhd


I am using Slicer 3D daily to convert my files into .mhd.

Is it possible to automate this, for python script to watch folder and automatically convert anything new to .mhd file?

Best and thank you,


Yes, you should be able to do that using QFileSystemWatcher Class | Qt Core 5.15.14

Be aware that you may need to wait until the file is fully written before you start to convert it (e.g. wait until it has stopped getting bigger for a few seconds before reading it).

1 Like

Thank you so much for this! Will try it.