<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New" size=2>This problem
has already been discussed in the past, but the solution proposed seems no to
work for me. Actually, I try to implement the tcl example code voxelModel.tcl in
C++, but the program does not compile properly.</FONT></SPAN></DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New" size=2>The code
snippet is:</FONT></SPAN></DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New" size=2>1
vtkSphereSource *sphere = vtkSphereSource::New();<BR>2
sphere->SetThetaResolution(10);<BR>3
sphere->SetPhiResolution(10);<BR> <BR>4 vtkVoxelModeller *modeller
= vtkVoxelModeller::New();<BR>5
modeller->SetInput(sphere->GetOutput());<BR>6
modeller->SetSampleDimensions(21,21,21);<BR>7
modeller->SetModelBounds(-1.5,1.5,-1.5,1.5,-1.5,1.5);<BR> <BR>8
vtkDataSetWriter *writer = vtkDataSetWriter::New();<BR>9
writer->SetFileName("voxelModel.vtk");<BR>10
writer->SetInput(modeller->GetOutput());<BR>11
writer->Update();<BR> <BR>12 vtkDataSetReader *reader =
vtkDataSetReader::New();<BR>13
reader->SetFileName("voxelModel.vtk");</FONT></SPAN></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New" size=2>14
vtkContourFilter *contour = vtkContourFilter::New();<BR>15
contour->SetInput(reader->GetOutput());<BR>16
contour->SetValue(0,0.999);<BR> <BR>17 vtkPolyDataMapper
*polyDataMapper = vtkPolyDataMapper::New();<BR>18
polyDataMapper->SetInput(contour->GetOutput());<BR></FONT></SPAN></DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New" size=2>The compiler
error is at line 10:</FONT></SPAN></DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2>mexVTKVoxelRenderer.cpp:110: error: no matching function for call to
`vtkDataSetWriter::SetInput(vtkImageData*)'
<BR>C:/Engineering/VTK5p0p2/include/vtk-5.0/vtkWriter.h:63: note: candidates
are: void vtkWriter::SetInput(vtkDataObject*)
<BR>C:/Engineering/VTK5p0p2/include/vtk-5.0/vtkWriter.h:64:
note:
void vtkWriter::SetInput(int, vtkDataObject*) <BR></FONT></SPAN></DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New" size=2>Since I am
vtk newbie, it might be only a simple error. Anyway, I would appreciate any kind
of help.</FONT></SPAN></DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2>Stefan</DIV></FONT></SPAN>
<DIV><SPAN class=908070218-25012007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV align=left><!-- Converted from text/plain format --><FONT
face="Courier New" size=2>--------------------------------<BR>Stefan
Gächter <BR>PhD
Student/Research Assistant<BR>Swiss Federal Institute of Technology
(ETHZ)<BR>Autonomous Systems Lab (ASL)<BR>Office CLA E11.2<BR>Tannenstrasse
3<BR>8092 Zürich,
Switzerland<BR>44-632-73-95<BR>stefan.gaechter@mavt.ethz.ch<BR></FONT><A
href="http://www.asl.ethz.ch/"><FONT face="Courier New"
size=2>http://www.asl.ethz.ch</FONT></A><BR><FONT face="Courier New"
size=2>--------------------------------<BR>Please consider the environment
before printing this email.<BR>--------------------------------<BR></FONT></DIV>
<DIV> </DIV></BODY></HTML>