-
Notifications
You must be signed in to change notification settings - Fork 0
Design
Sha edited this page Jan 14, 2023
·
4 revisions
When image-registration is used in an application:
flowchart TD;
Input[Input two images and parameters] --> Register[Register two images];
Register --> Output[Output the transformation];
When performing interactive testing in this project to debug the registration engine:
flowchart TD;
Change[Tester changes parameters];
Input[Input two images and parameters];
Register[Register two images];
Calculate[Calculate intermediate result and overlap image];
Output[Output the transformation, intermediate result and overlap image];
Change --> Input --> Register --> Calculate --> Output --> Change;
- Image Format: Bit depth, number of channels, pixel padding...
- Algorithm
- Transformation: Rigid or deform-able
-
ImageReader: Encapsulates image formats. All the algorithm needs is to be able to read images. The library will define
ImageReaderinterface for the caller to implement. For example, a caller can defineDicomImageReaderas a concrete class implementingImageReaderinterface. - RegistrationEngine: Encapsulates the algorithms.
-
Transformation: Encapsulates the transformation types. The library will define concrete classes such as
RigidTransformationimplementingTransformationinterface.
classDiagram
DicomImageReader ..|> ImageReader : implements
RegistrationEngine "1" --> "2" ImageReader : uses
RegistrationEngine "1" --> "1" Transformation: uses
RigidTransformation ..|> Transformation : implements
class RegistrationEngine {
Register()
}
class ImageReader {
<<interface>>
width
height
getIntensity(x, y)
}
class Transformation {
<<interface>>
mapPixel(from, to)
}
sequenceDiagram
participant caller as Caller
participant engine as RegistrationEngine
participant algo as Algorithm
caller->>caller: Instantiate ImageReader for static image
caller->>caller: Instantiate ImageReader for moving image
caller->>caller: Create parameters
caller->>engine: Register
activate engine
engine->>engine: Choose algorithm
engine->>algo: Register
activate algo
algo->>engine: Result
deactivate algo
engine->>caller: Result
deactivate engine
caller->>caller: Use the Transformation