[vtkusers] creating images
art langly
doyouthinkmaybeyoucoulsugestoneforme at hotmail.com
Wed May 26 13:54:33 EDT 2004
Hello users,
I am using the vtkParallelManager interface (via vtkCompositeRenderManager)
to create composite images....
What type of info does GetPixelData return? rgb array of size
width*height*3?, rgba array of size width*height*4, or... ?
I have been assuming rgba, size width*height*4 and i am attempting to write
images with a number of different vtkImageWriter conc. classes.. jpeg, bmp,
pnm, png, tiff, and post script...
after acquiring the vtkUnsignedCharArray (I guess i can just check the size
and number of components of this array to determine what was returned
couldnt i???) either way, if it isnt 4 component data maybe thats my
problem, otherwise...
i create an instance of vtkImageData...
imageData->GetPointData()->SetScalars(dataArray);
imageData->SetScalarType(VTK_UNSIGNED_CHAR);
imageData->SetSpacing(1.,1.,1.); //?
imageData->SetOrigin(0.,0.,0.); //?
imageData->SetNumberOfScalarComponents(4);
imageData->SetDimensions(width,height,1);
where dataArray was acquired through
vtkCompositeRenderManager::GetPixelData...
this works fine w/ jpegs & bmp's, but not for pnm's, png's, tiffs, or post
script (but the post script writer does not work w/ 4 component data)
any suggestions for what i am doing wrong? or.. what should i do in order to
get any specific writer to work with the data returned from
vtkCompositeRenderManager::GetPixelData?
Additionaly, I have a non-vtk composite function... it produces a
width*height*4 size array of rgba values (transperency is not handled well,
but the alpha values are there), I then create a vtkUnsignedCharArray w/ the
c unsigned char array and procceed as I do when using the render manager,
but the results are the same...
Thanks for your time
art langly
ps. im using mpi, the problems w/ the images seem to be independent if I
handle mpi on my own or if i use vtkMPIController
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
More information about the vtkusers
mailing list