Hi Miriam,

 

                Sorry for the late answer. I forgot your email…

 

                What you are trying to do is very interesting!!! We already
have a thumbnail viewer widget that allows to visualize snapshots. There are
several medical imaging software that uses snapshots to easily identify the
currently loaded images and allow the user to select the data using
snapshots instead of names in the data tree. One of this software is Osirix:
http://www.osirix-viewer.com/screenshots/Picture1.png. We would like to add
this feature in GIMIAS.

 

                What the other software does is to use a single 2D DICOM
image, and use it as snapshot. This feature is easy to develop in GIMIAS,
adding the 2D image in the MetaData of the DataEntity and retrieve it when
needed. However, this approach only works for DICOM images and not for other
types of data.

 

                If you want to visualize a snapshot for all types of data,
we need to take another approach. I propose you to take the snapshot from a
rendering window, using the code you provided. For example, there could be a
button that allows the user to take a snapshot of the current 3D view and
save it as a snapshot. You can store the 2D image using the MetaData.  When
the data is stored into disk, you can store the snapshot together and load
it again when the data is loaded again. So the snapshot only needs to be
created once.

 

                Let me know if this can help you.

 

Best,

Xavi

 

 

From: Ana Maria Quintero Padron [mailto:[email protected]] 
Sent: viernes, 03 de febrero de 2012 11:56
To: [email protected]
Subject: [Gimias-developers] the .png image from a Data Entity

 

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. 
------------------------------------------------------------------

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers

Reply via email to