MATLAB: Questions about using ImageDataStore and only some subfolders in a folder

imagedatastore

These are related, so I will ask them both here:
1. Is it possible to specify which subfolders in a folder are to be used in an ImageDataStore? For example, if you have 5 subfolders but would like to use just 3 of the subfolders in your ImageDataStore, is that possible? I cannot tell from the ImageDataStore documentation.
2. Alternatively, is it possible to create an ImageDataStore and then add to it? If #1 is not possible then I can imagine a workaround in which I add to an ImageDataStore subfolder by subfolder.

Best Answer

Sean's suggestion was helpful, although it took a long time to run. I eventually figured out that I could import into the ImageDataStore everything in all the subfolders, using the subfolder names as labels, and then delete out everything that matched the labels I did not want to retain.