There are a few problems with this piece of software. Five years ago this was started by another student in Integrated Studies. Over the years it has had more and more features hacks and kludged into it to make it work. Some of them don't even work.
The data is stored in a giant 3D array. As you view it, you can flip it along the X or Y axis, you can rotate it around the current view or from one plane to another (ie XY to YZ to XZ planes). You then need to handle all of these different axes of rotation in all the different parts of the program that change or display the data in any way.
- 410kBs of source code
- More than 320 lines of warnings, including unsafe casts from floating point to integers, unused variables, overriding commands, and other warnings I've never seen before.
- We identified 9 bugs in the initial conversation.
- Some of the functions forget to handle the rotations and so edit random parts of the data
- Some paths scale the data to fit the range where others don't
- Some of the bugs aren't consistently reproducible.
- Essentially no comments in any of the heavy lifting code.
- Revision control consisted of filename.cpp.bk, filename.cpp.bk2 folderbk/ etc etc.
- I hope none of that was important, because I deleted all of it.
- One of the files wasn't even clearly a backup: 2sliceviewer.cpp. That person needs to be taken out and shot.