[vtkusers] Vsacular multiframe images

Kulkarni, Smita (MED) Smita.Kulkarni at geind.ge.com
Sat Sep 14 01:14:13 EDT 2002


Hi all,
I need help in viewing a multi-frame image using VTK. The following program
shows the first frame all the time. I am not able to view the subsequent
frames. I am able to view a range of single-frame images using a similar
program however. Please advise.

#include < vtkVolume16Reader.h>
#include < vtkImageViewer.h >
void main()
{
vtkVolume16Reader *reader = vtkVolume16Reader ::New(); //object declaration
reader->SetDataByteOrderToBigEndian();	// Byte Declarartion
reader->SetHeaderSize(0);		// Header Size
reader->SetDataDimensions(1024,1024);	// Width & Height	
reader->SetFilePrefix ("e:\\im\\record_for_DSA_massy"  );	// File Path
reader->SetFilePattern( "%s");	// File pattern	
vtkImageViewer  *viewer= vtkImageViewer::New();
viewer->SetInput (reader-> GetOutput());	//pipline pass data to
mapper
viewer->SetColorWindow(1000);		// Brightness
viewer->SetColorLevel( 512);		// contrast	
viewer->Render();
getchar();
for (int i = 0; i < 12; ++i)		// 12 frame image
    {
    // next image
    viewer->SetZSlice( i );
    // render the image
    viewer->Render();
    }

getchar();
reader->Delete();
viewer->Delete();
}

Thanks a lot,
Smita.



"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this 
communication is strictly Prohibited. 
If you have received this message by error, please notify us 
immediately, return the original mail to the sender and delete the 
message from your system."




More information about the vtkusers mailing list