title: vtk convert 2d image to 3d (c++)
body: <p>I've been reading the doxygen and the vtk wiki for days and I'm still not 100% sure what I'm asking is even possible.</p>
  
  <p>What I want to accomplish is to take an input 2d image in a common format(ie PNG) and output a 3d model(PNG -> Model/Mesh or 2d -> 3d).  A good example of this would be that if I draw a cube in MS paint and save the drawing as a PNG, then read the image and produce a 3d model of that cube. So my first question is is this possible?  IT seems like there should be some way of taking the image data and converting to polydata and doind the model building from there.  This is what I have in mind(in c++):</p>
  
  <pre><code>int main(int argc, char *argv[])
  {
  //Verify correct number of input arguements 
  if(argc &lt; 2)
  {
      fprintf(stderr, "Usage: %s Filename(.png)\n");
      return EXIT_FAILURE;
  }   
  std::string fileName = argv[1];
  //Read file
  vtkSmartPointer&lt;vtkImageReader2Factory&gt; readerFactory =         vtkSmartPointer&lt;vtkImageReader2Factory&gt;::New();
  vtkImageReader2 *imageReader = readerFactory-&gt;CreateImageReader2(inputFilename.c_str());
  imageReader-&gt;Update();
  
  //Get the image Data
      vtkSmartPointer&lt;vtkImageDataGeometryFilter&gt; imageDataGeometryFilter = 
  vtkSmartPointer&lt;vtkImageDataGeometryFilter&gt;::New();
  </code></pre>
  
  <p>imageDataGeometryFilter->SetInputConnection(imageReader->GetOutputPort());
    imageDataGeometryFilter->Update();</p>
  
  <p>So, if the answer to the first question is yes, does this appear to be even remotely on the right track?</p>