-
-
- double *ptrX = (double *)imageX->GetScalarPointer();
- double *ptrY = (double *)imageY->GetScalarPointer();
- double *ptrZ = (double *)imageZ->GetScalarPointer();
-
- long int sizeimage = dim[0]*dim[1]*dim[2];
-
- vtkDoubleArray *array = vtkDoubleArray::New();
- array->SetNumberOfTuples(sizeimage);
- array->SetNumberOfComponents(3);
- array->Allocate(sizeimage*3, 100 ); // ???
- array->SetName("velocity");
-
- double vx;
- double vy;
- double vz;
-
- int i;
-
+ double *ptrX=NULL, *ptrY=NULL, *ptrZ=NULL;
+ double *ptrD1=NULL, *ptrD2=NULL, *ptrD3=NULL, *ptrD4=NULL, *ptrD5=NULL, *ptrD6=NULL;
+
+ if (imageX!=NULL) ptrX = (double *)imageX->GetScalarPointer();
+ if (imageY!=NULL) ptrY = (double *)imageY->GetScalarPointer();
+ if (imageZ!=NULL) ptrZ = (double *)imageZ->GetScalarPointer();
+ if (Data1 !=NULL) ptrD1 = (double *)Data1->GetScalarPointer();
+ if (Data2 !=NULL) ptrD2 = (double *)Data2->GetScalarPointer();
+ if (Data3 !=NULL) ptrD3 = (double *)Data3->GetScalarPointer();
+ if (Data4 !=NULL) ptrD4 = (double *)Data4->GetScalarPointer();
+ if (Data5 !=NULL) ptrD5 = (double *)Data5->GetScalarPointer();
+ if (Data6 !=NULL) ptrD6 = (double *)Data6->GetScalarPointer();
+
+ long int sizeimage = dim[0]*dim[1]*dim[2];
+ int components=3;
+// if ((Data1!=NULL) && (Data2==NULL) && (Data3==NULL) && (Data4==NULL) && (Data5==NULL) && (Data6==NULL) ) { components=4; }
+// if ((Data1!=NULL) && (Data2!=NULL) && (Data3!=NULL) && (Data4==NULL) && (Data5==NULL) && (Data6==NULL) ) { components=6; }
+// if ((Data1!=NULL) && (Data2!=NULL) && (Data3!=NULL) && (Data4!=NULL) && (Data5!=NULL) && (Data6!=NULL) ) { components=9; }
+ vtkDoubleArray *array = vtkDoubleArray::New();
+ array->SetNumberOfTuples(sizeimage);
+ array->SetNumberOfComponents(components);
+ array->Allocate(sizeimage*components, 100 ); // ???
+ array->SetName("velocity");
+
+ vtkDoubleArray *array2 = vtkDoubleArray::New();
+ array2->SetNumberOfTuples(sizeimage);
+ array2->SetNumberOfComponents(1);
+ array2->Allocate(sizeimage*1, 100 ); // ???
+ array2->SetName("angle");
+
+printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+
+ double vx,vy,vz,d1=0,d2=0,d3=0,d4=0,d5=0,d6=0;
+ int i;