SOFTWARE DESIGN DOCUMENT

Slice Manager

Document Id: 001

Revision Level: 3

Date: July 29, 2008

File Name: swdd_slice_manager
Table Of Contents
1.	Introduction	5
1.1	Purpose	5
1.2	Scope	5
1.3	Definitions	5
1.4	References	5
2.	Software Overview	6
2.1	Design Overview	6
2.2	Data Dictionary	6
3.	Classes	7
3.1	Contour Class	7
3.1.1	Default Constructor	7
3.1.2	Constructor (from file)	7
3.1.3	Constructor (from editor)	8
3.1.4	GetAttributes	8
3.1.5	Get Vertices	9
3.1.6	Set Delineator Name	9
3.1.7	Set Colour	10
3.1.8	Set Object ID	10
3.1.9	Add Vertex	11
3.1.10	Load Vertex	11
3.1.11	Delete Vertex	12
3.1.12	Insert Between	12
3.1.13	Print	13
3.2	Slice Class	13
3.2.1	Default Constructor	14
3.2.2	Constructor (from file)	14
3.2.3	Constructor (from editor)	15
3.2.4	Get Attributes	15
3.2.5	Get Contours	16
3.2.6	Set File Name	16
3.2.7	Set ID	17
3.2.8	Set Changed	17
3.2.9	Add Contour	18
3.2.10	Load Contour	18
3.2.11	Delete Contour	19
3.2.12	Get Contour	19
3.2.13	Display	20
3.2.14	Zoom	21
3.2.15	IntersectSliceWith3D	21
3.2.16	Print	22
3.3	SliceSet Class	22
3.3.1	Default Constructor	22
3.3.2	Constructor	23
3.3.3	Get Attributes	23
3.3.4	Get Slices	24
3.3.5	Get Changed Slices	24
3.3.6	Set Creation Date	25
3.3.7	Set File Path	25
3.3.8	Set Physician Name	26
3.3.9	Add Slice	26
3.3.10	Delete Slice	27
3.3.11	Get Slice	28
3.3.12	CreateObliqueSlice	28
3.3.13	Print	29
3.4	Patient Class	29
3.4.1	Default Constructor	29
3.4.2	Constructor	30
3.4.3	Get Attributes	30
3.4.4	Get Slice Sets	31
3.4.5	Set Name	31
3.4.6	Set Date of Birth	32
3.4.7	Set ID	32
3.4.8	Add Slice Set	33
3.4.9	Delete Slice Set	33
3.4.10	Print	34
3.5	3DObject Class	34
3.5.1	Default Constructor	35
3.5.2	Constructor	35
3.5.3	Get Attributes	36
3.5.4	Set Colour	36
3.5.5	Set Description	37
3.5.6	Print	37
3.6	SliceManager Class	38
3.6.1	Constructor	38
3.6.2	Create Patient	38
3.6.3	Print	39
3.6.4	Delete Patient	39
4.	File Structures and Global Data	41
4.1	Global Data Structures	41
4.2	File Structures	42
5.	Interfaces	42
5.1	External Interfaces	42
5.2	Internal Interfaces	42
5.2.1	Interface Name	42
6.	Requirements Trace	42

		

1.	Introduction 
1.1	Purpose

	The purpose of this document is to record the specific design of the Slice Manager in our medical imaging software. It shall be used as a basis for the module.
1.2	Scope

	The goal of this document is to outline the design of the Slice Manager, which will handle the slice data and functions.
1.3	Definitions 

	DICOM: Digital Imaging and Communication in Medicine
	Slice: CT image of the body
	CT: Computed Tomography
	MFC: Microsoft Foundation Classes
1.4	References

There are no references yet.

2.	Software Overview
2.1	Design Overview 
 
	The Slice Manager consists of the Patient class, SliceSet class, Slice class, Contour class, 3DObject class, and the SliceManager class, which holds the patients.

1

3DObject

n

n

n

n

n

1

Slice

SliceSet

1

n

n

n

1

Contour

Patient

	The relationship between the classes in the above diagram is one of member/container. The Patient class can hold an unknown number of SliceSets, the SliceSet can hold many Slices, and a Slice can hold several Contours. The 3DObject class can hold several SliceSets, Slices and Contours, of which the Slice class can hold many 3DObjects, and the Contour class can hold one 3DObject.
2.2	Data Dictionary

3.	Classes
3.1	Contour Class
Purpose: To hold the data related to a contour.

Module/Class Variables
	std::list<Vertex> vertexCollection;
	Name delineatorName;
	COLORREF colour;
	long contourID;
	long objectID;
	bool isClosed;
	bool isChanged;
3.1.1	Default Constructor

Purpose
	Creates a Contour object

Calling Sequence
	Contour();

Inputs
	None

Outputs
	None

Return
	None

Processing Description
	Creates a Contour object
	Initializes with default attributes

Dependencies
	None

Assumptions and Limitations
	None
3.1.2	Constructor (from file)

Purpose
	Creates a Contour object

Calling Sequence
	Contour(Name delineator, int colour, long id, long objectID, bool isClosed);

Inputs
	Contour attributes

Outputs
	None

Return
	None

Processing Description
	Creates a Contour object
	Initializes with inputted attributes

Dependencies
	None

Assumptions and Limitations
	None
3.1.3	Constructor (from editor)

Purpose
	Creates a Contour object

Calling Sequence
	Contour(Name delineator, int colour, long objectID, bool isClosed);

Inputs
	Contour attributes

Outputs
	None

Return
	None

Processing Description
	Creates a Contour object
	Initializes with inputted attributes

Dependencies
	None

Assumptions and Limitations
	None
3.1.4	GetAttributes

Purpose
	Fills the pointers with the attributes

Calling Sequence
	void GetAttributes(Name* delineator, int* colour, long* id, long* objectID, bool* isClosed, bool* isChanged);

Inputs
	Pointers to attributes

Outputs
	Contour attributes

Return
	Void

Processing Description
	Checks if pointers are null
	Fills non-null pointers with matching attributes

Dependencies
	None

Assumptions and Limitations
	None
3.1.5	Get Vertices

Purpose
	Populates the list with the vertices

Calling Sequence
	void GetVertices(std::list<Vertex>& vertexList);

Inputs
	Reference to a list of vertices

Outputs
	List of vertices

Return
	Void

Processing Description
	Iterates through the list of vertices
	Adds each vertex to the inputted list

Dependencies
	None

Assumptions and Limitations
	List is empty
3.1.6	Set Delineator Name

Purpose
	Sets the delineator’s name

Calling Sequence
	void SetDelineatorName(Name delineator);

Inputs
	Delineator name

Outputs
	None

Return
	Void

Processing Description
	Sets the delineator member to match the input

Dependencies
	None

Assumptions and Limitations
	None
3.1.7	Set Colour

Purpose
	Sets the colour

Calling Sequence
	void SetColour(int colour);

Inputs
	Colour

Outputs
	None

Return
	Void

Processing Description
	Sets the colour member to match the input

Dependencies
	None

Assumptions and Limitations
	None
3.1.8	Set Object ID

Purpose
	Sets the ID of the associated object

Calling Sequence
	void SetObjectID(long objectID);

Inputs
	Object ID

Outputs
	None

Return
	Void

Processing Description
	Sets the object ID member to match the input

Dependencies
	None

Assumptions and Limitations
	None
3.1.9	Add Vertex

Purpose
	Adds a vertex from the editor

Calling Sequence
	void AddVertex(Vertex& aVertex);

Inputs
	Reference to a vertex

Outputs
	None

Return
	Void

Processing Description
	Adds the vertex to the collection
	Changes the changed flag to true

Dependencies
	None

Assumptions and Limitations
	None
3.1.10	Load Vertex

Purpose
	Adds a vertex from the file

Calling Sequence
	void LoadVertex(Vertex& aVertex);

Inputs
	Reference to a vertex

Outputs
	None

Return
	Void

Processing Description
	Adds the vertex to the collection

Dependencies
	None

Assumptions and Limitations
	None
3.1.11	Delete Vertex

Purpose
	Deletes a Vertex

Calling Sequence
	int DeleteVertex(Vertex& aVertex);

Inputs
	Reference to a vertex

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Finds the vertex that matches
	Deletes the vertex

Dependencies
	None

Assumptions and Limitations
	None
3.1.12	Insert Between

Purpose
	Inserts a vertex between two existing vertices

Calling Sequence
	int InsertBetween(Vertex& v1, Vertex& v2, Vertex& aVertex);

Inputs
	3 vertices

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Inserts aVertex between v1 and v2 if v1 and v2 are next to each other in the list

Dependencies
	None

Assumptions and Limitations
	None
3.1.13	Print

Purpose
	Print’s the Contour’s data

Calling Sequence
	void Print();

Inputs
	None

Outputs
	None

Return
	Void

Processing Description
	Prints all attributes in the Contour
	Prints all the vertices

Dependencies
	None

Assumptions and Limitations
	None
3.2	Slice Class
Purpose: To hold the data related to a slice

Module/Class Variables
	std::list<Contour> contourCollection;
	std::list<Object3D> objectCollection;
	CRect actualSize;
	CRect displaySize;
	char fileName[FILE_NAME_LENGTH];
	char id[SLICE_ID_LENGTH];
	bool isChanged;
	void* sliceImage;	
	bool isParallel;
	short frameNumber;
	long imageSize;
	RefPoint referencePoint;
	Orientation sliceOrientation;
	double pixelSizeX;
	double pixelSizeY;
	int numRows;
	int numCols;
3.2.1	Default Constructor

Purpose
	Creates a Slice object

Calling Sequence
	Slice();

Inputs
	None

Outputs
	Slice

Return
	None

Processing Description
	Creates a Slice object
	Initializes with default attributes

Dependencies
	None

Assumptions and Limitations
	None
3.2.2	Constructor (from file)

Purpose
	Creates a Slice object

Calling Sequence
	Slice(std::string fileName, std::string ID, void* image, RefPoint point, Orientation angle, double sizeX, double sizeY, int numRows, int numCols);

Inputs
	None

Outputs
	Slice

Return
	None

Processing Description
	Creates a Slice object
	Initializes with inputted attributes

Dependencies
	None

Assumptions and Limitations
	None
3.2.3	Constructor (from editor)

Purpose
	Creates a Slice object

Calling Sequence
	Slice(std::string ID, RefPoint point, Orientation angle, double sizeX, double sizeY, int numRows, int numCols);

Inputs
	None

Outputs
	Slice

Return
	None

Processing Description
	Creates a Slice object
	Initializes with inputted attributes

Dependencies
	None

Assumptions and Limitations
	None
3.2.4	Get Attributes

Purpose
	Fills the pointers with the attributes

Calling Sequence
	void GetAttributes(std::string* fileName, std::string* ID, bool* changed, bool* parallel, RefPoint* point, Orientation* angle, double* sizeX, double* sizeY, int* numRows, int* numCols);

Inputs
	Pointer to Slice attributes

Outputs
	Slice attributes

Return
	Void

Processing Description
	Check if pointers are null
	Fill non-null pointers with matching attributes

Dependencies
	None

Assumptions and Limitations
	None
3.2.5	Get Contours

Purpose
	Populates a list with all the contours

Calling Sequence
	void GetContours(std::list<Contour>& contourList);

Inputs
	Reference to a list of Contours

Outputs
	List of Contours

Return
	Void

Processing Description
	Iterates through the collection of Contours
	Adds each Contour to the list

Dependencies
	None

Assumptions and Limitations
	Assume list is empty
3.2.6	Set File Name

Purpose
	Sets the file name

Calling Sequence
	int SetFileName(std::string fileName)

Inputs
	File name

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Check length of input, if too long, return 1
	Set the file name member to match input

Dependencies
	None

Assumptions and Limitations
	None
3.2.7	Set ID

Purpose
	Sets the ID

Calling Sequence
	int SetID(std::string id);

Inputs
	Slice ID

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Check length of input, if too long, return 1
	Set the ID member to match input

Dependencies
	None

Assumptions and Limitations
	None
3.2.8	Set Changed

Purpose
	Sets the changed flag

Calling Sequence
	void SetChanged(bool changed);

Inputs
	New changed value

Outputs
	None

Return
	Void

Processing Description
	Set the Changed flag to match input

Dependencies
	None

Assumptions and Limitations
	None
3.2.9	Add Contour

Purpose
	Adds a Contour to the list from the editor

Calling Sequence
	void AddContour(Contour& aContour);

Inputs
	Reference to a Contour

Outputs
	None

Return
	Void

Processing Description
	Add Contour to the collection
	Set changed flag to true

Dependencies
	None

Assumptions and Limitations
	Only called when adding contour from editor
3.2.10	Load Contour

Purpose
	Adds a Contour to the list from the file

Calling Sequence
	void LoadContour(Contour& aContour);

Inputs
	Reference to a Contour

Outputs
	None

Return
	Void

Processing Description
	Add Contour to the collection

Dependencies
	None

Assumptions and Limitations
	Only called when adding contour from file
3.2.11	Delete Contour

Purpose
	Deletes a Contour from the list

Calling Sequence
	int DeleteContour(long contourID);

Inputs
	ID

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Find matching Contour
	Delete from list

Dependencies
	void GetAttributes(Name* delineator, int* colour, long* id, long* objectID, bool* isClosed, bool* isChanged);

Assumptions and Limitations
	None
3.2.12	Get Contour

Purpose
	Returns a Contour that matches the ID

Calling Sequence
	Contour* GetContour(long contourID);

Inputs
	Contour ID

Outputs
	Contour

Return
	Pointer to a Contour

Processing Description
	Iterates through the Contours
	Find the Contour with the matching ID

Dependencies
	void GetAttributes(Name* delineator, int* colour, long* id, long* objectID, bool* isClosed, bool* isChanged);

Assumptions and Limitations
	None
3.2.13	Display

Purpose
	To display the Slice’s image on the screen

Calling Sequence
	int Display();

Inputs
	None

Outputs
	Image on the screen
	Window geometry

Return
	0 if successful, 1 if failed

Processing Description
	Switches from MFC to GDI
	Creates bitmap header from attributes
	Creates a bitmap from header and image
	Displays bitmap

Dependencies
	GDI drawing functions

Assumptions and Limitations
	None
3.2.14	Zoom

Purpose
	To zoom the image either in or out

Calling Sequence
	int Zoom(CDC* pDC, CRect NewRect);
	int Zoom(CDC* pDC, int percent);

Inputs
	Window, as a Device Context
	New world coordinates OR
	Percent of original size

Outputs
	Image on the screen

Return
	0 if successful, 1 if failed

Processing Description
	Change the size of the area the image is displayed in
	Display image

Dependencies
	int Slice::Display(CDC *pDC)

Assumptions and Limitations
	None
3.2.15	IntersectSliceWith3D

Purpose
	To return a Contour where the 3D object intersects the slice

Calling Sequence
	Contour* IntersectSliceWith3D(3DObject& object);

Inputs
	3D object handle

Outputs
	Contour handle

Return
	Contour handle

Processing Description
	Check if 3D object handle is null
	Find intersection
	Create Contour object that matches edge of intersection
	Add Contour to Slice
	Set Changed flag to true
	Return pointer to Contour

Dependencies
	Creation functions for Contour class

Assumptions and Limitations
	3D object does intersect the given Slice
3.2.16	Print

Purpose
	Print’s the Slice’s data

Calling Sequence
	void Print();

Inputs
	None

Outputs
	None

Return
	Void

Processing Description
	Prints all attributes in the Slice
	Calls Print() on all the Contours

Dependencies
	void Contour::Print()

Assumptions and Limitations
	None
3.3	SliceSet Class
Purpose: To hold the data related to a collection of slices

Module/Class Variables
	std::list<Slice> sliceCollection
	Date creationDate
	char directory[FILE_PATH_LENGTH]
	Name physicianName
	char *editingHistory
3.3.1	Default Constructor

Purpose
	Creates a SliceSet object

Calling Sequence
	SliceSet();

Inputs
	None

Outputs
	SliceSet

Return
	None

Processing Description
	Creates a SliceSet object
	Initializes with default attributes

Dependencies
	None

Assumptions and Limitations
	None
3.3.2	Constructor

Purpose
	Creates a SliceSet object

Calling Sequence
	SliceSet(Date creation, std::string filePath, Name physician);

Inputs
	Creation date
	File path
	Physician name

Outputs
	SliceSet

Return
	None

Processing Description
	Creates a SliceSet object
	Initializes with the inputted attributes

Dependencies
	None

Assumptions and Limitations
	None
3.3.3	Get Attributes

Purpose
	Fills the pointers with the matching attributes

Calling Sequence
	void GetAttributes(Date* creation, std::string* filePath, Name* physician);

Inputs
	Pointers to attributes

Outputs
	Attributes

Return
	Void

Processing Description
	Checks if pointers are null
	Fills non-null pointers with matching attributes

Dependencies
	None

Assumptions and Limitations
	None

3.3.4	Get Slices

Purpose
	Returns all the Slices in the SliceSet

Calling Sequence
	void GetSlices(std::list<Slice>& sliceList);

Inputs
	Reference to a list of Slices

Outputs
	List of Slices

Return
	Void

Processing Description
	Iterates through the collection of Slices
	Adds each Slice to the list

Dependencies
	None

Assumptions and Limitations
	Assume list is empty
3.3.5	Get Changed Slices

Purpose
	Returns all the Slices that have been modified

Calling Sequence
	void GetChangedSlices(std::list<Slice>& sliceList);

Inputs
	Reference to a list of Slices

Outputs
	List of Slices

Return
	Void

Processing Description
	Iterates through the collection of Slices
	If the Slice has been modified, it is added to the inputted list

Dependencies
	None

Assumptions and Limitations
	Assume list is empty
3.3.6	Set Creation Date

Purpose
	Sets the date that the images were taken on

Calling Sequence
	void SetCreationDate(Date creation);

Inputs
	Creation date

Outputs
	None

Return
	Void

Processing Description
	Set the creation date member to match input

Dependencies
	None

Assumptions and Limitations
	None
3.3.7	Set File Path

Purpose
	Sets the file path of where the images are kept

Calling Sequence
	int SetFilePath(std::string filePath);

Inputs
	Path to files

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Check if string is correct size, return 1 if not
	Set directory member to equal input

Dependencies
	None

Assumptions and Limitations
	None
3.3.8	Set Physician Name

Purpose
	Sets the name of the physician who took the images

Calling Sequence
	void SetPhysicianName(Name physician);

Inputs
	Name of physician

Outputs
	None

Return
	Void

Processing Description
	Sets the physician name member equal to the input

Dependencies
	None

Assumptions and Limitations
	None
3.3.9	Add Slice

Purpose
	Adds a Slice to the set

Calling Sequence
	void AddSlice(Slice& aSlice);

Inputs
	Slice

Outputs
	None

Return
	Void

Processing Description
	Adds Slice to end of list

Dependencies
	None

Assumptions and Limitations
	None
3.3.10	Delete Slice

Purpose
	Deletes a Slice from the set

Calling Sequence
	int DeleteSlice(std::string ID);

Inputs
	ID

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Find matching Slice
	Delete from list

Dependencies
	void Slice::GetAttributes(string* file, string* ID, bool* changed, bool* parallel, RefPoint* point, Orientation* angle, double* sizeX, double* sizeY, int* rows, int* cols)

Assumptions and Limitations
	None
3.3.11	Get Slice

Purpose
	Returns a Slice

Calling Sequence
	Slice* GetSlice(std::string ID);

Inputs
	ID, as a sring

Outputs
	Slice

Return
	Pointer to a Slice

Processing Description
	Return a pointer to the Slice that matches the ID

Dependencies
	void Slice::GetAttributes(string* file, string* ID, bool* changed, bool* parallel, RefPoint* point, Orientation* angle, double* sizeX, double* sizeY, int* rows, int* cols)

Assumptions and Limitations
	Returns null if no Slices match
3.3.12	CreateObliqueSlice

Purpose
	To create an oblique Slice image

Calling Sequence
	int CreateObliqueSlice();

Inputs
	None

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Use geometry in Slice to create a new image from parallel slices in SliceSet

Dependencies
	Unknown

Assumptions and Limitations
	Enough parallel slices must be present
3.3.13	Print

Purpose
	Print’s the SliceSet’s data

Calling Sequence
	void Print();

Inputs
	None

Outputs
	None

Return
	Void

Processing Description
	Prints all attributes in the SliceSet
	Calls Print() on all the Slices

Dependencies
	void Slice::Print()

Assumptions and Limitations
	None
3.4	Patient Class
Purpose: To hold the data related to a patient

Module/Class Variables
	std::list<SliceSet> sliceSetCollection
	Name patientName
	Date dateOfBirth
	char patientID[PATIENT_ID_LENGTH]

3.4.1	Default Constructor

Purpose
	To initialize a Patient object

Calling Sequence
	Patient();

Inputs
	None

Outputs
	None

Return
	None

Processing Description
	Creates a Patient object
	Initializes attributes with default values

Dependencies
	None

Assumptions and Limitations
	None
3.4.2	Constructor

Purpose
	To initialize a Patient object

Calling Sequence
	Patient(Name name, Date birth, string id);

Inputs
	Name, Date of birth, ID

Outputs
	None

Return
	None

Processing Description
	Creates a Patient object
	Initializes the attributes to match input

Dependencies
	None

Assumptions and Limitations
	None
3.4.3	Get Attributes

Purpose
	Fills the pointers with the attributes

Calling Sequence
	void GetAttributes(Name* name, Date* birth, std::string* id);

Inputs
	Pointers to a Name, Date and ID

Outputs
	Patient attributes

Return
	Void

Processing Description
	Check if pointers are null
	Fill non-null pointers with matching attributes

Dependencies
	None

Assumptions and Limitations
	None
3.4.4	Get Slice Sets

Purpose
	Returns a list of the SliceSets

Calling Sequence
	void GetSliceSets(std::list<SliceSet>& sliceSetList);

Inputs
	Reference to a list of SliceSets

Outputs
	List of SliceSets

Return
	Void

Processing Description
	Populates the list with the collection of SliceSets

Dependencies
	None

Assumptions and Limitations
	List is empty
3.4.5	Set Name

Purpose
	Sets the name

Calling Sequence
	void SetName(Name name);

Inputs
	New name, as a Name struct

Outputs
	None

Return
	Void

Processing Description
	Sets the name member to match input

Dependencies
	None

Assumptions and Limitations
	None
3.4.6	Set Date of Birth

Purpose
	Sets the date of birth

Calling Sequence
	void SetDOB(Date birth);

Inputs
	Date of Birth, as a Date struct

Outputs
	None

Return
	Void

Processing Description
	Sets date of birth member to match input

Dependencies
	None

Assumptions and Limitations
	None
3.4.7	Set ID

Purpose
	Sets the ID

Calling Sequence
	void SetID(std::string id);

Inputs
	ID, as a string

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Checks length of string, returns 1 if too long
	Sets ID member to match new ID 

Dependencies
	None

Assumptions and Limitations
	None
3.4.8	Add Slice Set

Purpose
	Adds a SliceSet to the collection

Calling Sequence
	void AddSliceSet(SliceSet& aSliceSet);

Inputs
	Reference to a SliceSet

Outputs
	None

Return
	Void

Processing Description
	Add SliceSet to list

Dependencies
	None

Assumptions and Limitations
	None
3.4.9	Delete Slice Set

Purpose
	Deletes a SliceSet from the collection

Calling Sequence
	int DeleteSliceSet(Date creation, std::string filePath, Name physician);

Inputs
	Creation date
	File path
	Physician name

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Find matching Slice Set
	Delete from list

Dependencies
	void SliceSet::GetAttributes(Date* creation, std::string* filePath, Name* physician);

Assumptions and Limitations
	None
3.4.10	Print

Purpose
	Print’s the Patient’s data

Calling Sequence
	void Print();

Inputs
	None

Outputs
	None

Return
	Void

Processing Description
	Prints all attributes in the Patient
	Calls Print() on all the SliceSets

Dependencies
	void SliceSet::Print()

Assumptions and Limitations
	None

3.5	3DObject Class
Purpose: Contains the data related to a 3d object

Module/Class Variables
	std::list<Contour> contourCollection;	//Don't populate this list
	std::list<Slice> sliceCollection;		//Don't populate this list
	long objectID;
	char label[OBJECT_LABEL_LENGTH];	
	char description[OBJECT_DESCRIPTION_LENGTH];
	int colour;
3.5.1	Default Constructor

Purpose
	Creates a 3D object

Calling Sequence
	Object3D();

Inputs
	None

Outputs
	None

Return
	None

Processing Description
	Creates unique ID
	Initializes attributes with default values

Dependencies
	long Object3D::CreateID();

Assumptions and Limitations
	None
3.5.2	Constructor

Purpose
	Creates and initializes a patient

Calling Sequence
	Object3D(long ID, std::string aLabel, int aColour, std::string aDescription);
	Object3D(std::string aLabel, int aColour, std::string aDescription);

Inputs
	ID as a long (if loaded from file)
	Label as a string
	Colour as an int
	Description as a string

Outputs
	None

Return
	None

Processing Description
	Initializes all fields with inputted attributes
	If ID is not provided, a unique ID is created

Dependencies
	long Object3D::CreateID();

Assumptions and Limitations
	ID will only be inputted if the object is loaded from a file
3.5.3	Get Attributes

Purpose
	Fills the pointers with attributes

Calling Sequence
	void GetAttributes(long* ID, std::string* label, int* colour, std::string* description);

Inputs
	Pointer to an ID
	Pointer to a label
	Pointer to a colour
	Pointer to a description

Outputs
	None

Return
	Void

Processing Description
	Checks if pointers are null
	If not null, sets dereferenced pointer to equal matching attribute

Dependencies
	None

Assumptions and Limitations
	None
3.5.4	Set Colour

Purpose
	Sets the colour

Calling Sequence
	void SetColour(int colour);

Inputs
	New colour, as an int

Outputs
	None

Return
	Void

Processing Description
	Sets the colour member of the object to match the input

Dependencies
	None

Assumptions and Limitations
	None
3.5.5	Set Description

Purpose
	Sets the description

Calling Sequence
	void SetDescription(std::string description);

Inputs
	New description, as a string

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Checks length of string, returns 1 if too long
	Sets the description member of the object to match the input

Dependencies
	None

Assumptions and Limitations
	None
3.5.6	Print

Purpose
	Print’s the object’s data

Calling Sequence
	void Print();

Inputs
	None

Outputs
	None

Return
	Void

Processing Description
	Prints all attributes in the 3d object

Dependencies
	None

Assumptions and Limitations
	None
3.6	SliceManager Class
Purpose: Contains the patients and the public functions

Module/Class Variables
	list<Patient> patientCollection
3.6.1	Constructor

Purpose
	Creates a SliceManager object

Calling Sequence
	SliceManager();

Inputs
	None

Outputs
	None

Return
	None

Processing Description
	None

Dependencies
	None

Assumptions and Limitations
	None
3.6.2	Create Patient

Purpose
	To create a new Patient object

Calling Sequence
	Patient* CreatePatient(Name name, Date birth, string id);

Inputs
	Patient name
	Date of birth
	Patient ID

Outputs
	Patient handle

Return
	Handle to a Patient object

Processing Description
	Check if there is an existing Patient that matches the input
	Create a new Patient object, and set attributes using constructor
	Add to SliceManager’s Patient list
	Return handle to object

Dependencies
	Patient::Patient(name, Date birth, String id)
	void Patient::GetAttributes(Name& name, Date& birth, String& id)

Assumptions and Limitations
	None
3.6.3	Print

Purpose
	Prints the Patients in the SliceManager

Calling Sequence
	void Print();

Inputs
	None

Outputs
	None

Return
	void

Processing Description
	Iterate through Patient list
	Call Patient::Print()

Dependencies
	void Patient::Print()

Assumptions and Limitations
	None
3.6.4	Delete Patient

Purpose
	Deletes a patient matching the ID

Calling Sequence
int DeletePatient(String id);

Inputs
	Patient’s ID

Outputs
	None

Return
	0 if successful, 1 if failed

Processing Description
	Iterate through Patients
	Find the Patient that matches the ID
	Delete the Patient object

Dependencies
	None

Assumptions and Limitations
	None

4.	File Structures and Global Data

4.1	Global Data Structures
	Name
	FirstName (20 char)
	LastName (30 char)

Date
	Day (1 char)
	Month (1 char)
	Year (short)

ImageryData
	PixelSizeX (double)
	PixelSizeY (double)
	SliceDistance (double)
	NumRows (int)
	NumCols (int)

RefPoint
	XCoord (double)
	YCoord (double)

Orientation
	XAngle (double)
	YAngle (double)
	ZAngle (double)

Vertex
	2DX (short)
	2DY (short)
	3DX (double)
	3DY (double)
	3DZ (double)

PatientAtt
	PatientName (Name struct)
	DOB (Date struct)
	ID (30 char)

SliceSetAtt
	CreationDate (Date struct)
	FilePath (1024 char)
	PhysicianName (Name struct)
	EditingHistory (*char) 

SliceGeom
	Reference (RefPoint struct)
	SliceOrientation (Orientation struct)

SliceAtt
	FileName (256 char)
	ID (256 char)
	ChangedFlag (char)
	Image – assume bitmap (pointer to array of chars)
	SliceType – parallel/oblique (char) 
	3DObjects (List) 
	Imagery (ImageryData struct)

ContourGeom
	Vertex Collection (List)
	Buffer

ContourAtt
	DelineatorName (Name struct)
	Colour (int)
	ID – unique (long)
	3DObjectID (long)

3DObjectAtt
	ID – unique (long)
	Label (64 char)
	Description (256 char)
	Colour (int)
4.2	File Structures
	None
5.	Interfaces

5.1	External Interfaces
	Creation module, Retrieval module, Deletion module, and Editing module. All were described above.
5.2	Internal Interfaces

5.2.1	Interface Name
6.	Requirements Trace

SWRD parent	Swdd Children	Comments	
Initialize Patient Data	3.7.1 CreatePatient	Data is initialized during creation	
Store Multiple Slices	3.3 SliceSet class	Class contains a container of Slices	
Retrieve Slices	3.8.3 GetSlices
3.8.2 GetChangedSlices	Can retrieve all Slices, or all modified Slices	
Generate New Slices	3.7.3 CreateSlice
3.7.4 CreateObliqueSlice	CreateSlice used with LoadImage creates a parallel Slice, CreateObliqueSlice creates an oblique Slice	
Associate Contours with a Slice	3.2 Slice class	Class contains a container of Contours	
Display	3.8.5 GetSliceImage	Displays image on screen	
Zoom	3.10.3 Zoom		
Show Cross-section with a 3D Object	3.10.4 IntersectSliceWith3D	Cross-section is expressed as a Contour, which is added to the Slice	
Presentation of Slice Location			
Table 1

End Of Document