To learn about the use of container classes and templated classes.
To implement a small in-memory, relational database of objects, and implement some simple operations on the database.
Learn the use of certain classes (e.g. menu display objects) that one inherits from a programming environment.
What you need to do.
You will create a class called CTSegmentManagment. This class will contain most of the code for this assignment.
You will add a new pull-down menu to the interface called "CTSegmentation". Note that you are simply invoking existing functionality that your image sub-class has inherited from its parent class. The segmentation would yield a set of SpatialObjects which will be displayed on the interface.
Add the outer silhouette to the database, and give it a name. This menu will have the following sub-menus:
- Segment Image
- Clear Segmentation
- Save segmentation
- Load segmentation
- Add another pull-down menu called "Database" to the interface with the following sub-menus
- Insert Curve into DB: The user will select a curve on the interface (by clicking on it). Note that the curve that is selected becomes red after selection. The interface will prompt the user to give a name for the selected curve. It will then insert the <string, spatial_object> relation into the database. If more than one curve is selected, an error is displayed and nothing is done.
- Delete Curve: The interface prompts the user to input a string in a DialogBox. It then deletes that curve from the database relation.
- Display Curves: The names of all the curves in the database are displayed.
- Save Database: The curves in the database are saved in a database file.
- Load Database: The user-provided database file is loaded.
- Add a third pull-down menu called "World3D" with the following sub-menus.
- Display Curve: This menu will prompt the user to enter the name of a curve in the database, and a slice number. It will then convert the 2-D curve into a 3-D entity. In the newly created 3-D SpatialObject will have the same number of points as the corresponding 2-D curve. However, each point will additionally have a Z-coordinate whose value will be the Slice number. This 3-D object will be added to the display. It can then be manipulated using the built-in functions in the user interface.
- Clear World: Would delete everything that is there in the dispaly.
Load a CT image in the interface. You have already written the specialized image class for this in HW3. By invoking the appropriate sub-menu from "Segmentation", you will segment the image. Submit a print out of the segmented image. Save the segmentation in a disk file for future reference.
Add all the curves in the display to the database. Save the database into a file and submit the printout of the database.
Delete all the curves from the database except for the outermost curve. Save the database again, and print out the DB file.
Display the outermost curve as a 3-D object. Submit a screen dump of the interface with the 3-D object dispalyed.
Save the database as a disk file.
Program fragments and hints