1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 /*=========================================================================
29 =========================================================================*/
32 #include "vtkPolyData.h"
33 #include "vtkObjectFactory.h"
35 //#include "vtkimagethreshold.h"
36 //#include "vtkImageCast.h"
37 //#include "vtkImageSeedConnectivity.h"
38 //#include "vtkImageData.h"
39 //#include "vtkMarchingCubes.h"
40 //#include "vtkDoubleArray.h"
41 //#include "vtkPointData.h"
42 //#include "vtkextractvoi.h"
47 #include "axisExtractor.h"
49 #define min(a,b) (((a)<(b))?(a):(b))
52 vtkStandardNewMacro(axisExtractor);
55 axisExtractor::axisExtractor() {
57 this->NumberOfRequiredInputs = 1;
60 this->maxpropradio=100;
64 this->resample= vtkImageResample::New();
65 this->resample->SetDimensionality (3);
67 this->extrac = vtkExtractVOI::New();
68 this->extrac->SetInput(this->resample->GetOutput());
69 this->extrac->SetSampleRate(1, 1, 1);
71 this->thresh = vtkImageThreshold::New();
72 this->thresh->SetInput(this->extrac->GetOutput());
73 this->thresh->SetInValue(255);
74 this->thresh->SetOutValue(0);
75 this->thresh->ReleaseDataFlagOff();
77 this->cast = vtkImageCast::New();
78 this->cast->SetInput(this->thresh->GetOutput());
79 this->cast->SetOutputScalarTypeToUnsignedChar();
81 this->connect = vtkImageSeedConnectivity::New();
82 this->connect->SetInput(this->cast->GetOutput());
83 this->connect->SetInputConnectValue(255);
84 this->connect->SetOutputConnectedValue(255);
85 this->connect->SetOutputUnconnectedValue(0);
87 this->dataprov=vtkImageData::New();
88 this->dataprov->SetScalarTypeToChar();
90 this->datatotal=vtkImageData::New();
91 this->datatotal->SetScalarTypeToChar();
98 //----------------------------------------------------------------------------
99 // Specify the input data or filter.
100 void axisExtractor::SetInput(vtkImageData *input)
106 this->vtkProcessObject::SetNthInput(0, input);
107 this->resample->SetInput(input);
108 input->GetSpacing(espprin);
111 minspac=min(espprin[0],min(espprin[1],espprin[2]));
114 this->resample->SetAxisOutputSpacing( 0, minspac);
115 this->resample->SetAxisOutputSpacing( 1, minspac);
116 this->resample->SetAxisOutputSpacing( 2, minspac);
117 this->resample->Update();
123 //----------------------------------------------------------------------------
124 // Specify the input data or filter.
126 void axisExtractor::Execute()
128 this->points = vtkPoints::New();
129 this->lineas = vtkCellArray::New();
134 this->datatotal->Delete();
135 this->datatotal=vtkImageData::New();
136 this->datatotal->SetScalarTypeToUnsignedChar();
138 this->datatotal->SetExtent(this->resample->GetOutput()->GetExtent());
139 this->datatotal->SetSpacing(this->resample->GetOutput()->GetSpacing());
144 while( !m_Stack0.empty()){
150 this->GetOutput()->SetPoints (this->points);
151 this->GetOutput()->SetLines(this->lineas);
152 this->GetOutput()->Modified();
154 // this->GetOutput()->GetPointData()->SetVectors(this->salidas);
164 //----------------------------------------------------------------------------
165 // Specify the input data or filter.
166 vtkImageData *axisExtractor::GetInput()
168 if (this->NumberOfInputs < 1){
172 return (vtkImageData *)(this->Inputs[0]);
181 //----------------------------------------------------------------------------
182 // Specify the input data or filter.
183 vtkImageData *axisExtractor::GetVolumen()
186 return this->datatotal;
194 //----------------------------------------------------------------------------
195 void axisExtractor::PrintSelf(ostream& os, vtkIndent indent)
197 this->Superclass::PrintSelf(os,indent);
207 //----------------------------------------------------------------------------
208 void axisExtractor::SetMaxPropRadio(double value)
210 this->maxpropradio=value;
215 //----------------------------------------------------------------------------
216 double axisExtractor::GetMaxPropRadio()
218 return this->maxpropradio;
223 //----------------------------------------------------------------------------
225 void axisExtractor::SetHumbral(double value)
232 //----------------------------------------------------------------------------
234 double axisExtractor::GetHumbral()
236 return this->humbral;
240 //----------------------------------------------------------------------------
242 void axisExtractor::SetMaxPropMasa(double value)
244 this->maxpropmasa=value;
249 //----------------------------------------------------------------------------
251 double axisExtractor::GetMaxPropMasa()
253 return this->maxpropmasa;
257 //----------------------------------------------------------------------------
259 void axisExtractor::SetMinPropMasa(double value)
261 this->minpropmasa=value;
266 //----------------------------------------------------------------------------
268 double axisExtractor::GetMinPropMasa()
270 return this->minpropmasa;
279 //----------------------------------------------------------------------------
280 void axisExtractor::SetPoint(double puntoactualprov[3] )
283 realtoreal(puntoactualprov,puntoactualprov);
286 m_Stack0.push(puntoactualprov[0]);
287 m_Stack1.push(puntoactualprov[1]);
288 m_Stack2.push(puntoactualprov[2]);
289 m_Stack3.push(puntoactualprov[0]);
290 m_Stack4.push(puntoactualprov[1]);
291 m_Stack5.push(puntoactualprov[2]);
304 //----------------------------------------------------------------------------
305 void axisExtractor::realtoreal(double a[3], double b[3] )
311 this->resample->GetOutput()->GetSpacing(espprin);
312 this->resample->GetOutput()->GetExtent(extprin);
314 b[0]=a[0]+(espprin[0]*extprin[0]);
315 b[1]=a[1]+(espprin[1]*extprin[2]);
325 //----------------------------------------------------------------------------
326 void axisExtractor::realtoreal2(double a[3], double b[3] )
332 this->resample->GetOutput()->GetSpacing(espprin);
333 this->resample->GetOutput()->GetExtent(extprin);
335 b[0]=a[0]-(espprin[0]*extprin[0]);
336 b[1]=a[1]-(espprin[1]*extprin[2]);
347 //----------------------------------------------------------------------------
348 void axisExtractor::realtoindex(double a[3], int b[3] )
357 this->resample->GetOutput()->GetSpacing(espprin);
358 this->resample->GetOutput()->GetExtent(extprin);
360 minspac=min(espprin[0],min(espprin[1],espprin[2]));
366 b[0]=(int)(a[0]/minspac);
367 b[1]=(int)(a[1]/minspac);
368 b[2]=(int)(a[2]/minspac);
388 //----------------------------------------------------------------------------
389 void axisExtractor::indextoreal(int a[3], double b[3] )
396 this->resample->GetOutput()->GetSpacing(espprin);
397 this->resample->GetOutput()->GetExtent(extprin);
399 minspac=min(espprin[0],min(espprin[1],espprin[2]));
410 //----------------------------------------------------------------------------
411 void axisExtractor::indextoreal(double a[3], double b[3] )
418 this->resample->GetOutput()->GetSpacing(espprin);
419 this->resample->GetOutput()->GetExtent(extprin);
421 minspac=min(espprin[0],min(espprin[1],espprin[2]));
431 //----------------------------------------------------------------------------
432 void axisExtractor::searc(int i, int j, int k)
444 ptr=(unsigned char *) this->connect->GetOutput()->GetScalarPointer(i,j,k);
445 ptr2=(char *) this->dataprov->GetScalarPointer(i,j,k);
451 this->connect->GetOutput()->GetExtent(ext);
453 radio=(ext[1]-ext[0])/2;
462 this->vector[this->label-1][0]+=1;
463 this->vector[this->label-1][1]+=i;
464 this->vector[this->label-1][2]+=j;
465 this->vector[this->label-1][3]+=k;
469 this->vectorb[this->label2-1][0]+=1;
470 this->vectorb[this->label2-1][1]+=i;
471 this->vectorb[this->label2-1][2]+=j;
472 this->vectorb[this->label2-1][3]+=k;
476 for(i3=-1;i3<=1;i3++){
477 for(j3=-1;j3<=1;j3++){
478 for(k3=-1;k3<=1;k3++){
479 if(i+i3>=ext[0] && i+i3<=ext[1] && j+j3>=ext[2] && j+j3<=ext[3] && k+k3>=ext[4] && k+k3<=ext[5] ){
480 ptr=(unsigned char *) this->connect->GetOutput()->GetScalarPointer(i+i3,j+j3,k+k3);
481 ptr2=(char *) this->dataprov->GetScalarPointer(i+i3,j+j3,k+k3);
482 if(ptri==255 && *ptr==255 && *ptr2==0 && (radio*radio)>=((i2+i3)*(i2+i3))+((j2+j3)*(j2+j3))+((k2+k3)*(k2+k3)) && ((radio-1)*(radio-1))<=((i2+i3)*(i2+i3))+((j2+j3)*(j2+j3))+((k2+k3)*(k2+k3))){
483 this->searc(i+i3, j+j3, k+k3);
485 else if(ptri==0 && *ptr==0 && *ptr2==0 && (radio*radio)>=((i2+i3)*(i2+i3))+((j2+j3)*(j2+j3))+((k2+k3)*(k2+k3)) && ((radio-1)*(radio-1))<=((i2+i3)*(i2+i3))+((j2+j3)*(j2+j3))+((k2+k3)*(k2+k3))){
486 this->searc(i+i3, j+j3, k+k3);
500 //----------------------------------------------------------------------------
501 void axisExtractor::find_components( )
511 this->connect->GetOutput()->GetExtent(ext);
514 radio=(ext[1]-ext[0])/2;
521 for(i=ext[0], i2=-radio;i<=ext[1];i++, i2++){
522 for(j=ext[2], j2=-radio;j<=ext[3];j++, j2++){
523 for(k=ext[4], k2=-radio;k<=ext[5];k++, k2++){
524 ptr=(unsigned char *) this->connect->GetOutput()->GetScalarPointer(i,j,k);
525 ptr2=(char *) this->dataprov->GetScalarPointer(i,j,k);
527 if(*ptr==255 && *ptr2==0 && (radio*radio)>=(i2*i2)+(j2*j2)+(k2*k2) && ((radio-1)*(radio-1))<=(i2*i2)+(j2*j2)+(k2*k2) ){
528 this->label=this->label+1;
529 this->vector[this->label-1][0]=0;
530 this->vector[this->label-1][1]=0;
531 this->vector[this->label-1][2]=0;
532 this->vector[this->label-1][3]=0;
533 this->searc(i, j, k);
536 else if(*ptr==0 && *ptr2==0 && (radio*radio)>=(i2*i2)+(j2*j2)+(k2*k2) && ((radio-1)*(radio-1))<=(i2*i2)+(j2*j2)+(k2*k2) ){
537 this->label2=this->label2+1;
538 this->vectorb[this->label2-1][0]=0;
539 this->vectorb[this->label2-1][1]=0;
540 this->vectorb[this->label2-1][2]=0;
541 this->vectorb[this->label2-1][3]=0;
542 this->searc(i, j, k);
560 //----------------------------------------------------------------------------
561 unsigned short axisExtractor::maximo( )
565 unsigned short max=0;
567 this->extrac->GetOutput()->GetExtent(ext);
572 for(i=ext[0];i<=ext[1];i++){
573 for(j=ext[2];j<=ext[3];j++){
574 for(k=ext[4];k<=ext[5];k++){
575 ptr=(unsigned short *)this->extrac->GetOutput()->GetScalarPointer(i,j,k);
592 //----------------------------------------------------------------------------
593 void axisExtractor::blanquear()
598 this->dataprov->GetExtent(ext);
604 for(i=ext[0];i<=ext[1];i++){
605 for(j=ext[2];j<=ext[3];j++){
606 for(k=ext[4];k<=ext[5];k++){
607 ptr=(char *) this->dataprov->GetScalarPointer(i,j,k);
619 //----------------------------------------------------------------------------
620 void axisExtractor::blanquear2()
625 this->datatotal->GetExtent(ext);
631 for(i=ext[0];i<=ext[1];i++){
632 for(j=ext[2];j<=ext[3];j++){
633 for(k=ext[4];k<=ext[5];k++){
634 ptr=(unsigned char *) this->datatotal->GetScalarPointer(i,j,k);
644 //----------------------------------------------------------------------------
645 void axisExtractor::copiar(vtkImageData *data, vtkImageData *data2 )
650 data->GetExtent(ext);
652 unsigned char *ptr, *ptr2;
654 for(i=ext[0];i<=ext[1];i++){
655 for(j=ext[2];j<=ext[3];j++){
656 for(k=ext[4];k<=ext[5];k++){
657 ptr=(unsigned char *) data->GetScalarPointer(i,j,k);
658 ptr2=(unsigned char *) data2->GetScalarPointer(i,j,k);
659 if(*ptr!=0 && *ptr2==0){
673 //----------------------------------------------------------------------------
674 double axisExtractor::distancia(double a[3], double b[3] )
678 return sqrt(((a[0]-b[0])*(a[0]-b[0]))+((a[1]-b[1])*(a[1]-b[1]))+((a[2]-b[2])*(a[2]-b[2])));
688 //----------------------------------------------------------------------------
689 int axisExtractor::envolumen(int a[3], vtkImageData *datae )
698 ptr=(unsigned char *) datae->GetScalarPointer(a);
717 //----------------------------------------------------------------------------
718 void axisExtractor::corte(double punto1[3], double punto2[3], double punto3[3], double centro[3], double radio )
728 m1=punto2[0]-punto1[0];
729 m2=punto2[1]-punto1[1];
730 m3=punto2[2]-punto1[2];
732 b1=punto1[0]-centro[0];
733 b2=punto1[1]-centro[1];
734 b3=punto1[2]-centro[2];
736 c0=m1*m1+m2*m2+m3*m3;
737 c1=2*m1*b1+2*m2*b2+2*m3*b3;
738 c2=b1*b1+b2*b2+b3*b3-radio*radio;
740 roots=vtkMath::SolveQuadratic (c0, c1, c2);
742 if(roots[1]>=0 && roots[1]<=1){
749 punto3[0]=punto1[0]+root*(punto2[0]-punto1[0]);
750 punto3[1]=punto1[1]+root*(punto2[1]-punto1[1]);
751 punto3[2]=punto1[2]+root*(punto2[2]-punto1[2]);
766 //----------------------------------------------------------------------------
767 void axisExtractor::redondear(vtkImageData *data )
773 data->GetExtent(ext);
777 radio=(ext[1]-ext[0])/2;
780 for(i=ext[0], i2=-radio;i<=ext[1];i++, i2++){
781 for(j=ext[2], j2=-radio;j<=ext[3];j++, j2++){
782 for(k=ext[4], k2=-radio;k<=ext[5];k++, k2++){
783 ptr=(unsigned char *) data->GetScalarPointer(i,j,k);
784 tmpsqrt = (i2*i2)+(j2*j2)+(k2*k2);
785 if( radio<sqrt(tmpsqrt) ){
806 //----------------------------------------------------------------------------
807 void axisExtractor::avanzar()
813 double puntoactual[3];
814 double puntoanterior[3];
815 double puntoactualdis[3];
816 double puntoactualcorre[3];
817 int puntoactualarr[3];
820 double vector2[50][3];
822 unsigned long vectortemp[4];
823 double vector2temp[3];
832 double puntoactualcorre2[3];
845 int cantidadanterior=0;
846 int cantidadanteriorb=0;
858 if(!m_Stack0.empty()){
860 indexp=m_Stack.top();
862 puntoactual[0]=m_Stack0.top();
863 puntoactual[1]=m_Stack1.top();
864 puntoactual[2]=m_Stack2.top();
866 puntoanterior[0]=m_Stack3.top();
867 puntoanterior[1]=m_Stack4.top();
868 puntoanterior[2]=m_Stack5.top();
878 dirant[0]=puntoanterior[0]-puntoactual[0];
879 dirant[1]=puntoanterior[1]-puntoactual[1];
880 dirant[2]=puntoanterior[2]-puntoactual[2];
882 radioactual=distancia(puntoactual, puntoanterior);
884 realtoindex(puntoactual, puntoactualarr);
886 for(this->label=1, this->label2=0;flag4==0 &&(this->label>0) && (this->label==1 && ( radiocorte==0 || radiotrabajo<=radiocorte4 ) ) || (this->label>1 && radiotrabajo<=radiocorte4) ;radiotrabajo++){
888 extint[0]=puntoactualarr[0]-radiotrabajo;
889 extint[1]=puntoactualarr[0]+radiotrabajo;
890 extint[2]=puntoactualarr[1]-radiotrabajo;
891 extint[3]=puntoactualarr[1]+radiotrabajo;
892 extint[4]=puntoactualarr[2]-radiotrabajo;
893 extint[5]=puntoactualarr[2]+radiotrabajo;
895 extrac->SetVOI(extint);
896 extrac->UpdateWholeExtent();
898 extrac->GetOutput()->GetExtent(extintreal);
900 if(extint[0]!=extintreal[0] || extint[1]!=extintreal[1] || extint[2]!=extintreal[2] || extint[3]!=extintreal[3] || extint[4]!=extintreal[4] || extint[5]!=extintreal[5]){
906 if(puntoactualarr[0]>=extintreal[0] && puntoactualarr[0]<=extintreal[1] && puntoactualarr[1]>=extintreal[2] && puntoactualarr[1]<=extintreal[3] && puntoactualarr[2]>=extintreal[4] && puntoactualarr[2]<=extintreal[5] ){
908 thresh->ThresholdByUpper(this->maximo()*this->humbral);
909 thresh->UpdateWholeExtent();
912 redondear(thresh->GetOutput());
914 cast->UpdateWholeExtent();
917 connect->RemoveAllSeeds();
918 connect->AddSeed(puntoactualarr[0],puntoactualarr[1],puntoactualarr[2]);
919 connect->UpdateWholeExtent();
922 this->dataprov->Delete();
924 this->dataprov=vtkImageData::New();
925 this->dataprov->SetScalarTypeToChar();
927 this->dataprov->SetExtent(this->connect->GetOutput()->GetExtent());
928 this->dataprov->SetSpacing(this->connect->GetOutput()->GetSpacing());
932 this->find_components();
934 if(this->label2>0 && flag==0){
935 radiocorte=radiotrabajo;
936 vector2b[0]=((double)vectorb[0][1]/(double)vectorb[0][0])-(double)puntoactualarr[0];
937 vector2b[1]=((double)vectorb[0][2]/(double)vectorb[0][0])-(double)puntoactualarr[1];
938 vector2b[2]=((double)vectorb[0][3]/(double)vectorb[0][0])-(double)puntoactualarr[2];
941 if(this->label2>1 && flag5==0){
942 radiocorte5=radiotrabajo;
946 if( this->label>1 && flag2==0){
947 radiocorte2=radiotrabajo;
952 radiocorte6=radiocorte2;
955 radiocorte6=min(radiocorte2, radiocorte5);
958 if((radiocorte6-radiocorte)>1 && flagg<=4){
968 if(this->label>2 && flag3==0){
969 radiocorte3=radiotrabajo;
972 if( this->label==2 && cantidadanterior!=this->label){
973 radiocorte7=radiotrabajo;
976 if( this->label==3 && cantidadanterior!=this->label){
977 radiocorte8=radiotrabajo;
979 if( cantidadanterior!=this->label || cantidadanteriorb!=this->label2){
981 radiocorte4=radiotrabajo+10*(radiotrabajo-radiocorte9);
984 radiocorte4=radiotrabajo+(radiotrabajo-radiocorte9);
986 radiocorte9=radiotrabajo;
989 cantidadanterior=this->label;
990 cantidadanteriorb=this->label2;
996 radiocorte10=radiotrabajo;
999 if(this->label>=2 && radiocorte10!=radiocorte9+1){
1000 radiotrabajo=radiocorte9+1;
1002 extint[0]=puntoactualarr[0]-radiotrabajo;
1003 extint[1]=puntoactualarr[0]+radiotrabajo;
1004 extint[2]=puntoactualarr[1]-radiotrabajo;
1005 extint[3]=puntoactualarr[1]+radiotrabajo;
1006 extint[4]=puntoactualarr[2]-radiotrabajo;
1007 extint[5]=puntoactualarr[2]+radiotrabajo;
1009 extrac->SetVOI(extint);
1010 extrac->UpdateWholeExtent();
1012 extrac->GetOutput()->GetExtent(extintreal);
1014 thresh->ThresholdByUpper(this->maximo()*this->humbral);
1015 thresh->UpdateWholeExtent();
1018 redondear(thresh->GetOutput());
1020 cast->UpdateWholeExtent();
1023 connect->RemoveAllSeeds();
1024 connect->AddSeed(puntoactualarr[0],puntoactualarr[1],puntoactualarr[2]);
1025 connect->UpdateWholeExtent();
1028 this->dataprov->Delete();
1030 this->dataprov=vtkImageData::New();
1031 this->dataprov->SetScalarTypeToChar();
1033 this->dataprov->SetExtent(this->connect->GetOutput()->GetExtent());
1034 this->dataprov->SetSpacing(this->connect->GetOutput()->GetSpacing());
1039 this->find_components();
1046 //printf("no corrigio\n");
1048 realtoreal2(puntoactual, provvc);
1049 points->InsertPoint(buenos,provvc);
1052 lineas->InsertNextCell(2);
1053 lineas->InsertCellPoint(indexp);
1054 lineas->InsertCellPoint(buenos);
1062 //printf("corrigio\n");
1068 norvec=distancia(provvc, vector2b);
1070 proprov=(radiocorte6-radiocorte)/(2*norvec);
1072 puntoactualcorre[0]=(puntoactualarr[0]-(vector2b[0]*proprov));
1073 puntoactualcorre[1]=(puntoactualarr[1]-(vector2b[1]*proprov));
1074 puntoactualcorre[2]=(puntoactualarr[2]-(vector2b[2]*proprov));
1076 indextoreal(puntoactualcorre, puntoactualcorre2);
1078 m_Stack0.push(puntoactualcorre2[0]);
1079 m_Stack1.push(puntoactualcorre2[1]);
1080 m_Stack2.push(puntoactualcorre2[2]);
1081 m_Stack3.push(puntoanterior[0]);
1082 m_Stack4.push(puntoanterior[1]);
1083 m_Stack5.push(puntoanterior[2]);
1084 m_Stack.push(indexp);
1094 for(i=0;i<this->label;i++){
1095 vector2[i][0]=((double)vector[i][1]/(double)vector[i][0])-(double)puntoactualarr[0];
1096 vector2[i][1]=((double)vector[i][2]/(double)vector[i][0])-(double)puntoactualarr[1];
1097 vector2[i][2]=((double)vector[i][3]/(double)vector[i][0])-(double)puntoactualarr[2];
1098 if(maxmasa<vector[i][0]){
1099 maxmasa=vector[i][0];
1103 for(i=0;i<this->label;i++){
1104 for(j=i;j<this->label;j++){
1105 if(vector[j][0]<vector[i][0]){
1106 vectortemp[0]=vector[i][0];
1107 vectortemp[1]=vector[i][1];
1108 vectortemp[2]=vector[i][2];
1109 vectortemp[3]=vector[i][3];
1110 vector2temp[0]=vector2[i][0];
1111 vector2temp[1]=vector2[i][1];
1112 vector2temp[2]=vector2[i][2];
1114 vector[i][0]=vector[j][0];
1115 vector[i][1]=vector[j][1];
1116 vector[i][2]=vector[j][2];
1117 vector[i][3]=vector[j][3];
1118 vector2[i][0]=vector2[j][0];
1119 vector2[i][1]=vector2[j][1];
1120 vector2[i][2]=vector2[j][2];
1122 vector[j][0]=vectortemp[0];
1123 vector[j][1]=vectortemp[1];
1124 vector[j][2]=vectortemp[2];
1125 vector[j][3]=vectortemp[3];
1126 vector2[j][0]=vector2temp[0];
1127 vector2[j][1]=vector2temp[1];
1128 vector2[j][2]=vector2temp[2];
1135 for(i=0;i<this->label;i++){
1136 if(maxmasa*this->minpropmasa<vector[i][0]){
1138 indesxdis[0]=(int) (puntoactualarr[0]+vector2[i][0]);
1139 indesxdis[1]=(int) (puntoactualarr[1]+vector2[i][1]);
1140 indesxdis[2]=(int) (puntoactualarr[2]+vector2[i][2]);
1142 indextoreal(indesxdis, puntoactualdis);
1144 if(envolumen(indesxdis, datatotal)==0){
1145 m_Stack0.push(puntoactualdis[0]);
1146 m_Stack1.push(puntoactualdis[1]);
1147 m_Stack2.push(puntoactualdis[2]);
1148 m_Stack3.push(puntoactual[0]);
1149 m_Stack4.push(puntoactual[1]);
1150 m_Stack5.push(puntoactual[2]);
1151 m_Stack.push(buenos-1);
1159 copiar(this->connect->GetOutput(), datatotal );