Tractography interactive seeding in CLI module

Hello Developers,

First of all Thank you for the support. I made some progress in my current task. I have implemented UKF tractography and add some modifications on it which I needed.

Now I want to implement interactive seeding tractography module as CLI. I am trying to implement it like this:

  def dti2fibers(self,markup,b):

if not hasattr(self, 'tractography_node'):
  self.tractography_node = slicer.vtkMRMLFiberBundleNode()
  slicer.mrmlScene.AddNode(self.tractography_node)

parameters = {
  'InputVolume': self.DTISelector.currentNode(),
  'OutputFibers': self.fiberBundleSelector.currentNode(),
  'InputFiducialList':self.markupSelector.currentNode() # THIS IS THE POINT OF ERROR
}

self.seeding_parameter_node = slicer.cli.run(
slicer.modules.tractographyinteractiveseeding, None,
parameters,wait_for_completion=False)

I am not sure about the input parameters? how can I give my markup node as an input to the module.
I saw the docuemntetion: https://www.slicer.org/wiki/Documentation/Nightly/Modules/TractographyInteractiveSeeding

But the inputs are not mentioned as clear as in ROI module : https://www.slicer.org/wiki/Documentation/4.10/Modules/TractographyLabelMapSeeding

Can you please let me know how can I give markup node as an input to my interactive seeding module.

Thank you so much

:smile:

To help people help you, could you include the specific error message? Also if you can point to a github repository of the full code it’s better than just including a snippet (so people can see where variables are defined, etc).

Hello Thank you fro your response. This snippet is general implementation from my source code. I am actually asking about the CLI parameters for tractographyinteractiveseeding module.

For ROI module it is clearly mentioned in documentation with the names:

Input DTI Volume** (InputVolume): DTI volume in which to seed (generate) tractography.
Input Label Map** (InputROI): Label map defining region for seeding tractography.
Output Fiber Bundle** (OutputFibers): Tractography result

But for Interative seeding module there is no such thing mentioned in the documentation.

I hope I am clear with my question. Sorry for the confusion.

What is your goal? Have you looked at the interactive UKF module?

I actually want to make a simple interactive tractography with simple mouse clicking which I have already implemented with ukf tractography.
Now I want to implement the same thing with interactive seeding module as ukf is computationally expensive.

I want to learn how to use interactive seeding module in CLI. I have tried to make a function but I dont know the CLI parameters it needs.

But does the Interactive UKF module already work for your needs?

Also, all CLIs should be able to print their help information when run on the command line with -h. This should help understand inputs.

It worked but it might be computationally expensive,

Also, I want to run tractography module on background. I could not figure out a way to run the whole UKF tracktography on background,

Typically on any CLI module we can this flag: set wait_for_completion=False

Thank you for your response.

Did you try the autorun options for the CLI?

image

Thank you for your response, I have implemented UKF on my own application. I will try to activate it pragmatically. Thank you