[slicer-users] vmtkcenterlines input model loading problem

Madan Rao rao.lms at gmail.com
Wed Feb 24 10:23:05 EST 2010


Hello Daniel,

Thanks.
I re-installed the Slicer3 and ran the volume again for VMTKSlicerModule and
found it working OK.
This check includes VMTKCenterlines module also. I am attaching a png file
of the same here.
The difference was the window level I selected.

However, only VMTKSlicerModule library files
VmtkSlicerModule-svn100-2010-01-19-win32 seem to work.

I checked Feb 5th,6th,8th and 14th builds, none of which run.
I think you need to check VMTKSlicerModule Libraries.

Hope it helps.

AM Mohan Rao


On Wed, Feb 24, 2010 at 10:50 AM, Madan Rao <rao.lms at gmail.com> wrote:

> Hello Daniel,
>
> Seems there are some more problems..
>
> Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
> All Rights Reserved.
>
> Python Console v1.4 by Ka-Ping Yee <ping at lfw.org>
> >>> import sys; from Slicer import slicer;
> >>>
> sys.path.append(str(slicer.Application.GetExtensionsInstallPath())+'/'+str(slicer.Application.GetSvnRevision())+'/VMTKCenterlines/VMTKCenterlines');
> >>> from VMTKCenterlinesGUI import *;
> >>> hidden2gui = VMTKCenterlinesGUI();
> >>> from VMTKCenterlinesLogic import *;
> >>> centerlines = VMTKCenterlinesLogic(hidden2gui);
> >>> model=slicer.MRMLScene.GetNodeByID('vtkMRMLModelNode1');
> >>> clSeeds = slicer.vtkIdList();
> >>> clTargets = slicer.vtkIdList();
> >>> pointLocator=slicer.vtkPointLocator();
> >>> pointLocator.SetDataSet(model.GetPolyData());
> []
> >>> pointLocator.BuildLocator();
> []
> >>> id=pointLocator.FindClosestPoint(40.3,47.9,-128);
> >>> clSeeds.InsertNextId(id);
> 0
> >>> id=pointLocator.FindClosestPoint(40.3,47.9,-128);
> >>> clTargets.InsertNextId(id);
> 0
> >>> prepared = centerlines.prepareModel(model);
>
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
>   File "C:/Users/mohan
> rao/AppData/Local/Temp/Slicer3/11546/VMTKCenterlines/VMTKCenterlines\VMTKCenterlinesLogic.py",
> line 34, in prepareModel
>     surfaceCleaner.SetInput(polydata)
>   File "<string>", line 1, in SetInput
>
>   File "C:\Program Files\Slicer3
> 3.5.2010-01-07\lib\Slicer3\SlicerBaseGUI\Python\Slicer.py", line 116, in
> <lambda>
>     return lambda *a: self.__callVTKmethod(str(name),*a)
>   File "C:\Program Files\Slicer3
> 3.5.2010-01-07\lib\Slicer3\SlicerBaseGUI\Python\Slicer.py", line 102, in
> __callVTKmethod
>     value = tk.tk.call(*cstring)
> TclError: Object named: vtkObj7879, could not find requested method:
> SetInput
>
> or the method was called with incorrect arguments.
>
> AM Mohan Rao
>
>
> >>>
>
> On Tue, Feb 23, 2010 at 11:20 PM, Daniel Haehn <haehn at bwh.harvard.edu>wrote:
>
>> Hi Mohan,
>>
>> oh I made a mistake in the debug code:
>>
>> This line
>> >> pointLocator.SetDataSet(model);
>> has to be
>> >> pointLocator.SetDataSet(model.GetPolyData());
>>
>> Maybe it works then?
>>
>> Bye,
>> Daniel
>>
>> On Wed, 17 Feb 2010 12:50:32 +0530, Madan Rao <rao.lms at gmail.com> wrote:
>> > Hello Daniel,
>> >
>> > Thanks.
>> > I request the next step.
>> > Please find the error log in python console:
>> >
>> > Python Console v1.4 by Ka-Ping Yee <ping at lfw.org>
>> >>>> import sys; from Slicer import slicer;
>> >>>>
>> >
>>
>> sys.path.append(str(slicer.Application.GetExtensionsInstallPath())+'/'+str(slicer.Application.GetSvnRevision())+'/VMTKCenterlines/VMTKCenterlines');
>> >>>> from VMTKCenterlinesGUI import *;
>> >>>> hidden2gui = VMTKCenterlinesGUI();
>> >>>> from VMTKCenterlinesLogic import *;
>> >>>> centerlines = VMTKCenterlinesLogic(hidden2gui);
>> >>>> model=slicer.MRMLScene.GetNodeByID('vtkMRMLModelNode1');
>> >>>> clSeeds = slicer.vtkIdList();
>> >>>> clTargets = slicer.vtkIdList();
>> >>>> pointLocator=slicer.vtkPointLocator();
>> >>>> pointLocator.SetDataSet(model);
>> > Traceback (most recent call last):
>> >   File "<console>", line 1, in <module>
>> >   File "<string>", line 1, in SetDataSet
>> >   File "C:\Program Files\Slicer3
>> > 3.5.2010-01-07\lib\Slicer3\SlicerBaseGUI\Python\Slicer.py", line 116, in
>> > <lambda>
>> >     return lambda *a: self.__callVTKmethod(str(name),*a)
>> >   File "C:\Program Files\Slicer3
>> > 3.5.2010-01-07\lib\Slicer3\SlicerBaseGUI\Python\Slicer.py", line 102, in
>> > __callVTKmethod
>> >     value = tk.tk.call(*cstring)
>> > TclError: Object named: vtkObj7853, could not find requested method:
>> > SetDataSet
>> > or the method was called with incorrect arguments.
>> >
>> >>>>
>> >
>> >
>> > Since your path is taking from exltension install path, I added the VMTK
>> > files in there. However, if I do not have these files
>> > in slicer3/modules, they will not be visible from the Slicer front end.
>> >
>> >
>> >
>> > AM Mohan Rao
>> >
>> >
>> > On Tue, Feb 16, 2010 at 5:03 PM, Daniel Haehn <haehn at bwh.harvard.edu>
>> > wrote:
>> >
>> >> Hi Mohan,
>> >>
>> >> to debug the functionality, you can use the following code in the
>> python
>> >> console (it is long - sorry for that :). I assume that you only have
>> the
>> >> VMTKEvolutionModel in the scene. Replace X,Y,Z with the RAS coordinates
>> >> of the seed and the target point.
>> >>
>> >> import sys; from Slicer import slicer;
>> >>
>> >>
>> >
>>
>> sys.path.append(str(slicer.Application.GetExtensionsInstallPath())+'/'+str(slicer.Application.GetSvnRevision())+'/VMTKCenterlines/VMTKCenterlines');
>> >> from VMTKCenterlinesGUI import *;
>> >> hidden2gui = VMTKCenterlinesGUI();
>> >> from VMTKCenterlinesLogic import *;
>> >> centerlines = VMTKCenterlinesLogic(hidden2gui);
>> >>
>> >> model=slicer.MRMLScene.GetNodeByID('vtkMRMLModelNode1');
>> >>
>> >> clSeeds = slicer.vtkIdList();
>> >> clTargets = slicer.vtkIdList();
>> >>
>> >> pointLocator=slicer.vtkPointLocator();
>> >> pointLocator.SetDataSet(model);
>> >> pointLocator.BuildLocator();
>> >>
>> >> id=pointLocator.FindClosestPoint(X,Y,Z);
>> >> clSeeds.InsertNextId(id);
>> >> id=pointLocator.FindClosestPoint(X,Y,Z);
>> >> clTargets.InsertNextId(id);
>> >>
>> >> prepared = centerlines.prepareModel(model);
>> >> centerline =
>> centerlines.computeCenterlines(prepared,clSeeds,clTargets);
>> >>
>> >> This should compute a while. Then you can export the centerline:
>> >>
>> >> outputFile="/home/hype/test.dat";
>> >> centerlines.Export(centerline,outputFile,0,0,0);
>> >>
>> >> The exported centerline is a cloud of points and can be imported using
>> >> the VMTKCenterlines module.
>> >>
>> >> Try this and we will see where it leads us.
>> >>
>> >> HTH,
>> >> Daniel
>> >>
>> >> On Mon, 2010-02-15 at 20:52 +0530, Madan Rao wrote:
>> >> > Hello Daniel,
>> >> >
>> >> > The VMTKCenterlinesGUI.py defines "Prepare Model!" button as
>> >> > prepButton.
>> >> >
>> >> > Clicking of this button invokes PrepCenterlines() function.
>> >> >
>> >> > After loading the VMTKEvolutionModel.vtk in InputModel I open the
>> >> > python console and find the following observations:
>> >> >
>> >> > Python Console v1.4 by Ka-Ping Yee <ping at lfw.org>
>> >> > >>> from Slicer import slicer
>> >> > >>> result = slicer.vtkPolyData()
>> >> > >>> displayNode = slicer.vtkMRMLModelDisplayNode()
>> >> > >>> displayNode.SetColor(0, 0.8, 0)
>> >> > []
>> >> > >>> displayNode.SetVisibility(1)
>> >> > []
>> >> > >>> displayNode.SetOpacity(0.7)
>> >> > []
>> >> > >>>
>> >> >
>> >> > It seems the code seems to be running OK but I am not finding the
>> >> > result in the VMTKCenterlines module..
>> >> >
>> >> > Please help.
>> >> >
>> >> > AM Mohan Rao
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > On Mon, Feb 15, 2010 at 12:42 PM, Madan Rao <rao.lms at gmail.com>
>> wrote:
>> >> >         Hello Daniel,
>> >> >
>> >> >         Thanks.
>> >> >
>> >> >         I tried your suggestion but I am unsuccessful in running the
>> >> >         program.
>> >> >
>> >> >         Could you please help me in debug the python code?
>> >> >
>> >> >         AM Mohan Rao
>> >> >
>> >> >         On Tue, Feb 9, 2010 at 3:06 AM, Daniel Haehn
>> >> >         <haehn at bwh.harvard.edu> wrote:
>> >> >
>> >> >
>> >> >                 Hi Mohan,
>> >> >
>> >> >                 this is a strange error. So you say when you click
>> the
>> >> >                 model selector in
>> >> >                 the panel "Input", it does not show the models at
>> all?
>> >> >                 They appear in
>> >> >                 the models module? Maybe saving the
>> Vmtkevolutionmodel
>> >> >                 and then exiting
>> >> >                 slicer and loading it will work? Once you are at this
>> >> >                 stage of the
>> >> >                 processing pipeline, you only need this model to
>> >> >                 compute the
>> >> >                 centerlines.
>> >> >
>> >> >                 Bye,
>> >> >                 Daniel
>> >> >
>> >> >
>> >> >                 On Sat, 2010-02-06 at 14:02 +0530, Madan Rao wrote:
>> >> >                 > Hello,
>> >> >                 >
>> >> >                 > I am using vmtkslicermodule on a sample CTA of
>> >> >                 coronaries following
>> >> >                 > Daniel Hahn's instructions. I am able to
>> >> >                 > work successfully upto levelsetsegmentation to
>> >> >                 generate the
>> >> >                 > vmtkevolutionmodel.
>> >> >                 >
>> >> >                 > However, I am unable to run vmtkcenterlines because
>> >> >                 input model button
>> >> >                 > is not able to show options.
>> >> >                 >
>> >> >                 > In the error log I find:
>> >> >                 >
>> >> >                 > ERROR: In ..\..\VTK\IO\vtkWriter.cxx, line 79
>> >> >                 > vtkPolyDataWriter (16249D58): No input provided!
>> >> >                 >
>> >> >                 >
>> >> >                 > ERROR: In ..\KWWidgets\vtkKWApplication.cxx, line
>> >> >                 1288
>> >> >                 > vtkSlicerApplication (06809CE0): TclTk error:
>> >> >                 invalid command name
>> >> >                 > "vtkObj6240"
>> >> >                 > invalid command name "vtkObj6240"
>> >> >                 >     while executing
>> >> >                 > "vtkObj6240 UpdateMenu"
>> >> >                 >     (command bound to event)
>> >> >                 >
>> >> >                 >
>> >> >                 > ERROR: In ..\..\..\Slicer3\Libs\vtkITK
>> >> >                 > \vtkITKArchetypeImageSeriesReader.cxx, line 1005
>> >> >                 > vtkITKArchetypeImageSeriesReader (0C6267A8): The
>> >> >                 subclass has not
>> >> >                 > defined anything for ExecuteData!
>> >> >                 >
>> >> >                 >
>> >> >                 > Thanks.
>> >> >                 >
>> >> >                 > AM Mohan Rao
>> >> >                 >
>> >> >
>> >> >                 > _______________________________________________
>> >> >                 > slicer-users mailing list
>> >> >                 > slicer-users at bwh.harvard.edu
>> >> >                 >
>> >> >
>> >> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> >> >                 > To unsubscribe: send email to
>> >> >                 slicer-users-request at massmail.spl.harvard.edu with
>> >> >                 unsubscribe as the subject
>> >> >
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > slicer-users mailing list
>> >> > slicer-users at bwh.harvard.edu
>> >> > http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> >> > To unsubscribe: send email to
>> >> slicer-users-request at massmail.spl.harvard.edu with unsubscribe as the
>> >> subject
>> >>
>> >>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://massmail.spl.harvard.edu/pipermail/slicer-users/attachments/20100224/0f93a36e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: centerlines.png
Type: image/png
Size: 19732 bytes
Desc: not available
URL: <http://massmail.spl.harvard.edu/pipermail/slicer-users/attachments/20100224/0f93a36e/attachment.png>


More information about the slicer-users mailing list