You are on page 1of 16

SOFTWARE REQUIREMENTS

SPECIFICATION

for

Computed Tomography
Scan Machine

Version 1.0

Prepared by : 1. Ahmed Mubarak Faisal


(BSEF19M554)
2. Muhammad Nauman Sheikh
(BSEF19M504)

Submitted to : Junaid Nasir Qureshi


Lecturer

September 10, 2022

1
Contents
1 Introduction 3
1.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Intended Audience and Reading Suggestions . . . . . . . . . . . . . . . . . 3
1.3 Project Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Overall Description 5
2.1 Product Perspective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 User Classes and Characteristics . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Product Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 Operating Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5 Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5.1 Use Case Description . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.5.2 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5.3 Entity Relationship Diagram . . . . . . . . . . . . . . . . . . . . . 13

3 System Features 14
3.1 Description and Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4 Other Nonfunctional Requirements 15


4.1 Performance Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2 Security Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.3 Software Quality Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.4 Business Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5 Other Requirements 16

2
1 Introduction
1.1 Purpose
Over the course of time, science has made great advancements and has continuously
improved. The researches conducted in the scientific field have proven to be a great
form of help for medical and engineering fields. Following the researches conducted for
reconstruction of images and performing a much more accurate X-ray for various objects,
we plan to create a fully functional CT Scan machine with the aim of providing low cost
processing with lesser resources.

1.2 Intended Audience and Reading Suggestions


This Software Requirement Specification document is designed to be readable and under-
standable by all of the stakeholders like developers, project managers, users and testers.
Further in this discussion, we will provide all the internal, external, functional and also
non-functional information about ”CT Scan Machine”.

1.3 Project Scope


CT Scan is used to find any hidden flaws that are not visible to the naked eye. It uses
X-rays with a sensitive film to trace an image of internal human bodies or objects, in
order to determine any problems in it. For the purpose of this project, we will be work-
ing with solid metal objects to determine if it has any cracks, air bubbles or any hidden
cavities inside it.

In the first deliverable, the user will be able to conduct a CT scan of a given test
sample by giving input commands to the computer. The application will allow the user
to give input values to the stepper motors and hence, move the stage at the desired axis
and angle. The output of this deliverable will consist of multiple .RAW files.

The second deliverable will allow the user to convert the previous .RAW output files
into a human understandable image format. This procedure is known as image recon-
struction. Each .RAW output file will map on a single .JPEG image. The image will
consist of mixture of two colors: Black and White.

In the third deliverable, the user can merge multiple images into a video format to
easily see the difference between multiple reconstructed images of the same object.

3
Figure 1.1: Data Flow Level 0

Figure 1.2: Data Flow Level 1

4
2 Overall Description
2.1 Product Perspective
The CT Scan Machine is a helpful tool to provide a thorough X-ray scan, and see the
inner structure of any physical object with the help of multiple images. Our primary
objective is to provide a cost-effective and cheaper solution to a much expensive imported
product with quicker processing time.

2.2 User Classes and Characteristics


Our CT Scan Machine consists of the following objects which can be classified as follows:

• Stepper Motor
– Translatory Motor
– Rotary Motor

• Detector

• Data Acquisition Card

• DAO

• GUI

The motors have two types: The translatory motor is used to move the stage on X and
Y axis while the rotary motor is used to rotate the object in clockwise or anticlockwise
direction.

The detector is used to detect the gamma rays coming from the gamma source.

The Data Acquisition Card has two uses: It is used to control the motion of step-
per motors and it is also used to receive the data from the detector and then convert it
into a .RAW file.

DAO class (Data Access Object) is used to convert the raw data coming from the Data
Acquisition card into a .RAW file.

The GUI is used to facilitate the user to interact with the program.

5
Figure 2.1: Class Diagram for CT Scan Machine

6
2.3 Product Functions
This product will allow us to control the stepper motors in an efficient way. The user
will provide input values in millimeters for translatory motion and in degrees for angular
motion. There are three input values and the user has to enter only two values. The
third value can be calculated on the first two input values. This is the case for both
translatory and rotary motors.

Once the values have been entered, the application will ask the user to input the re-
sultant filename. If the filename already exists, the application will show a warning
overwrite message. The user will then decide if the filename should be changed or over-
written.

Once this has been done, there will be no user intervention and the application will
start scanning the test sample on the given values. It will take some time and and the
user has to wait until the scan has been completed. The application will give a success
message after the output file has been created.

Once the file has been created, the user will start the reconstruction process by se-
lecting multiple .RAW output files. After the files have been selected, user will press
a proceed button and the application will start reconstructing them. The .RAW files
will be converted into a human understandable image of black and white color. These
images will allow us to see the inner structure of the test sample.

The user might want to view the difference between multiple images of the same test
sample. For that purpose, an image to video functionality has been provided. The user
will select multiple images and then click proceed button. The application will merge
multiple images into a video format and it will be easier for the user to spot differences
between multiple images.

2.4 Operating Environment


This CT Scan machine application will operate in Windows working environment. The
stepper motors and X-ray sensitive detectors will be connected to the system via ports
and the emitter will be connected to the rotary motor.

2.5 Design
The Data Acquisition Card is the heart of the system and can perform the following
three steps

• Initialize Stepper Motors

• Retrieve data from detector

7
• Initialize DAO Class with data from detector

The Data Acquisition Card uses values provided by the user in the GUI to initiate the
stepper motors.

The emitter emits gamma rays(X-rays) which fall on the X-ray sensitive detector and
the information is sent to the Data Acquisition Card.

The DAO class will use this data and create a .RAW image file.

The RAW image will be given to the scikit-image iradon function, in order to recon-
struct the image of the object.

2.5.1 Use Case Description


Actors
User, Translatory Motor, Rotary Motor, Detector, Data Acquisition Card

Description
The Data Acquisition Card retrieves data from the detector and passes this data to the
Data Access Object to organize it into a .RAW file for further processing and recon-
struction of the image.

Pre Condition
The stepper motors have performed the required number of steps defined by the user
and the sensor has successfully captured the X-rays and has converted it into numerical
data.

Flow of Events
The Data Acquisition Card retrieves data from the detector in multiple instances of
linear floating point arrays. The DAC (Data Acquisition Card) creates an instance of a
Data Access Object (DAO) class which will be storing the data in .RAW format.

Alternative Flow
The DAO class may not be able to save the .RAW file in case the data is incorrect.

Post Condition
The Raw file is given to the re-constructor object to be converted into a human viewable
image file in .JPEG format.

8
Figure 2.2: CT Scan System Use Case Diagram

The CT Scan system is further divided into 2 sub systems (modules)

• Controlling Stepper Motors and retrieve raw data from the detector

• Reconstructing human readable images and videos from raw data

9
The following Diagram shows the Use Cases for controlling the stepper motors and
collecting raw data

Figure 2.3: CT Scan Sub System for Stepper Motors

10
The following Diagram shows the Use Cases for reconstructing images and videos from
the collected raw data Staff has only one activity -

Figure 2.4: CT Scan Sub System for Reconstruction

11
2.5.2 Sequence Diagram
The Sequence Diagram shows the sequence of messages passed between objects, which
have been defined in the system

Figure 2.5: CT Sequence Diagram for objects

12
2.5.3 Entity Relationship Diagram
The ERD shows the relation between different entities at any instance and their at-
tributes

Figure 2.6: CT Entity Relationship Diagram

13
3 System Features
The final program will be a desktop application and will be developed in python. The
application will provide support for controlling stepper motors. It will also help us to
convert .RAW file into a complete, human understandable reconstructed image of the
sample.

3.1 Description and Priority


Some of the features in the application are compulsory and some of them not. But
almost all of these are necessary for this software.
The features with priority up to down -

1. Control of stepper motors: This is the goal feature of this software. It will be
operated by user and they will input the values for stepper motors.

2. Create.RAW file: The application will be able to create a .RAW file as a checkpoint
to save work.

3. Reconstruct image: The application will be able to reconstruct image in a human


readable format.

4. Merge multiple images into a video: The different slices of same object will be
reconstructed and then combined into a video format to differentiate between dif-
ferent slices with ease.

3.2 Functional Requirements


The application will be built on python.
Back-End - Python.
Font-End - Python.

14
4 Other Nonfunctional Requirements
4.1 Performance Requirements
This application will be used in a complete CT scan machine. So for more interaction,
Python will be used.

4.2 Security Requirements


This application is not public and will only be used inside a specific organization. For
security purposes, the computer on which application is installed will not be connected
to the internet. This is a business requirement as well.

4.3 Software Quality Attributes


The software will be easy to use and latest GUI libraries will be used to make it as user
friendly as possible. The quality of the application will also be maintained from time to
time. Multiple test cases will be required for logical and GUI.

4.4 Business Rules


This application is used for controlling stepper motors through a computer by staying
safe from the radioactive rays of the emitter. The application will also be able to convert
.RAW output files into human understandable images.

15
5 Other Requirements
The application shall need to be maintained when deployed on client systems. This
includes catering the needs of clients and use of newer technology. It will need refactoring
and requirements can change as the field is changing frequently.

16

You might also like