[vtkusers] Error with vtkImagePlaneWidget

David Doria daviddoria+vtk at gmail.com
Thu Nov 5 08:13:35 EST 2009


On Thu, Nov 5, 2009 at 8:11 AM, Karthik Krishnan
<karthik.krishnan at kitware.com> wrote:
> On Thu, Nov 5, 2009 at 7:44 AM, David Doria <daviddoria+vtk at gmail.com>
> wrote:
>>
>> On Thu, Nov 5, 2009 at 4:22 AM, RimAY <rim.ayari at gmail.com> wrote:
>> > but i always get the error : ERROR: In
>> > .\vtkImagePlaneWidget.cxx, line 1412 vtkImagePlaneWidget (01CA0550):
>> > SetInput() before setting plane orientation.
>>
>> I tried to do the same thing you did but in c++ and I get the same
>> error. I'm still apparently missing a big concept about how these
>> widgets work - can anyone explain them at a very high level?
>>
>>    planeWidgetX->SetInput(Polydata);
>>    planeWidgetX->SetPlaneOrientationToXAxes();
>
> The widget expects an image data as input, as stated in the doxygen
> documentation of the widget's SetInput method...
>
> We should probably enforce that via a safedowncast in the SetInput method,
> instead of invoking an error later..

That sounds like a good plan. I didn't even check for that because I
am so used to type mismatch errors warning me about things like this
that I didn't even check.

Thanks,

David



More information about the vtkusers mailing list