Exemple #1
0
        private static CompoundPresetState cloneMedicalState(MedicalState medicalState)
        {
            CompoundPresetState compoundPresetState = new CompoundPresetState("", "", "");

            DiscPresetState leftDiscPreset = new DiscPresetState("LeftTMJDisc", "", "", "");

            leftDiscPreset.captureFromState(medicalState.Disc.getPosition("LeftTMJDisc"));
            compoundPresetState.addSubState(leftDiscPreset);

            DiscPresetState rightDiscPreset = new DiscPresetState("RightTMJDisc", "", "", "");

            rightDiscPreset.captureFromState(medicalState.Disc.getPosition("RightTMJDisc"));
            compoundPresetState.addSubState(rightDiscPreset);

            FossaPresetState leftFossaPreset = new FossaPresetState("", "", "");

            leftFossaPreset.captureFromState("LeftFossa", medicalState.Fossa);
            compoundPresetState.addSubState(leftFossaPreset);

            FossaPresetState rightFossaPreset = new FossaPresetState("", "", "");

            rightFossaPreset.captureFromState("RightFossa", medicalState.Fossa);
            compoundPresetState.addSubState(rightFossaPreset);

            AnimationManipulatorPresetState animationManipPresetState = new AnimationManipulatorPresetState("", "", "");

            animationManipPresetState.captureFromState(medicalState.BoneManipulator);
            compoundPresetState.addSubState(animationManipPresetState);

            TeethPresetState teethPreset = new TeethPresetState("", "", "");

            teethPreset.captureFromState(medicalState.Teeth);
            compoundPresetState.addSubState(teethPreset);
            return(compoundPresetState);
        }
Exemple #2
0
        void captureButton_MouseButtonClick(Widget source, EventArgs e)
        {
            MedicalState medicalState = new MedicalState("");

            medicalState.update();
            CompoundPresetState compoundPresetState = new CompoundPresetState("", "", "");

            if (leftDisc.Checked)
            {
                DiscPresetState leftDiscPreset = new DiscPresetState("LeftTMJDisc", "", "", "");
                leftDiscPreset.captureFromState(medicalState.Disc.getPosition("LeftTMJDisc"));
                compoundPresetState.addSubState(leftDiscPreset);
            }
            if (rightDisc.Checked)
            {
                DiscPresetState rightDiscPreset = new DiscPresetState("RightTMJDisc", "", "", "");
                rightDiscPreset.captureFromState(medicalState.Disc.getPosition("RightTMJDisc"));
                compoundPresetState.addSubState(rightDiscPreset);
            }
            if (leftFossa.Checked)
            {
                FossaPresetState leftFossaPreset = new FossaPresetState("", "", "");
                leftFossaPreset.captureFromState("LeftFossa", medicalState.Fossa);
                compoundPresetState.addSubState(leftFossaPreset);
            }
            if (rightFossa.Checked)
            {
                FossaPresetState rightFossaPreset = new FossaPresetState("", "", "");
                rightFossaPreset.captureFromState("RightFossa", medicalState.Fossa);
                compoundPresetState.addSubState(rightFossaPreset);
            }
            if (mandible.Checked)
            {
                AnimationManipulatorPresetState animationManipPresetState = new AnimationManipulatorPresetState("", "", "");
                animationManipPresetState.captureFromState(medicalState.BoneManipulator);
                compoundPresetState.addSubState(animationManipPresetState);
                //Need to implement mandible, may be just as easy to support each individual element

                /* bonescalarstateentry
                 * rightRamusHeightMandible
                 * rightAntegonialNotchMandible
                 * rightCondyleHeightMandible
                 * rightCondyleDegenerationMandible
                 * rightMandibularNotchMandible
                 * rightLateralPoleMandible
                 * rightMedialPoleScaleMandible
                 *
                 * leftRamusHeightMandible
                 * leftCondyleHeightMandible
                 * leftAntegonialNotchMandible
                 * leftMandibularNotchMandible
                 * leftCondyleDegenerationMandible
                 * leftLateralPoleMandible
                 * leftMedialPoleScaleMandible
                 */
                /* bonerotator
                 * leftCondyleRotationMandible
                 * rightCondyleRotationMandible
                 */
                /* Pose Manipulator
                 * leftCondyleRoughnessMandible
                 * rightCondyleRoughnessMandible
                 */
            }
            if (teeth.Checked)
            {
                TeethPresetState teethPreset = new TeethPresetState("", "", "");
                teethPreset.captureFromState(medicalState.Teeth);
                compoundPresetState.addSubState(teethPreset);
            }

            String errorPrompt = null;

            resultCallback.Invoke(compoundPresetState, ref errorPrompt);
            this.close();
        }