[vtkusers] JPEG Output for non UNSIGNED_CHAR dataset

Jérôme Coloos jerome.coloos at samcef.com
Tue Jan 16 05:05:21 EST 2001


Hi everybody,

I'm trying to make a JPEG output of my VTK window by using the
vtkLibJPEGPacker class which I found on
http://www.cineca.it/download/devel/index.html

But it seems to work only with UNSIGNED_CHAR vtkImageData.

My question is :

How to transform the vtkImageData into an UNSIGNED_CHAR one ?

Thank you.


The code I used for the export is the following :
============================================================================
vtkWindowToImageFilter* renSrc = vtkWindowToImageFilter::New();
	renSrc->SetInput(myclass->renWin);

vtkLibJPEGPacker *packer = vtkLibJPEGPacker::New();
	packer ->SetInput (renSrc->GetOutput());
	packer ->PackToFileOn();
	packer ->SetFileName("toto.jpg");
	packer ->Pack();
============================================================================
=
_______________________________________
   ___    Jérôme COLOOS
 @/   \@  Tel : 32-4/361.69.69
  \° °/   Fax : 32-4/361.69.80
 ==\ /==  mailto:jerome.coloos at samcef.com
    °     http://www.samcef.com
SAMTECH s.a.
Parc Scientifique du Sart-Tilman
rue des Chasseurs-Ardennais, 8
B-4031 Angleur-LIEGE
___________________________________________





More information about the vtkusers mailing list