Skip to content

Latest commit

 

History

History
292 lines (258 loc) · 16 KB

uml.org

File metadata and controls

292 lines (258 loc) · 16 KB

I simultaneously used this project to teach myself UML design principles. If this is useful, please feel free to build on it or modify it.

Design

UML

As the object oriented nature of this project would benefit from good design, I will use this to both learn how to implement UML using the 4+1 design method.

Use Cases

  • Heart of the design that affects all other aspects of the software. This is the level that describes the requirements of the end user.
  • Priority is assigned to determine which parts of the code that should be developed first.
  • The use cases should define what the system should do.

Requirements

Here the requirements are broken into major categories and assigned priority.
[#A] A. Parametric trajectory
The code shall generate a list of the view locations for different scanning trajectories.
[#A] A.1 Create a trajectory
  • The package shall allow the user to generate a scanning trajectory based on a series of control points.
  • [ ] The trajectory should be defined as a continuous piecewise function of time.
  • These rate of change for the components of these sections should be calculated from the limiting velocities of the physical system.
Fix piecewise code
  • [ ] Currently bug in SymPy code for evaluating multiple piecewise conditions. In discussion with SymPy team to rectify this.
[#A] A.2 Generate view locations
  • Given the continuous piecewise function of the trajectory, the package shall sample trajectory positions based on the specified frame rate.
  • At these sampled time points, the package should generate a frame vector for the source and detector.
[#B] A.3 Load a trajectory
  • Given a list of frame vectors, the package should be able to initialize an instance of the trajectory object.
[#C] Wish list
  • [ ] Direct frame vector access from within the reconstruction scripts would be useful…
[#B] B. Trajectory visualization
[#B] B.1 Plot source trajectory
  • For a given trajectory, the package should be able to generate a 3D plot of the source position in space.
  • It should also be able to generate plots along each basis of the trajectories position and velocity as a function of time. This should also include the angular information in addition to the spatial coordinates.
[#C] B.2 Plot detector trajectory
  • The package should have the exact same plotting capability for the detector center as the source.
[#B] Wish list
  • [ ] The package should also be able to plot the detector tilt along it’s three degrees of freedom.
  • [ ] Need to determine best way to represent relative motion around imaging isocenter in reconstruction. Currently only experimented with couch longitudinal translation and this relative translation is implemented as source and detector motion in the reconstruction.
[#B] C. BeamXML interface
[#A] C.1 Generate a beamxml file for a given trajectory
  • The package shall be able to populate a beamxml file as a series of control points for imaging.
[#C] C.2 Generate a trajectory from a beamxml file
  • The package should be able to populate a trajectory based on the control in the beamxml file.
[#C] C.3 Use beamxml schema to manage xml interface
[#C] Wish list
  • [ ] For detector offsets, make sure the collimator blades are correctly moved in the xml file as well.
    • This is currently implemented via different initial configuration templates. This needs to be dynamically calculated.
    • Dynamic blade motion will be necessary if shifting detector offset within the trajectory.

Descriptions

<40>
Use case nameCreate trajectory
Use case descriptionGenerates a trajectory of interest.
Related RequirementsA.1
Goal in ContextThe code is designed for studying source and detector trajectories which this use case creates
PreconditionsA list of control points must be given that describe the trajectory.
Successful End ConditionA trajectory object should be created.
Failed End ConditionNo trajectory is created and user is alerted
Primary ActorsUser
Secondary ActorsLoad frame vectors
Load beamxml
TriggerInitialize new trajectory object
Included CasesCreate coordinate system.
Main FlowStepAction
1.Load control points
2.Create symbolic piecewise function based on limiting velocities
3.Calculate frame vectors
ExtensionStepBranching Action
3.1Populate frame vectors with detector tilt if specified.
<40>
Use case namePlot trajectory
Use case descriptionCreates a plot of a given trajectory
Related RequirementsB.1
Goal in ContextVisualize the trajectory of the trajectory object
PreconditionsTrajectory must be successfully created
Successful End ConditionPlot object should be created
Failed End ConditionNo plot should be generated and the user should be alerted
Primary ActorsUser
Secondary ActorsNone
TriggerUser requests a trajectory plot
Included CasesNone
Main FlowStepAction
1.Initialize the plotting environment
2.Plot the trajectory in the 3D coordinate system
ExtensionStepBranching Action
1.1Generate 2D plot of selected components
2.1Write plot to file.

UML Use Case Overview

The use case overview should actually not contain any use cases, it should merely show how the system is designed.
@startuml
User -> (Create trajectory)
User -> (Plot trajectory)
@enduml

Process View

The process view shows how the system accomplishes the requirements laid out by the use cases. This is where the actual UML diagrams showing the use case interaction should go.

UML Diagram

  • [ ] Create UML activity diagrams for each use case
create trajectory
@startuml
start
:Input control points;

:Use system config velocities to create
symbolic vector function of time;

:Sample position information from these
functions based on frame rate;

stop
@enduml