[vtkusers] Filter to remove internal structure of a poly data?

Kilgus, Thomas t.kilgus at Dkfz-Heidelberg.de
Tue Jul 14 08:39:42 EDT 2015


No no, my data is 3D. The screenshot just contains cross sections to illustrate how the data looks “inside”.

Von: David E DeMarle [mailto:dave.demarle at kitware.com]
Gesendet: Dienstag, 14. Juli 2015 14:35
An: Kilgus, Thomas
Cc: vtkusers at vtk.org
Betreff: Re: [vtkusers] Filter to remove internal structure of a poly data?

Ah, I thought your data was 3D, not 2D. The DSSF won't help in this case.


David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Tue, Jul 14, 2015 at 8:26 AM, Kilgus, Thomas <t.kilgus at dkfz-heidelberg.de<mailto:t.kilgus at dkfz-heidelberg.de>> wrote:
Hi David,

sounds great, but it doesn’t do anything on my data. Do you know how the filter works? Attached is my code and a screenshot how my data looks like. Any ideas?

Regards,
Thomas

Code:

  std::string inputFilename = “path/to/file”;
  std::string outputFilename = “path/to/save”;
  vtkSmartPointer<vtkXMLPolyDataReader> reader =
      vtkSmartPointer<vtkXMLPolyDataReader>::New();
  reader->SetFileName ( inputFilename.c_str() );
  reader->Update();

  vtkSmartPointer<vtkDataSetSurfaceFilter> filter = vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
  filter->SetInputConnection(reader->GetOutputPort());
  filter->Update();

  vtkSmartPointer<vtkXMLPolyDataWriter> writer = vtkSmartPointer<vtkXMLPolyDataWriter>::New();
  writer->SetInputConnection(filter->GetOutputPort());
  writer->SetFileName(outputFilename.c_str());
  writer->Update();
  writer->Write();

Von: David E DeMarle [mailto:dave.demarle at kitware.com<mailto:dave.demarle at kitware.com>]
Gesendet: Dienstag, 14. Juli 2015 13:37
An: Kilgus, Thomas
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Betreff: Re: [vtkusers] Filter to remove internal structure of a poly data?

Try vtkDataSetSurfaceFilter. It produces the external skin of any dataset in the form of a polydata.


David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909<tel:518-881-4909>

On Tue, Jul 14, 2015 at 5:00 AM, Kilgus, Thomas <t.kilgus at dkfz-heidelberg.de<mailto:t.kilgus at dkfz-heidelberg.de>> wrote:
Hi everyone,

I am not sure how to call this, but I was wondering if there is any filter (or combination) to remove internal structures of a PolyData? By internal I mean stuff that is not visible to the camera, unless you make the surface translucent. I know that there is a vtkPolyDataConnectivityFilter which works for some uses cases, but my data is connected at some parts. I am not even sure if this is possible, but the virtual camera could rotate around the object and every cell which is not seen (hit by a ray) could be deleted. Is there anything like this in VTK?

Regards,
Thomas

Thomas Kilgus
German Cancer Research Center (DKFZ)
Div. Medical and Biological Informatics
Junior group: Computer-assisted Interventions (E131)
Im Neuenheimer Feld 280
69120 Heidelberg, Germany
Phone: +49(0) 6221-42-3545<tel:%2B49%280%29%206221-42-3545>


_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150714/67cbd9dc/attachment.html>


More information about the vtkusers mailing list