<DIV><BR>hi all,</DIV>
<DIV>Thanks to all who helped me regarding bmp files at last i have been able to read a series of bmp files.</DIV>
<DIV>The code that i have used is</DIV>
<DIV><BR>For&nbsp;99 bmp files of dimension 200*200&nbsp;</DIV>
<BLOCKQUOTE class=replbq style="BORDER-LEFT: #1010ff 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px">
<P>&nbsp;&nbsp;vtkBMPReader *Reader = vtkBMPReader::New();<BR>&nbsp;&nbsp;Reader-&gt; SetHeaderSize(14);<BR>&nbsp;&nbsp;Reader-&gt;SetDataExtent (0,199,0,199,1,99);<BR>&nbsp;&nbsp;Reader-&gt;SetDataScalarTypeToUnsignedChar();<BR>&nbsp;&nbsp;Reader-&gt;SetDataByteOrderToLittleEndian();<BR>&nbsp; Reader-&gt;SetFilePrefix ("d:/bym280602b/n_"); // base file prefix for a series<BR>&nbsp;&nbsp;Reader-&gt;SetFilePattern ("%s%03d.bmp");<BR>&nbsp;&nbsp;Reader-&gt;Update();</P>
<P>&nbsp;&nbsp; oTFun =vtkPiecewiseFunction::New();<BR>&nbsp;&nbsp;&nbsp;oTFun-&gt;AddPoint(0,0);<BR>&nbsp;&nbsp; oTFun-&gt;AddPoint(255,1);</P>
<P>&nbsp;vtkPiecewiseFunction *gTFun =vtkPiecewiseFunction::New();<BR>&nbsp;&nbsp;gTFun-&gt;AddSegment(0,1.0,5,1.0);</P>
<P>&nbsp;&nbsp; volProperty = vtkVolumeProperty::New();<BR>&nbsp;&nbsp;&nbsp;volProperty-&gt;SetColor(gTFun);<BR>&nbsp;&nbsp;volProperty-&gt;SetScalarOpacity(oTFun);<BR>&nbsp;&nbsp;volProperty-&gt;SetInterpolationTypeToLinear();<BR>&nbsp;&nbsp;volProperty-&gt;ShadeOn();<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp; vtkVolumeRayCastCompositeFunction *compositeFunction=&nbsp;&nbsp; vtkVolumeRayCastCompositeFunction::New();<BR>&nbsp;&nbsp;volMapper = vtkVolumeRayCastMapper::New();<BR>&nbsp;&nbsp;volMapper-&gt;SetInput(Reader-&gt;GetOutput()); <BR>&nbsp;&nbsp;volMapper-&gt;SetVolumeRayCastFunction(compositeFunction);</P>
<P>&nbsp;&nbsp;vol=vtkVolume::New();<BR>&nbsp;&nbsp;vol-&gt;SetMapper(volMapper);&nbsp; <BR>&nbsp;&nbsp;vol-&gt;SetProperty(volProperty);</P>
<P>&nbsp;ren=vtkRenderer::New();<BR>&nbsp;&nbsp;ren-&gt;AddVolume(vol);&nbsp;&nbsp;</P>
<P>&nbsp;&nbsp;&nbsp;renwin=vtkRenderWindow::New();<BR>&nbsp;&nbsp;renwin-&gt;AddRenderer(ren);<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; iren=vtkRenderWindowInteractor::New();<BR>&nbsp;&nbsp;iren-&gt;SetRenderWindow(renwin);<BR>&nbsp; renwin-&gt;Render();<BR>&nbsp;&nbsp;<BR>&nbsp;This is generating the image but in a distorted form. By distorted I mean that the points are getting overlapped, as a result I am not able to get the final correct image.</P>
<P>I think that the&nbsp;header size if bmp file is 14bytes and i have already set it. Is there some other property that i have to consider?</P>
<P>megha<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> be able to help you.<BR>&gt;<BR>&gt; V. Varadhan.<BR>&gt;<BR>&gt;&gt; hello sir,<BR>&gt;&gt;<BR>&gt;&gt; as directed by you, i have tried reading a series of bmp files, but i am<BR>&gt;&gt; unable to do so.<BR>&gt;&gt; here is the code that i have used<BR>&gt;&gt;<BR>&gt;&gt; # For 512 x 512 images foo1 to foo100<BR>&gt;&gt;<BR>&gt;&gt; vtkBMPReader* bmp_d = vtkBMPReader::New();<BR>&gt;&gt; bmp_d-&gt;SetFileName ("c:/foo"); // base file prefix for a series<BR>&gt;&gt; bmp_d-&gt;SetFilePattern ("%s%d.bmp");<BR>&gt;&gt; bmpData-&gt;SetDataExtent (0,511,0,511,1,100);<BR>&gt;&gt; vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();<BR>&gt;&gt; mapper-&gt;SetInput( (vtkPolyData*) bmp_d-&gt;GetOutput());<BR>&gt;&gt; vtkRenderer* ren = vtkRenderer::New();<BR>&gt;&gt; vtkRenderWindow* renwin = vtkRenderWindow::New();<BR>&gt;&gt; renwin-&gt;AddRenderer (ren);<BR>&gt;&gt; vtkActor* actor =
 vtkActor::New();<BR>&gt;&gt; actor-&gt;SetMapper (mapper);<BR>&gt;&gt; ren-&gt;AddActor (actor);<BR>&gt;&gt; renwin-&gt;Render();<BR>&gt;&gt;<BR>&gt;&gt; Please suggest<BR>&gt;&gt;<BR>&gt;&gt; Thanks for your help in advance<BR>&gt;&gt; Megha<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt; Win an evening with the Indian cricket captain: Yahoo! India Promos.<BR>&gt;<BR>&gt; _______________________________________________<BR>&gt; This is the private VTK discussion list.<BR>&gt; Please keep messages on-topic. Check the FAQ at:<BR>&gt; <BR>&gt; Follow this link to subscribe/unsubscribe:<BR>&gt; http://www.vtk.org/mailman/listinfo/vtkusers<BR>&gt;<BR><BR>_______________________________________________<BR>This is the private VTK discussion list. <BR>Please keep messages on-topic. Check the FAQ at: <BR>Follow this link to subscribe/unsubscribe:<BR>http://www.vtk.org/mailman/listinfo/vtkusers</P></BLOCKQUOTE><p><font face=arial size=-1>
<a href="http://in.rd.yahoo.com/specials/mailtg/*http://yahoo.shaadi.com/india-matrimony/" target="_blank">
<b>Yahoo! India Matrimony</a>:</b> Find your partner 
<a href="http://in.rd.yahoo.com/specials/mailtg2/*http://yahoo.shaadi.com/india-matrimony/community.php" target="_blank">online</a>.</font>