vmtkcenterlines input model loading problem

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

vmtkcenterlines input model loading problem

madanrao
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
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

Daniel Haehn
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
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

madanrao
Hello Daniel,

Thanks.

Yes, I tried loading the model separately and is able to load it as input for vmtkcenterlines module. But when
I click Prepare Model button nothing happens.

I am attaching the VMTK Evolution Model.vtk here.

AM Mohan Rao



On Tue, Feb 9, 2010 at 3:06 AM, Daniel Haehn <[hidden email]> 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
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject

VMTK Evolution Model.vtk (1M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

Daniel Haehn
Hi Mohan,

so I tried your model and it works fine for me.

Be sure to select it as input model (instead of VMTKCenterlinesPrepOut) and
then click "Prepare model". The model should turn green afterwards. The
preparation step includes some topology enhancements and closes the model
in- and outlets.

Please let me know if you have success.

Bye,
Daniel

On Tue, 9 Feb 2010 12:44:59 +0530, Madan Rao <[hidden email]> wrote:

> Hello Daniel,
>
> Thanks.
>
> Yes, I tried loading the model separately and is able to load it as input
> for vmtkcenterlines module. But when
> I click Prepare Model button nothing happens.
>
> I am attaching the VMTK Evolution Model.vtk here.
>
> AM Mohan Rao
>
>
>
> On Tue, Feb 9, 2010 at 3:06 AM, Daniel Haehn <[hidden email]>
> 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
>> > [hidden email]
>> > http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> > To unsubscribe: send email to
>> [hidden email] with unsubscribe as the
>> subject
>>
>>

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

madanrao
Hello Daniel,

Thanks.

Of course I am selecting the VMTK Evolution Model correctly, but clicking the "Prepare model"  button
has no response, not even in error log.

There seems some connecting problem with python files..

Could you recommend some debug queries which I can enter in Python Interactor ?

I use Vista OS, Slicer3 3.5.2010-01-07 and yesterday's VMTK module library and python files.

AM Mohan Rao

On Tue, Feb 9, 2010 at 2:43 PM, Daniel Haehn <[hidden email]> wrote:
Hi Mohan,

so I tried your model and it works fine for me.

Be sure to select it as input model (instead of VMTKCenterlinesPrepOut) and
then click "Prepare model". The model should turn green afterwards. The
preparation step includes some topology enhancements and closes the model
in- and outlets.

Please let me know if you have success.

Bye,
Daniel

On Tue, 9 Feb 2010 12:44:59 +0530, Madan Rao <[hidden email]> wrote:
> Hello Daniel,
>
> Thanks.
>
> Yes, I tried loading the model separately and is able to load it as input
> for vmtkcenterlines module. But when
> I click Prepare Model button nothing happens.
>
> I am attaching the VMTK Evolution Model.vtk here.
>
> AM Mohan Rao
>
>
>
> On Tue, Feb 9, 2010 at 3:06 AM, Daniel Haehn <[hidden email]>
> 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
>> > [hidden email]
>> > http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> > To unsubscribe: send email to
>> [hidden email] with unsubscribe as the
>> subject
>>
>>



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

Daniel Haehn
Hi Mohan,

I just checked in a new version of the VMTKCenterlines module. It should be
available within the extension wizard tomorrow. Maybe this fixes your
issues.

If not, i will point you to some debug statements for the python console.

Let me know,
Daniel

On Tue, 9 Feb 2010 20:04:44 +0530, Madan Rao <[hidden email]> wrote:

> Hello Daniel,
>
> Thanks.
>
> Of course I am selecting the VMTK Evolution Model correctly, but clicking
> the "Prepare model"  button
> has no response, not even in error log.
>
> There seems some connecting problem with python files..
>
> Could you recommend some debug queries which I can enter in Python
> Interactor ?
>
> I use Vista OS, Slicer3 3.5.2010-01-07 and yesterday's VMTK module
library

> and python files.
>
> AM Mohan Rao
>
> On Tue, Feb 9, 2010 at 2:43 PM, Daniel Haehn <[hidden email]>
> wrote:
>
>> Hi Mohan,
>>
>> so I tried your model and it works fine for me.
>>
>> Be sure to select it as input model (instead of VMTKCenterlinesPrepOut)
> and
>> then click "Prepare model". The model should turn green afterwards. The
>> preparation step includes some topology enhancements and closes the
> model
>> in- and outlets.
>>
>> Please let me know if you have success.
>>
>> Bye,
>> Daniel
>>
>> On Tue, 9 Feb 2010 12:44:59 +0530, Madan Rao <[hidden email]> wrote:
>> > Hello Daniel,
>> >
>> > Thanks.
>> >
>> > Yes, I tried loading the model separately and is able to load it as
> input
>> > for vmtkcenterlines module. But when
>> > I click Prepare Model button nothing happens.
>> >
>> > I am attaching the VMTK Evolution Model.vtk here.
>> >
>> > AM Mohan Rao
>> >
>> >
>> >
>> > On Tue, Feb 9, 2010 at 3:06 AM, Daniel Haehn <[hidden email]>
>> > 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
>> >> > [hidden email]
>> >> > http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> >> > To unsubscribe: send email to
>> >> [hidden email] with unsubscribe as the
>> >> subject
>> >>
>> >>
>>
>>

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

madanrao
In reply to this post by Daniel Haehn
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 <[hidden email]> 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
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

madanrao
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 <[hidden email]>
>>> 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 <[hidden email]> 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 <[hidden email]> 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
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject




_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

Daniel Haehn
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 <[hidden email]>
> >>> 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 <[hidden email]> 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
>         <[hidden email]> 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
>                 > [hidden email]
>                 >
>                 http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>                 > To unsubscribe: send email to
>                 [hidden email] with
>                 unsubscribe as the subject
>                
>        
>
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

madanrao
Hello Daniel,

Thanks.
I request the next step.
Please find the error log in python console:

Python Console v1.4 by Ka-Ping Yee <[hidden email]>
>>> 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 <[hidden email]> 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 <[hidden email]>
> >>> 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 <[hidden email]> 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
>         <[hidden email]> 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
>                 > [hidden email]
>                 >
>                 http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>                 > To unsubscribe: send email to
>                 [hidden email] with
>                 unsubscribe as the subject
>
>
>
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

Daniel Haehn
Hi Mohan,

please excuse the late reply..

After this line,
model=slicer.MRMLScene.GetNodeByID('vtkMRMLModelNode1');

please just type
model

to see how this object looks like and paste the results.

Bye,
Daniel


On Wed, 2010-02-17 at 12:50 +0530, Madan Rao 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 <[hidden email]>
> >>> 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 <[hidden email]>
> 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 <[hidden email]>
>         > >>> 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
>         <[hidden email]> 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
>         >         <[hidden email]> 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
>         >                 > [hidden email]
>         >                 >
>         >
>         http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>         >                 > To unsubscribe: send email to
>         >
>         [hidden email] with
>         >                 unsubscribe as the subject
>         >
>         >
>         >
>         > _______________________________________________
>         > slicer-users mailing list
>         > [hidden email]
>         >
>         http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>         > To unsubscribe: send email to
>         [hidden email] with unsubscribe
>         as the subject
>        
>        
>
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

madanrao
Hello Daniel,

Thanks.
Please see the output:
Python Console v1.4 by Ka-Ping Yee <[hidden email]>
>>> 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');
>>> model
vtkMRMLModelNode (0C027240)
  Debug: Off
  Modified Time: 679234
  Reference Count: 5
  Registered Events:
    Registered Observers:
      vtkObserver (0BF65D88)
        Event: 2
        EventName: DeleteEvent
        Command: 0C012E08
        Priority: 0
        Tag: 2
      vtkObserver (0BF61C68)
        Event: 2
        EventName: DeleteEvent
        Command: 0C012EF8
        Priority: 0
        Tag: 3
      vtkObserver (0BF69D08)
        Event: 2
        EventName: DeleteEvent
        Command: 0C0BE060
        Priority: 0
        Tag: 4
      vtkObserver (0BF69E88)
        Event: 17001
        EventName: NoEvent
        Command: 0C0BE060
        Priority: 0
        Tag: 5
      vtkObserver (0BF69EE8)
        Event: 2
        EventName: DeleteEvent
        Command: 0C0BE100
        Priority: 0
        Tag: 6
      vtkObserver (0BF69FE8)
        Event: 17000
        EventName: NoEvent
        Command: 0C0BE100
        Priority: 0
        Tag: 7
      vtkObserver (0BF6A068)
        Event: 2
        EventName: DeleteEvent
        Command: 0C0BE010
        Priority: 0
        Tag: 8
      vtkObserver (0BF6A188)
        Event: 15000
        EventName: NoEvent
        Command: 0C0BE010
        Priority: 0
        Tag: 9
      vtkObserver (0E8B2E30)
        Event: 2
        EventName: DeleteEvent
        Command: 0E898C38
        Priority: 0
        Tag: 10
      vtkObserver (0E8B3850)
        Event: 2
        EventName: DeleteEvent
        Command: 0E899840
        Priority: 0
        Tag: 11
      vtkObserver (0E8B3870)
        Event: 1
        EventName: AnyEvent
        Command: 0E899840
        Priority: 0
        Tag: 12
      vtkObserver (0E8B63D0)
        Event: 2
        EventName: DeleteEvent
        Command: 0E89C950
        Priority: 0
        Tag: 13
      vtkObserver (0E8B63F0)
        Event: 1
        EventName: AnyEvent
        Command: 0E89C950
        Priority: 0
        Tag: 14
      vtkObserver (0BF618C8)
        Event: 2
        EventName: DeleteEvent
        Command: 0C0127C8
        Priority: 0
        Tag: 1
  ID: vtkMRMLModelNode1
  Indent:      0
  Name: Green Volume Slice
  Description:
  HideFromEditors: 1
  ModifiedSinceRead: 1
  Selectable: 0
  Selected: 0
  TransformNodeID: vtkMRMLLinearTransformNode1
  Debug: Off
  Modified Time: 678899
  Reference Count: 1
  Registered Events: (none)
  Name = (none)
  RestoreSelectionState = 0
  DisplayNodeIDs[0]: vtkMRMLModelDisplayNode1
 
Poly Data:
    Debug: Off
    Modified Time: 750714
    Reference Count: 4
    Registered Events:
      Registered Observers:
        vtkObserver (0BF618E8)
          Event: 33
          EventName: ModifiedEvent
          Command: 0C0127C8
          Priority: 0
          Tag: 2
        vtkObserver (0E8B3810)
          Event: 2
          EventName: DeleteEvent
          Command: 0E8997F0
          Priority: 0
          Tag: 3
        vtkObserver (0BF61828)
          Event: 2
          EventName: DeleteEvent
          Command: 0C0127C8
          Priority: 0
          Tag: 1
    Source: (none)
    Information: 0C012728
    Data Released: False
    Global Release Data: Off
    UpdateTime: 679012
    Release Data: Off
    UpdateExtent: Initialized
    Update Number Of Pieces: 1
    Update Piece: 0
    Update Ghost Level: 0
    MaximumNumberOfPieces: 1
    RequestExactExtent: Off
     Field Data:
      Debug: Off
      Modified Time: 678979
      Reference Count: 1
      Registered Events: (none)
      Number Of Arrays: 0
      Number Of Components: 0
      Number Of Tuples: 0
    Number Of Points: 4
    Number Of Cells: 1
    Cell Data:
      Debug: Off
      Modified Time: 678986
      Reference Count: 1
      Registered Events: (none)
      Number Of Arrays: 0
      Number Of Components: 0
      Number Of Tuples: 0
      Copy Tuple Flags: ( 1 1 1 1 1 0 1 )
      Interpolate Flags: ( 1 1 1 1 1 0 0 )
      Pass Through Flags: ( 1 1 1 1 1 1 1 )
      Scalars: (none)
      Vectors: (none)
      Normals: (none)
      TCoords: (none)
      Tensors: (none)
      GlobalIds: (none)
      PedigreeIds: (none)
    Point Data:
      Debug: Off
      Modified Time: 679010
      Reference Count: 1
      Registered Events: (none)
      Number Of Arrays: 2
      Array 0 name = Normals
      Array 1 name = TextureCoordinates
      Number Of Components: 5
      Number Of Tuples: 4
      Copy Tuple Flags: ( 1 1 1 1 1 0 1 )
      Interpolate Flags: ( 1 1 1 1 1 0 0 )
      Pass Through Flags: ( 1 1 1 1 1 1 1 )
      Scalars: (none)
      Vectors: (none)
      Normals:
        Debug: Off
        Modified Time: 679003
        Reference Count: 1
        Registered Events: (none)
        Name: Normals
        Data type: float
        Size: 12
        MaxId: 11
        NumberOfComponents: 3
        Information: 00000000
        Name: Normals
        Number Of Components: 3
        Number Of Tuples: 4
        Size: 12
        MaxId: 11
        LookupTable: (none)
        Array: 0C039698
      TCoords:
        Debug: Off
        Modified Time: 679007
        Reference Count: 1
        Registered Events: (none)
        Name: TextureCoordinates
        Data type: float
        Size: 8
        MaxId: 7
        NumberOfComponents: 2
        Information: 00000000
        Name: TextureCoordinates
        Number Of Components: 2
        Number Of Tuples: 4
        Size: 8
        MaxId: 7
        LookupTable: (none)
        Array: 0C0127A0
      Tensors: (none)
      GlobalIds: (none)
      PedigreeIds: (none)
    Bounds:
      Xmin,Xmax: (-125, 125)
      Ymin,Ymax: (0, 0)
      Zmin,Zmax: (-140.734, 140.734)
    Compute Time: 765422
    Number Of Points: 4
    Point Coordinates: 0BF4C610
    Locator: 00000000
    Number Of Vertices: 0
    Number Of Lines: 0
    Number Of Polygons: 1
    Number Of Triangle Strips: 0
    Number Of Pieces: 1
    Piece: 0
    Ghost Level: 0


>>>

AM Mohan Rao


On Mon, Feb 22, 2010 at 1:56 AM, Daniel Haehn <[hidden email]> wrote:
Hi Mohan,

please excuse the late reply..

After this line,
model=slicer.MRMLScene.GetNodeByID('vtkMRMLModelNode1');

please just type
model

to see how this object looks like and paste the results.

Bye,
Daniel


On Wed, 2010-02-17 at 12:50 +0530, Madan Rao 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 <[hidden email]>
> >>> 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 <[hidden email]>
> 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 <[hidden email]>
>         > >>> 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
>         <[hidden email]> 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
>         >         <[hidden email]> 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
>         >                 > [hidden email]
>         >                 >
>         >
>         http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>         >                 > To unsubscribe: send email to
>         >
>         [hidden email] with
>         >                 unsubscribe as the subject
>         >
>         >
>         >
>         > _______________________________________________
>         > slicer-users mailing list
>         > [hidden email]
>         >
>         http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>         > To unsubscribe: send email to
>         [hidden email] with unsubscribe
>         as the subject
>
>
>
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

Daniel Haehn
In reply to this post by madanrao
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 <[hidden email]> 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 <[hidden email]>
>>>> 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 <[hidden email]>
> 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 <[hidden email]>
>> > >>> 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 <[hidden email]> 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
>> >         <[hidden email]> 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
>> >                 > [hidden email]
>> >                 >
>> >
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> >                 > To unsubscribe: send email to
>> >                 [hidden email] with
>> >                 unsubscribe as the subject
>> >
>> >
>> >
>> > _______________________________________________
>> > slicer-users mailing list
>> > [hidden email]
>> > http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> > To unsubscribe: send email to
>> [hidden email] with unsubscribe as the
>> subject
>>
>>

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

madanrao
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 <[hidden email]>
>>> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
>>>> 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 <[hidden email]>
> 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 <[hidden email]>
>> > >>> 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 <[hidden email]> 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
>> >         <[hidden email]> 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
>> >                 > [hidden email]
>> >                 >
>> >
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> >                 > To unsubscribe: send email to
>> >                 [hidden email] with
>> >                 unsubscribe as the subject
>> >
>> >
>> >
>> > _______________________________________________
>> > slicer-users mailing list
>> > [hidden email]
>> > http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> > To unsubscribe: send email to
>> [hidden email] with unsubscribe as the
>> subject
>>
>>



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vmtkcenterlines input model loading problem

madanrao
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 <[hidden email]> 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 <[hidden email]>
>>> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
>>>> 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 <[hidden email]>
> 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 <[hidden email]>
>> > >>> 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 <[hidden email]> 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
>> >         <[hidden email]> 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
>> >                 > [hidden email]
>> >                 >
>> >
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> >                 > To unsubscribe: send email to
>> >                 [hidden email] with
>> >                 unsubscribe as the subject
>> >
>> >
>> >
>> > _______________________________________________
>> > slicer-users mailing list
>> > [hidden email]
>> > http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> > To unsubscribe: send email to
>> [hidden email] with unsubscribe as the
>> subject
>>
>>




_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject

centerlines.png (26K) Download Attachment