Convert RT-Structures into binary images

With the help of plastimatch you can convert any rt-structure file into binary image by running: Now, if you wish to have the exported binary images of each structure registered with your rt-dose file, you can run: The plastimatch will generate the binary images in .nrrd format (also .mha can be specified in –prefix-format mha…


OpenCV2: Access your USB camera in python

To access your USB camera on your laptop with the help of OpenCV2 in Python is a matter of a few lines of code. I tested it in Anaconda environment with Python 3.7. and OpenCV-4.1.1 library running on Win 10. I assume that you have a working Anaconda environment. Unless, please follow the official instructions…


Monte Carlo Simulation for Probability Calculation….

Problem: If a coin with a diameter of D is tossed and lands on a square tile of side A, what is the probability that the coin will land on tile’s edge or fall completely within the tile? Analytical solution: The probability of a coin to land on tile’s edge is the complementary probability of…