vtkBoxClipDataSet ClippedOutput

classic Classic list List threaded Threaded
7 messages Options
KM
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

vtkBoxClipDataSet ClippedOutput

KM
Hi all
I'm having little problem with vtkBoxClipDataSet filter, everything works fine until I try to visualize data that's been clipped away, grid is generated but point data are missing so my grid ended up entirely white.
please take a loot at attached images, cut1 is when I set geom.SetInputConnection(BoxClip.GetOutputPort(0); and works perfectly  and the Cut2 is when I use geom.SetInputConnection(BoxClip.GetOutputPort(1);

Is there something wrong in my code or that's a bug in vtkBoxClipDataSet?
Thanks a lot
Cheers

Marinko



 BoxClip = new vtkBoxClipDataSet();
  tf = new vtkTransformFilter();
  tf.SetInput(MF.MFSmoothUGrid[k]);
  tf.SetTransform(transform);
  tf.Update();

  if (CutType == _CutType.Box)
     {
        IntPtr[] origin = new IntPtr[6];
        IntPtr[] norm = new IntPtr[6];
        for (int i = 0; i < planes.GetNumberOfPlanes(); i++)
         {

            origin[i] = getPtr(planes.GetPlane(i).GetOrigin());
            norm[i] = getPtr(planes.GetPlane(i).GetNormal());

          }
     
 BoxClip.SetInput(cutclipmax.GetOutput());
 BoxClip.SetBoxClip(norm[0], origin[0], norm[1], origin[1], norm[2],
origin[2], norm[3], origin[3], norm[4], origin[4], norm[5], origin[5]);

 BoxClip.GenerateClippedOutputOn();
 BoxClip.GenerateClipScalarsOn();
 BoxClip.Update();

         
 geom.SetInputConnection(BoxClip.GetOutputPort(1);
 geom.SetExtentClipping(1);

etc...
KM
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkBoxClipDataSet ClippedOutput

KM
Not sure why nobody responded to this post, and after 3 years, I tried to make this happen again but no luck. vtkBoxClipDataSet ClippedOutput produces cell data but not the point data,
Anybody tried to get point data from second port??
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkBoxClipDataSet ClippedOutput

Bill Lorensen
Definitely a bug. I did a quick brute force change that seems to work
but I need to create a test that thoroughly  tests all of the dataset
types.

I'll keep you posted. It may take a while.

I've attached my quick fix if you want to try it on your data.

Bill


On Sat, Mar 11, 2017 at 12:08 AM, KM <[hidden email]> wrote:

> Not sure why nobody responded to this post, and after 3 years, I tried to
> make this happen again but no luck. vtkBoxClipDataSet ClippedOutput produces
> cell data but not the point data,
> Anybody tried to get point data from second port??
> Thanks
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/vtkBoxClipDataSet-ClippedOutput-tp5720293p5742430.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by 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


--
Unpaid intern in BillsBasement at noware dot com

_______________________________________________
Powered by 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

vtkBoxClipDataSet.cxx (287K) Download Attachment
vtkBoxClipDataSet.h (15K) Download Attachment
KM
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkBoxClipDataSet ClippedOutput

KM
Thanks Bill, unfortunately I'm using ActiViz version 5.8. So i'm hopping in near future will find a time to learn how to compile latest version VTK to the .net then for sure will need to get you big fixes implemented. Again, thanks for your response

Marinko
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkBoxClipDataSet ClippedOutput

Bill Lorensen
Would you have a dataset you could share? 

On Mar 11, 2017 4:15 PM, "KM" <[hidden email]> wrote:
Thanks Bill, unfortunately I'm using ActiViz version 5.8. So i'm hopping in
near future will find a time to learn how to compile latest version VTK to
the .net then for sure will need to get you big fixes implemented. Again,
thanks for your response

Marinko




--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkBoxClipDataSet-ClippedOutput-tp5720293p5742436.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by 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

_______________________________________________
Powered by 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
KM
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkBoxClipDataSet ClippedOutput

KM
Yes, here you go

QGNLOCWXPY.vtk
KM
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkBoxClipDataSet ClippedOutput

KM
Bill, Just wanted let you know, with small changes in your code I was able to implement your quick fix into VTK 6.3 and was able to compile ActiViz 6.3, works perfectly.
Thanks again for sharing your quick fix.
Marinko

Fixed vtkBoxClipDataSet
Loading...