COMPLEXOUTPUTS:2
COMPLEX_PORT
Widget
-43.902100:-98.162712:-900.000000
+-2.239362:-103.517011:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
boxchange
-2.719569:-99.199517:-900.000000
+-21.059819:-100.774311:-900.000000
FIN_COMPLEX_PORT
COMPLEXINPUTS:2
COMPLEX_PORT
Renderer
--76.250351:96.135240:-900.000000
+27.686049:87.001435:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
In
BOX
creaVtk:PlaneWidget:Box01
ISEXEC:FALSE
--21.579484:-8.987179:-900.000000
-23.995516:-18.987179:-900.000000
+15.270694:-28.357144:-900.000000
+60.845694:-38.357144:-900.000000
PORT
Active:"true"
PORT
BOX
std:MagicBox:Box02
ISEXEC:FALSE
--75.688060:56.627905:-900.000000
--30.113060:46.627905:-900.000000
+21.476726:47.966538:-900.000000
+67.051726:37.966538:-900.000000
FIN_BOX
BOX
creaVtk:PlaneWidget_StreamLineVisu_Interface:Box03
ISEXEC:FALSE
--1.056909:57.144870:-900.000000
-70.118091:47.144870:-900.000000
+-76.332059:46.908709:-900.000000
+-5.157059:36.908709:-900.000000
FIN_BOX
BOX
vtk:vtkImageDataPointerRelay:Box04
ISEXEC:FALSE
-92.104177:56.032598:-900.000000
-163.279177:46.032598:-900.000000
+81.238099:47.686190:-900.000000
+152.413099:37.686190:-900.000000
FIN_BOX
CONNECTIONS:17
CONNECTION
BBTK_DECLARE_INPUT(X, vtkImageData*);
BBTK_DECLARE_INPUT(Y, vtkImageData*);
BBTK_DECLARE_INPUT(Z, vtkImageData*);
- BBTK_DECLARE_OUTPUT(ImageEnsemble, vtkStructuredPoints*);
+ BBTK_DECLARE_OUTPUT(ImageEnsemble, vtkImageData*);
BBTK_PROCESS(Process);
void Process();
//=====
BBTK_INPUT(ImageDataStructuredPoints,X,"Image X",vtkImageData*,"");
BBTK_INPUT(ImageDataStructuredPoints,Y,"Image Y",vtkImageData*,"");
BBTK_INPUT(ImageDataStructuredPoints,Z,"Image Z",vtkImageData*,"");
-BBTK_OUTPUT(ImageDataStructuredPoints,ImageEnsemble,"Image Ensemble",vtkStructuredPoints*,"");
+BBTK_OUTPUT(ImageDataStructuredPoints,ImageEnsemble,"Image Ensemble",vtkImageData*,"");
BBTK_END_DESCRIBE_BLACK_BOX(ImageDataStructuredPoints);
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
printf("EED creaVtkStreamLine::Process StreamLine PrintSelf\n");
_streamer->Print(std::cout);
+printf("EED creaVtkStreamLine::Process StreamLine->GetOutput() PrintSelf\n");
+ _streamer->GetOutput()->Print(std::cout);
+
+
//EED 3aout2011
_tubefilter->SetInput(_streamer->GetOutput());
_tubefilter->SetRadius( GetScaleFactor() );
_actor->SetMapper( _streamMapper2 );
+printf("EED lib creaVTK creaVtkStreamLine::Process opacity %f\n", GetOpacity() );
_actor->GetProperty()->SetOpacity( GetOpacity() );
}// _active
*/
#include "vtkImageDataStrucPoints.h"
+#include "vtkStructuredPointsWriter.h"
+
vtkImageDataStrucPoints::vtkImageDataStrucPoints()
{
imageY->GetSpacing(spc);
- vtkDoubleArray *arrayX;
- vtkDoubleArray *arrayY;
- vtkDoubleArray *arrayZ;
- unsigned char *ptrUCharX = (unsigned char *)imageX->GetScalarPointer();
- unsigned char *ptrUCharY = (unsigned char *)imageY->GetScalarPointer();
- unsigned char *ptrUCharZ = (unsigned char *)imageZ->GetScalarPointer();
+ double *ptrUCharX = (double *)imageX->GetScalarPointer();
+ double *ptrUCharY = (double *)imageY->GetScalarPointer();
+ double *ptrUCharZ = (double *)imageZ->GetScalarPointer();
long int sizeimage = dim[0]*dim[1]*dim[2];
double vz;
int i;
+
+printf("EED vtkImageDataStrucPoints::joinComponents sizeimage%d\n", sizeimage );
for( i = 0 ; i < sizeimage ; i++ )
{
- vx = *ptrUCharX;
- vy = *ptrUCharY;
- vz = *ptrUCharZ;
- ptrUCharX++;
- ptrUCharY++;
- ptrUCharZ++;
- array->SetTuple3(i,vx, vy , vz );
+ vx = *ptrUCharX;
+ vy = *ptrUCharY;
+ vz = *ptrUCharZ;
+ ptrUCharX++;
+ ptrUCharY++;
+ ptrUCharZ++;
+ array->SetTuple3(i,vx, vy , vz );
} // for i
-
-
_structuredPoints = vtkStructuredPoints::New();
_structuredPoints->SetDimensions(dim[0], dim[1], dim[2]);
_structuredPoints->SetSpacing(spc);
- _structuredPoints->SetScalarTypeToFloat();
- _structuredPoints->SetNumberOfScalarComponents(1);
+ _structuredPoints->SetScalarTypeToDouble();
+ _structuredPoints->SetNumberOfScalarComponents(3);
_structuredPoints->GetPointData()->SetVectors(array);
_structuredPoints->GetPointData()->SetNumberOfTuples(sizeimage);
+ _structuredPoints->Modified();
+ _structuredPoints->Update();
+
+ _structuredPoints->Print(cout);
+
+ vtkStructuredPointsWriter *writer2 = vtkStructuredPointsWriter::New();
+ writer2->SetFileName("/home/davila/tmp/VectorfromCal_EED_ups.vtk");
+ //writer->SetFileTypeToBinary();
+ writer2->SetFileTypeToASCII();
+ writer2->SetTensorsName("VectorfromCal");
+ writer2->SetFieldDataName("GlyphVector");
+ writer2->SetScalarsName("Scalar");
+ writer2->SetInput(_structuredPoints);
+ writer2->Write();
+
+
+
}
_typeForm = 0;
_LutEED = vtkLookupTableDirectionVector::New();
- _LutEED->SetVectorMode(0);
+// _LutEED->SetVectorMode(0);
+//_LutEED->SetVectorModeToMagnitude();
+//_LutEED->SetVectorModeToComponent();
+_LutEED->SetVectorModeToRGBColors();
+
+
_pdm = vtkPolyDataMapper::New();
_actor = vtkActor::New();