Hello everyone,
I'm writing you this email because we need to get the .png image from a Data
Entity.
We browse through the data tree like this:
Core::DataEntity::Pointer dataEntity1;
Core::DataEntityList::Pointer dataEntityList =
GetListBrowser()->GetDataEntityList();
Core::DataEntityList::iterator it = dataEntityList->Begin();
Core::DataEntityHelper helper;
for ( int i=0; it != dataEntityList->End(); ++it,i++)
{
dataEntity1 = dataEntityList->Get(it);
(...)
}
We need to get a file with the .png image from each dataEntity. I have tried to
find an example in the existing source code, I have found the following lines
after:
vtkRenderer* vtkrenderer;
wxColour paleWhite(241,244,250);
vtkrenderer = Get3D()->GetRenderer()->GetVtkRenderer();
vtkrenderer->SetBackground(1,1,1);
vtkRenderLargeImage* renderLarge = vtkRenderLargeImage::New();
renderLarge->SetInput(vtkrenderer);
vtkPNGWriter* writer=vtkPNGWriter::New();
writer->SetInputConnection(renderLarge->GetOutputPort());
writer->SetFileName(imageName.c_str()) ;
writer->Write();
vtkrenderer->SetBackground(0,0,0);
Which is perfect for saving image of the current view, but the image has to be
already loaded in the working area, and we need to get the image .png from the
data entity, maybe going through vtkSmartPointer< vtkImageData > vtkImage; but
I do not know how I could do this.
Do you have any idea to solve this? I would appreciate your help.
Thank you very much in advance.
Best regards,
Miriam Quintero PadrĂ³n
------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive
this e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos
group liability cannot be triggered for the message content. Although
the sender endeavours to maintain a computer virus-free network,
the sender does not warrant that this transmission is virus-free and
will not be liable for any damages resulting from any virus transmitted.
Este mensaje y los ficheros adjuntos pueden contener informacion confidencial
destinada solamente a la(s) persona(s) mencionadas anteriormente
pueden estar protegidos por secreto profesional.
Si usted recibe este correo electronico por error, gracias por informar
inmediatamente al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
no se hace responsable por su contenido. Su contenido no constituye ningun
compromiso para el grupo Atos, salvo ratificacion escrita por ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus.
------------------------------------------------------------------
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers