<DIV>Hi friends,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>I wanted to open the&nbsp;.vtk file using mayavi visualizer.But iam getting no scalar data represented erro when i was trying to&nbsp;watch the isosurface in the modules of mayavi.What changes i should made?&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>#include &lt;vtkImageImport.h&gt;<BR>#include &lt;vtkImageDataGeometryFilter.h&gt;<BR>#include &lt;fstream.h&gt;<BR>#include &lt;vtkPolyDataWriter.h&gt;</DIV>
<DIV>class dcmvtk<BR>{<BR>private:<BR>&nbsp;vtkImageImport *imageim;<BR>&nbsp;vtkImageDataGeometryFilter *gfil;<BR>&nbsp;vtkPolyDataWriter *vw;<BR>&nbsp;const char* s;<BR>public:<BR>&nbsp;dcmvtk();<BR>&nbsp;~dcmvtk();<BR>};<BR>dcmvtk::dcmvtk()<BR>{<BR>&nbsp;unsigned char* p = NULL;<BR>&nbsp;if(p != NULL)<BR>&nbsp;{<BR>&nbsp;&nbsp;delete []p;<BR>&nbsp;&nbsp;p = NULL;<BR>&nbsp;}<BR>&nbsp;p = new unsigned char[256*256*2*9];<BR>&nbsp;s="D:/vtk/PET_after_preFilter.raw";<BR>&nbsp;ifstream is(s,ios::in | ios::out | ios::binary);<BR>&nbsp;is.read(p,256*256*2*9);<BR>&nbsp;is.close();<BR>&nbsp;&nbsp;&nbsp;
 imageim=vtkImageImport::New();<BR>&nbsp;imageim-&gt;SetImportVoidPointer((void*)p,1);<BR>&nbsp;imageim-&gt;SetDataExtent(0,255,0,255,0,8);<BR>&nbsp;imageim-&gt;SetWholeExtent(0,255,0,255,0,8);<BR>&nbsp;imageim-&gt;SetDataSpacing(1.96,1.96,3.92);<BR>&nbsp;imageim-&gt;SetDataOrigin(0.0,0.0,0.0);<BR>&nbsp;imageim-&gt;SetDataScalarTypeToUnsignedShort();<BR>&nbsp;gfil=vtkImageDataGeometryFilter::New();<BR>&nbsp;gfil-&gt;SetInput(imageim-&gt;GetOutput());<BR>&nbsp;ofstream ofile;<BR>&nbsp;<BR>&nbsp;const char* f=new char[256*256*9*2];<BR>&nbsp;&nbsp;f="d:/dcm2.vtk";<BR>&nbsp;&nbsp;ofile.open(f,ios::in | ios::out | ios::binary);<BR>&nbsp;&nbsp;vw=vtkPolyDataWriter::New();</DIV>
<DIV>&nbsp;&nbsp;vw-&gt;SetInput(gfil-&gt;GetOutput());<BR>&nbsp;&nbsp;vw-&gt;SetFileName(f);<BR>&nbsp;&nbsp;vw-&gt;SetFileTypeToBinary();<BR>&nbsp;&nbsp;vw-&gt;Write();<BR>}<BR>dcmvtk::~dcmvtk()<BR>{<BR>&nbsp;imageim-&gt;Delete();<BR>&nbsp;gfil-&gt;Delete();<BR>&nbsp;&nbsp;&nbsp; vw-&gt;Delete();<BR>}<BR>int main(int argc, char *argv[])<BR>{<BR>&nbsp;dcmvtk dc;<BR>&nbsp;return 0;<BR>}</DIV><p>
                <hr size=1>Yahoo! Mail Mobile<br> 
<a href="http://us.rd.yahoo.com/mail_us/taglines/mobile/*http://mobile.yahoo.com/learn/mail">Take Yahoo! Mail with you!</a> Check email on your mobile phone.