[vtkusers] Performing a Logical And on two PolyData Sets?

David Cole david.cole at kitware.com
Mon Jan 26 14:30:52 EST 2009


That error message comes from the following VTK C++ code:

  if ( !this->DataSet ||
       !(scalars = this->DataSet->GetPointData()->GetScalars()) )
    {
    vtkErrorMacro(<<"Can't evaluate dataset!");
    return this->OutValue;
    }

So..... since you clearly have called SetDataSet (I assume with a
non-Nothing / non-NULL object...) then there must not be any point data
scalars associated with the dataset.

Hopefully, this helps steer you in the right direction. I don't have time
right now to dig deeper -- let us know how you make out with this
information. Thumbs up or still thumbs down, let us know...


HTH,
David


On Mon, Jan 26, 2009 at 2:07 PM, Rob Remke <robert_remke at starkey.com> wrote:

>  VTK Users,
>
>
>
> Thought I would re-post this in case it got missed.  Any help would be
> appreciated.
>
>
>
> Thanks
>
>
>
> *From:* vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] *On
> Behalf Of *Rob Remke
> *Sent:* Tuesday, January 20, 2009 4:51 PM
> *To:* vtkusers at vtk.org
> *Subject:* [vtkusers] Performing a Logical And on two PolyData Sets?
>
>
>
> VTK Users,
>
>
>
> Is there a filter like vtkImageLogic that will operate on two PolyData
> sets.  I want to perform a logical AND on two PolyData sets to extract the
> common volume.  I can't find any filter in VTK that will allow me to do that
> directly.  Is there something and maybe I missed it?
>
>
>
> If there is not a simple approach as above, I thought that an alternative
> might be to read the two data sets in.  Input one into a vtkImplicitDataSet
> object and then input that and the other data set into a vtkClipPolyData
> object:
>
>
>
>     Private Sub CodeSnippet()
>
>
>
>         OpenFileDialog1.Multiselect = True
>
>         OpenFileDialog1.Filter = "STL Files (*.stl)|*.stl"
>
>         OpenFileDialog1.FilterIndex = 1
>
>         OpenFileDialog1.ShowDialog()
>
>         Me.Refresh()
>
>
>
>         Dim Object1 As New vtkSTLReader
>
>         Object1.SetFileName(OpenFileDialog1.FileNames(0))
>
>
>
>         Dim Object2 As New vtkSTLReader
>
>         Object2.SetFileName(OpenFileDialog1.FileNames(1))
>
>
>
>         Dim ImplicitData As New vtkImplicitDataSet
>
>         ImplicitData.SetDataSet(Object1.GetOutput)
>
>
>
>         Dim Clipper As New vtkClipPolyData
>
>         Clipper.SetInput(Object2.GetOutput)
>
>         Clipper.SetClipFunction(ImplicitData)
>
>         Clipper.GenerateClipScalarsOn()
>
>         Clipper.GenerateClippedOutputOn()
>
>         Clipper.SetValue(0)
>
>
>
>     End Sub
>
>
>
> When I Input Clipper.GetOut into a Mapper and try to render, I get the
> following error:
>
> ERROR: In ..\..\VTK-5-2-0\VTK\Filtering\vtkImplicitDataSet.cxx, line 77
>
> vtkImplicitDataSet (04280888): Can't evaluate dataset!
>
>
>
> I am using Activis.NET in Visual Basic .NET.
>
>
>
> Does anyone know what this error is?  If I could get the above code to work
> then maybe I could repeat the process.  First clip Object2 with Object1.
> Then clip Object1 with Object2.  Then combine the results to get a data set
> representing the common volume of the two objects.
>
>
>
> Thanks in advance for any help.
>
>
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090126/6299a985/attachment.htm>


More information about the vtkusers mailing list