[vtkusers] Bug in vtkContourWidget?

Karthik Krishnan karthik.krishnan at kitware.com
Tue Oct 27 00:25:23 EDT 2009


Please log a bug report at vtk.org/Bug with the contents of this email
in the report, and assign it to me.

thx


On Mon, Oct 26, 2009 at 4:34 PM,  <itkvtk123 at gmx.net> wrote:
> Hey guys,
>
> I think I found a bug while experimenting with vtkContourWidget today.
>
> How to reproduce the bug (first way):
> 1. Zoom out using the mousewheel to see the entire image.
> 2. Left click inside image area to place first contour point
> 3. Right click outside image area to cancel/finish contour operation
> 4. Press Mousewheel and drag image -> crash
>
> How to reproduce the bug (second way):
> 1. Zoom out using the mousewheel to see the entire image.
> 2. Left click inside image area to place first contour point
> 3. Right click outside image area to cancel/finish contour operation
> 4. Hold Ctrl, Left Click Mouse and drag to rotate image
> 5. Left click inside image area to place second contour point -> crash
>
> Minimal code example:
>
> #include "vtkImageViewer2.h"
> #include "vtkRenderWindowInteractor.h"
> #include "vtkContourWidget.h"
> #include "vtkPNGReader.h"
> #include "vtkOrientedGlyphContourRepresentation.h"
> #include "vtkImageActorPointPlacer.h"
>
> int main(int argc, char*argv[])
> {
>        //Setting Up Viewer
>        vtkImageViewer2* viewer = vtkImageViewer2::New();
>        vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
>        viewer->SetupInteractor(iren);
>
>        //Read Image
>        vtkPNGReader* reader = vtkPNGReader::New();
>        reader->SetFileName("BrainProtonDensitySlice.png");
>        viewer->SetInput(reader->GetOutput());
>
>        //Initialize Widget
>        vtkContourWidget* widget = vtkContourWidget::New();
>        widget->SetInteractor(iren);
>        vtkOrientedGlyphContourRepresentation *rep = vtkOrientedGlyphContourRepresentation::New();
>        widget->SetRepresentation(rep);
>
>        //Initialize Point Placer
>        vtkImageActorPointPlacer* pointPlacer = vtkImageActorPointPlacer::New();
>        pointPlacer->SetImageActor(viewer->GetImageActor());
>        rep->SetPointPlacer(pointPlacer);
>
>        //Start Interaction
>        viewer->Render();
>        widget->On();
>        iren->Start();
>
>        return 0;
> }
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Karthik Krishnan
R&D Engineer,
Kitware Inc.
Ph: 518 881 4919
Fax: 518 371 4573



More information about the vtkusers mailing list