forked from apouch/hubmap-penntmc-modeling
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Background
The future versions of this generator should be able to generate models more than just ovary models. Instead of putting everything into the main function separated by conditionals, we want a modularized logic to achieve maximum flexibility. Specialized logic should be wrapped in separate classes with a VTK-like interface for user to configure and use.
We can assume the Ovary position does not change after generated by original code.
Requirement
Make following example code snippet work
#include "PelvisModelGenerator.h"
int main () {
...
// context code
vtkSmartPointer<vtkPolyData>ovary = OvaryModelGenerator->GetOutput();
const float pelvisIntercristalDistancemm = 290;
// target user code
PelvisModelGenerator *pvsGen = new PelvisModelGenerator();
pvsGen->SetIntercristalDistancemm(290);
pvsGen->SetPositionForPatientLeftOvary(ovary);
pvsGen->SetPositionForPatientRightOvary(ovary); // optional
pvsGen->Generate();
vtkSmartPointer<vtkPolyData>pelvis = pvsGen->GetOutput();
/*
Exporting logic
*/
delete pvsGen;
return 0;
}Deliverables
- PelvisModelGenerator class created
- Code snippet run without issue
- Code snippet generates identical result as current code
Metadata
Metadata
Assignees
Labels
No labels