The casual user need not read over this section. It is intended for anyone who would like to develop SrXes further or is curious about how the program works.
An object that contains relevant information about a .tif image.
Each image has a name, filepath, n (index), data, and metadata. Dummy images can be created as placeholders. They only have a name (2D Image), blank metadata, n (-1), and data. They are instantiated if the initialized path is an empty string.
Loads data from the .tif file and stores it in a numpy array.
Opens the associated .metadata file and parses the information.
If no such file exists, the metadata is left empty.
An image cache that contains at most 3 Image objects.
The cache ensures that 3 images are loaded into memory at a given time. These include the current, next, and previous images. This allows faster plotting of images. The cache is a deque of size 3 with modified pop/append methods.
Appends the new image and deloads the image that is removed.
Appends left the new image and deloads the image that is removed.
Deloads the current images, and replaces them with dummy Images.
Pops an Image from the right and places a dummy image on left.
Pops an Image from the left and places a dummy image on right.
Reverses the cache.
A separate thread that searches the given directory for .tif images. For each image, it sends a request to the ProcessCenter to store the image. A thread is created and run each time a directory is chosen.
NOTE: Images are not loaded into memory but their paths are stored so loading can be performed at a later time.
Creates a list of valid .tif files in the directory.
Sends image requests to the ProcessCenter for each image.