<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 99 bmp files of dimension 200*200 </DIV>
<BLOCKQUOTE class=replbq style="BORDER-LEFT: #1010ff 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px">
<P> vtkBMPReader *Reader = vtkBMPReader::New();<BR> Reader-> SetHeaderSize(14);<BR> Reader->SetDataExtent (0,199,0,199,1,99);<BR> Reader->SetDataScalarTypeToUnsignedChar();<BR> Reader->SetDataByteOrderToLittleEndian();<BR> Reader->SetFilePrefix ("d:/bym280602b/n_"); // base file prefix for a series<BR> Reader->SetFilePattern ("%s%03d.bmp");<BR> Reader->Update();</P>
<P> oTFun =vtkPiecewiseFunction::New();<BR> oTFun->AddPoint(0,0);<BR> oTFun->AddPoint(255,1);</P>
<P> vtkPiecewiseFunction *gTFun =vtkPiecewiseFunction::New();<BR> gTFun->AddSegment(0,1.0,5,1.0);</P>
<P> volProperty = vtkVolumeProperty::New();<BR> volProperty->SetColor(gTFun);<BR> volProperty->SetScalarOpacity(oTFun);<BR> volProperty->SetInterpolationTypeToLinear();<BR> volProperty->ShadeOn();<BR> <BR> vtkVolumeRayCastCompositeFunction *compositeFunction= vtkVolumeRayCastCompositeFunction::New();<BR> volMapper = vtkVolumeRayCastMapper::New();<BR> volMapper->SetInput(Reader->GetOutput()); <BR> volMapper->SetVolumeRayCastFunction(compositeFunction);</P>
<P> vol=vtkVolume::New();<BR> vol->SetMapper(volMapper); <BR> vol->SetProperty(volProperty);</P>
<P> ren=vtkRenderer::New();<BR> ren->AddVolume(vol); </P>
<P> renwin=vtkRenderWindow::New();<BR> renwin->AddRenderer(ren);<BR> <BR> iren=vtkRenderWindowInteractor::New();<BR> iren->SetRenderWindow(renwin);<BR> renwin->Render();<BR> <BR> 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 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>><BR>> V. Varadhan.<BR>><BR>>> hello sir,<BR>>><BR>>> as directed by you, i have tried reading a series of bmp files, but i am<BR>>> unable to do so.<BR>>> here is the code that i have used<BR>>><BR>>> # For 512 x 512 images foo1 to foo100<BR>>><BR>>> vtkBMPReader* bmp_d = vtkBMPReader::New();<BR>>> bmp_d->SetFileName ("c:/foo"); // base file prefix for a series<BR>>> bmp_d->SetFilePattern ("%s%d.bmp");<BR>>> bmpData->SetDataExtent (0,511,0,511,1,100);<BR>>> vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();<BR>>> mapper->SetInput( (vtkPolyData*) bmp_d->GetOutput());<BR>>> vtkRenderer* ren = vtkRenderer::New();<BR>>> vtkRenderWindow* renwin = vtkRenderWindow::New();<BR>>> renwin->AddRenderer (ren);<BR>>> vtkActor* actor =
vtkActor::New();<BR>>> actor->SetMapper (mapper);<BR>>> ren->AddActor (actor);<BR>>> renwin->Render();<BR>>><BR>>> Please suggest<BR>>><BR>>> Thanks for your help in advance<BR>>> Megha<BR>>><BR>>><BR>>> Win an evening with the Indian cricket captain: Yahoo! India Promos.<BR>><BR>> _______________________________________________<BR>> This is the private VTK discussion list.<BR>> Please keep messages on-topic. Check the FAQ at:<BR>> <BR>> Follow this link to subscribe/unsubscribe:<BR>> http://www.vtk.org/mailman/listinfo/vtkusers<BR>><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>