private void VerResultadoDialog(object parameter) { ResultadosVerViewModel fvm = new ResultadosVerViewModel(); PacienteB paciente = PacienteDL.VerPaciente(iCodigoPaciente); fvm.strNombresPaciente = paciente.vNombresPaciente + " " + paciente.vApellidosPaciente; fvm.strApellidosPaciente = paciente.vApellidosPaciente; string strNivel = ""; if (paciente.iNivelPaciente == 1) { strNivel = "I"; } else if (paciente.iNivelPaciente == 2) { strNivel = "II"; } else if (paciente.iNivelPaciente == 3) { strNivel = "III"; } else if (paciente.iNivelPaciente == 4) { strNivel = "IV"; } else if (paciente.iNivelPaciente == 5) { strNivel = "V"; } fvm.strNivel = strNivel; fvm.strNivelPorcentaje = paciente.iPorcentajeNivelPaciente.ToString(); fvm.strNombreLateralidad = strNombreLateralidad; fvm.strNombreUnidad = strNombreUnidad; fvm.strFecAnalisisPaciente = strFecAnalisisPaciente; FisioterapeutaStatic.setAngles(strListaAngulos, 1); FisioterapeutaStatic.strLateralidad = strNombreLateralidad; fvm.strListaAngulos = strListaAngulos; IModalDialog dialog = ServiceProvider.Instance9.Get <IModalDialog>(); dialog.BindViewModel(fvm); dialog.ShowDialog(); }
/// <summary> /// Sinus points in [0,2PI]. /// </summary> /// <returns></returns> System.Windows.Point[] Sinus() { // Fill point array with scaled in X,Y Sin values in [0, PI]. //PointCount = 0; double x_origin = 53.4; double y_origin = 252.19; #region angles recorded from kinect v1 Double[] angles_kinect_v1 = new Double[] { 1.57107576566613, 2.06509689434351, 3.66418428506466, 5.50293288418031, 5.4477847723619, 5.15709832717024, 5.11266287172452, 5.06621051456069, 4.73576952975133, 4.68577056924535, 4.63408720878075, 5.78239206854893, 4.78254780595794, 4.72142398199244, 5.59895472348194, 5.26178037521827, 5.16147544539038, 3.49615248216569, 3.09183816248203, 2.37990550244281, 0.60904572857245, 2.74987992033371, 6.55080098034177, 12.1873151212086, 15.5970018036631, 21.4884449374227, 27.6943277754093, 34.776910559237, 41.1083222800258, 45.9308686551314, 48.8155967809824, 51.7098369823299, 51.759957700917, 51.3929189271081, 48.0362944473692, 44.7622123524095, 42.2325694233068, 37.6373600567239, 33.3738308814114, 25.7424323843055, 20.2499618013877, 16.5839770632399, 11.1167597617722, 6.97761805251387, 3.03596170424674, 0.859042074240521, 0.0443807696706979, 0.0814689702510274, 1.19592378171547 }; #endregion #region test of gemetrical distorsion double[] angles_geometrical_distorsion_kinectv2 = new double[] { 8.1226033982932, 6.98231222848164, 6.98231222848164, 6.98231222848164, 5.83929184040533, 7.42454355277428, 7.42454355277428, 7.42454355277428, 7.42454355277428, 7.42454355277428, 7.42454355277428, 7.42454355277428, 7.42454355277428, 7.42454355277428, 7.86629873821161, 9.00658990802317, 9.00658990802317, 9.00658990802317, 9.00658990802317, 9.00658990802317, 9.00658990802317, 9.00658990802317, 9.00658990802317, 7.86629873821161, 7.86629873821161, 7.86629873821161, 7.86629873821161, 7.86629873821161, 7.86629873821161, 7.86629873821161, 7.86629873821161, 6.72327835013531, 6.72327835013531, 8.30752661923492, 6.72327835013531, 6.72327835013531, 6.72327835013531, 8.30752661923492, 8.30752661923492, 8.30752661923492, 7.86629873821161, 8.30752661923492, 7.86629873821161, 8.30752661923492, 8.27021366680302, 8.27021366680302, 8.27021366680302, 9.8884673532057, 7.12719327872671, 8.70752662320215, 8.74817618339415, 8.74817618339415, 8.74817618339415, 8.74817618339415, 7.60515579531784, 7.60515579531784, 9.14422348290533, 9.14422348290533, 9.14422348290533, 9.14422348290533, 7.56450623512584, 9.14422348290533, 9.14422348290533, 9.14422348290533, 8.00120309482902, 8.00120309482902, 8.00120309482902, 8.00120309482902, 9.58025616829573, 9.58025616829573, 8.43723578021942, 8.43723578021942, 8.48393158626185, 8.43723578021942, 8.43723578021942, 8.43723578021942, 10.0155750005837, 8.8725546125074, 8.8725546125074, 8.8725546125074, 8.43723578021942, 8.43723578021942, 8.43723578021942, 7.29238869520925, 7.29238869520925, 7.29238869520925, 7.29238869520925, 8.8725546125074, 8.91925041854983, 8.91925041854983, 8.91925041854983, 8.91925041854983, 8.91925041854983, 8.91925041854983, 8.8725546125074, 8.8725546125074, 8.8725546125074, 8.8725546125074, 8.8725546125074, 7.72770752749723, 7.72770752749723, 7.72770752749723, 7.72770752749723, 7.72770752749723, 7.72770752749723, 9.30711171508891, 9.30711171508891, 9.30711171508891, 9.30711171508891, 9.30711171508891, 9.30711171508891, 9.30711171508891, 9.30711171508891, 9.30711171508891, 9.30711171508891, 9.30711171508891, 9.30711171508891, 9.30711171508891, 9.30711171508891, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.21610767605663, 8.21610767605663, 8.23948412293466, 8.23948412293466, 8.23948412293466, 8.23948412293466, 8.23948412293466, 9.84465206286809, 9.84465206286809, 9.40765056710923, 9.84465206286809, 9.40765056710923, 9.40765056710923, 9.40765056710923, 9.40765056710923, 9.30711171508891, 8.21610767605663, 8.16226463007874, 8.21610767605663, 8.16226463007874, 8.21610767605663, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.16226463007874, 8.13260784245066, 8.13260784245066, 8.13260784245066, 9.74085902598557, 9.74085902598557, 9.74085902598557, 9.74085902598557, 9.74085902598557, 9.74085902598557, 8.61938838785344, 8.61938838785344, 8.61938838785344, 8.67648561869352, 8.67648561869352, 8.67648561869352, 8.6437385282044, 8.6437385282044, 9.11261130676986, 9.11261130676986, 9.11261130676986, 9.08923485989182, 8.67648561869352, 8.73446017604406, 8.73446017604406, 8.73446017604406, 8.73446017604406, 8.73446017604406, 8.67648561869352, 8.67648561869352, 7.45024906865618, 7.45024906865618, 7.45024906865618, 7.45024906865618, 9.6123300372438, 9.17386796512637, 9.11261130676986, 8.67648561869352, 9.11261130676986, 8.67648561869352, 7.50734629949626, 7.50734629949626, 7.50734629949626, 7.50734629949626, 9.11261130676986, 7.50734629949626, 9.11261130676986, 9.11261130676986, 9.11261130676986, 7.9434719875726, 9.11261130676986, 7.9434719875726, 7.9434719875726, 7.9434719875726, 7.9434719875726, 7.88313939479484, 7.9434719875726, 7.88313939479484, 7.9434719875726, 9.54781209387098, 9.54781209387098, 9.54781209387098, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.31512599073606, 8.31512599073606, 8.31512599073606, 8.31512599073606, 8.31512599073606, 8.31512599073606, 8.31512599073606, 8.31512599073606, 8.31512599073606, 8.31512599073606, 9.91530190630851, 9.91530190630851, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.31512599073606, 8.31512599073606, 8.31512599073606, 8.31512599073606, 8.37867277467373, 8.37867277467373, 7.20953345547647, 7.20953345547647, 7.20953345547647, 8.81290210210308, 8.81290210210308, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.37867277467373, 8.74616258711125, 8.74616258711125, 7.20953345547647, 7.57702326791399, 7.20953345547647, 7.20953345547647, 7.57702326791399, 7.20953345547647, 7.57702326791399, 9.17620348301187, 8.74616258711125, 8.81290210210308, 9.17620348301187, 8.00706416381461, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.74616258711125, 8.81290210210308, 8.81290210210308, 7.64376278290582, 7.64376278290582, 7.64376278290582, 7.61941264255487, 7.61941264255487, 7.61941264255487, 7.61941264255487, 7.61941264255487, 7.61941264255487, 7.18518331512551, 7.18518331512551, 7.18518331512551, 7.18518331512551, 7.18518331512551, 7.18518331512551, 7.18518331512551, 8.74616258711125, 8.81290210210308, 7.55267312756304, 7.61941264255487, 7.61941264255487, 7.55267312756304, 7.61941264255487, 7.61941264255487, 7.61941264255487, 7.61941264255487, 7.61941264255487, 7.55267312756304, 7.55267312756304, 7.55267312756304, 7.55267312756304, 7.55267312756304, 7.55267312756304, 7.55267312756304, 7.61941264255487, 7.61941264255487, 7.61941264255487, 7.61941264255487, 7.61941264255487, 8.07697370072717, 8.07697370072717, 8.05262356037622, 6.42695807171427, 6.42695807171427, 7.61941264255487, 7.61941264255487, 7.61941264255487, 6.42695807171427, 6.42695807171427, 8.05262356037622, 8.05262356037622, 8.05262356037622, 6.42695807171427, 8.05262356037622, 8.05262356037622, 8.05262356037622, 8.05262356037622, 6.86016898953562, 6.9311418544383, 6.9797801214553, 6.9311418544383, 6.9311418544383, 6.9311418544383, 6.9311418544383, 6.9311418544383, 8.45938469120008, 8.58328535950788, 8.58328535950788, 8.58328535950788, 7.34095417885069, 7.34095417885069, 7.34095417885069, 6.9311418544383, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 6.9311418544383, 8.48477048267429, 8.91580900688437, 7.29231591183369, 7.29231591183369, 7.72335443604378, 7.41511891533333, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 7.36648064831633, 6.17609030370779, 6.17609030370779, 6.17609030370779, 7.67265033305353, 6.6102956738059, 6.6102956738059, 6.6102956738059, 7.80068601841443, 7.92783517312351, 7.92783517312351, 6.32419234732438, 6.32419234732438, 6.25138966928565, 6.32419234732438 }; #endregion #region angles from kinect v2 double[] angles_kinectv2 = new double[] { 5.93204773272603, 5.80407672216646, 7.38598200672507, 9.87141752947275, 11.278036601575, 14.702214936247, 17.1596081755653, 19.8779467172774, 20.9631452797333, 22.4867079850999, 24.72046946744, 24.9994290291999, 24.1435661464819, 24.7375946740425, 24.6252189351891, 23.3914742458806, 23.0280009147423, 22.2909410369897, 21.8636415959842, 20.3365558743327, 19.0915599826464, 18.7265406811554, 18.7587613756385, 18.0645070804329, 18.0715721615614, 16.8729034731733, 15.6721270843507, 14.1457954402568, 13.3445081261938, 12.5435341238264, 11.726286316711, 11.3356000365997, 11.655047048288, 11.0193403833461, 10.7297862006532, 11.5684674178852, 9.94407120048239, 9.23488711873271, 9.62739354528713, 9.89116391742479, 10.2498090585682, 11.749829790018, 12.3434676462626, 13.6542818347247, 15.5569274705488, 17.1624751832405, 19.0096700462219, 21.5732890146974, 24.3372478587667, 27.8769388123262, 30.0092537044637, 33.8567646702647, 38.1402398542594, 42.9218706451413, 48.632329921058, 53.1301026104424, 58.6085923281639, 61.5380469671359, 64.132270874533, 65.7336087583811, 66.2648646540462, 65.4301929545789, 64.0151915641327, 62.4866116724257, 59.0031721542887, 56.2407171359688, 52.3443843302673, 48.6296253300093, 44.8796311900064, 40.5597467174601, 36.5044705915895, 31.923930267504, 27.4344830419149, 23.3738162399394, 19.2912888437544, 16.547934084823, 12.8932077363074, 9.9597022191451, 9.12942613859747, 7.99687152160721, 6.49022011687187, 6.03431611723634, 6.11015215093454, 6.10724076885789, 4.60169115133381, }; #endregion #region Calibracion double[] test = new double[] { 0, 15, -15, 30, 75, 45, -15, 60, 75, -15, 15, -15, 30, 75, 45, -15, 60, 75, -15 }; #endregion lstAngles = FisioterapeutaStatic.getAngles(1); PointCount = lstAngles.Count; System.Windows.Point[] points = new System.Windows.Point[PointCount]; double step = 3.766 / (PointCount - 1); for (int i = 0; i < PointCount; ++i) { //points[i] = new System.Windows.Point(ScaleX * i * step, ScaleY * (1 - Math.Sin(i * step))); points[i] = new System.Windows.Point((ScaleX * i * step) + x_origin, (ScaleY * lstAngles[i] * (-1)) + y_origin); } return(points); }
private void VerReporteDialog(object parameter) { switch (iCodigoTipoReporte) { case 1: // Reporte rodiallas separadas ReportesVerViewModel rvvm = new ReportesVerViewModel(); PacienteB paciente = PacienteDL.VerPaciente(iCodigoPaciente); rvvm.strNombresPaciente = paciente.vNombresPaciente + " " + paciente.vApellidosPaciente; rvvm.strApellidosPaciente = paciente.vApellidosPaciente; string strNivel = ""; if (paciente.iNivelPaciente == 1) { strNivel = "I"; } else if (paciente.iNivelPaciente == 2) { strNivel = "II"; } else if (paciente.iNivelPaciente == 3) { strNivel = "III"; } else if (paciente.iNivelPaciente == 4) { strNivel = "IV"; } else if (paciente.iNivelPaciente == 5) { strNivel = "V"; } rvvm.strNivel = strNivel; rvvm.strNivelPorcentaje = paciente.iPorcentajeNivelPaciente.ToString(); //rvvm.strNombreLateralidad = strNombreLateralidad; //rvvm.strNombreUnidad = strNombreUnidad; //rvvm.strFecAnalisisPaciente = ((DateTime)paciente.daFecNacPaciente).Date.ToString(); FisioterapeutaStatic.setAngles(strListaAngulosUno, 1); FisioterapeutaStatic.setAngles(strListaAngulosDos, 2); //rvvm.strListaAngulos = strListaAngulos; ResultadosPacientesReportesStatic.blnRepotePDF = true; ResultadosPacientesReportesStatic.ViewReport1 = rvvm; ResultadosPacientesReportesStatic.strNombrePaciente = rvvm.strApellidosPaciente; ResultadosPacientesReportesStatic.iCodeReporte = iCodigoReporte; ResultadosPacientesReportesStatic.strRutaPDF = ""; ResultadosPacientesReportesStatic.strNivel = strNivel; ResultadosPacientesReportesStatic.strPorcentajeNivel = paciente.iPorcentajeNivelPaciente.ToString(); //fvm.SetFisioterapeutaSelecionado(fiosoterapeutaBean()); IModalDialog dialog1 = ServiceProvider.Instance10.Get <IModalDialog>(); dialog1.BindViewModel(rvvm); dialog1.ShowDialog(); break; case 2: // Reporte rodiallas junstas en una grafica ReportesVer2ViewModel rv2vm = new ReportesVer2ViewModel(); PacienteB paciente2 = PacienteDL.VerPaciente(iCodigoPaciente); rv2vm.strNombresPaciente = paciente2.vNombresPaciente + " " + paciente2.vApellidosPaciente; rv2vm.strApellidosPaciente = paciente2.vApellidosPaciente; string strNivel2 = ""; if (paciente2.iNivelPaciente == 1) { strNivel2 = "I"; } else if (paciente2.iNivelPaciente == 2) { strNivel2 = "II"; } else if (paciente2.iNivelPaciente == 3) { strNivel2 = "III"; } else if (paciente2.iNivelPaciente == 4) { strNivel2 = "IV"; } else if (paciente2.iNivelPaciente == 5) { strNivel2 = "V"; } rv2vm.strNivel = strNivel2; rv2vm.strNivelPorcentaje = paciente2.iPorcentajeNivelPaciente.ToString(); rv2vm.strNombreLateralidadDerecha = strLateralidadPaciente; rv2vm.strNombreUnidad = strUnidadPaciente; rv2vm.strFecAnalisisPaciente = strFecReportePaciente; rv2vm.strFecResultadoUno = strFecResultadoUno; rv2vm.strFecResultadoDos = strFecResultadoDos; FisioterapeutaStatic.setAngles(strListaAngulosUno, 1); FisioterapeutaStatic.setAngles(strListaAngulosDos, 2); //rv2vm.strListaAngulos = strListaAngulos; ResultadosPacientesReportesStatic.blnRepotePDF = true; ResultadosPacientesReportesStatic.ViewReport2 = rv2vm; ResultadosPacientesReportesStatic.strNombrePaciente = rv2vm.strApellidosPaciente; ResultadosPacientesReportesStatic.iCodeReporte = iCodigoReporte; ResultadosPacientesReportesStatic.strRutaPDF = ""; ResultadosPacientesReportesStatic.strNivel = strNivel2; ResultadosPacientesReportesStatic.strPorcentajeNivel = paciente2.iPorcentajeNivelPaciente.ToString(); //fvm.SetFisioterapeutaSelecionado(fiosoterapeutaBean()); IModalDialog dialog2 = ServiceProvider.Instance13.Get <IModalDialog>(); dialog2.BindViewModel(rv2vm); dialog2.ShowDialog(); break; } }