Giter VIP home page Giter VIP logo

catmaid-to-blender's People

Contributors

jefferis avatar schlegelp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

catmaid-to-blender's Issues

Problem installing

Screen Shot 2019-08-12 at 5 27 07 PM
Phillip,
I am trying to put CATMAIDImport.py into Add-ons in Blender. Please see attached screenshot. I can not change CATMAID Server URL, as it does not open preferences, and is asking for 2.8x upgrade.
Thanks a ton for any help!
Aref

make popup windows dynamic

Show additional options only upon changing dropdown/ticking a box. See this example using check():

import bpy


def main(context):
    for ob in context.scene.objects:
        print(ob)
        
class SimplePanel(bpy.types.Panel):
    """Creates Import Menu in Properties -> Scene """
    bl_label = "Test"
    bl_space_type = "PROPERTIES"
    bl_region_type = "WINDOW"
    bl_context = "scene"

    def draw(self, context):
        layout = self.layout
        
        row = layout.row(align=True)
        row.alignment = 'EXPAND'
        row.operator("object.simple_operator", text = "Run", icon ='VISIBLE_IPO_ON')

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"
    bl_options = {'REGISTER', 'UNDO'}

    val1 = bpy.props.BoolProperty()
    val2 = bpy.props.BoolProperty()
    val3 = bpy.props.BoolProperty()

    @classmethod
    def poll(cls, context):
        """If this returns False, operator is greyed-out."""
        return context.selected_objects != []
    
    def check(self, context):
        """While this returns True, draw() is called continuously."""
        return True

    def execute(self, context):
        main(context)
        return {'FINISHED'}
    
    def draw(self, context):
        layout = self.layout
        layout.prop(self, "val1")
        
        if self.val1:
            box = layout.box()
            box.prop(self, "val2")
            box.prop(self, "val3")
            
    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self, width = 800)


def register():
    bpy.utils.register_class(SimpleOperator)
    bpy.utils.register_class(SimplePanel)


def unregister():
    bpy.utils.unregister_class(SimpleOperator)
    bpy.utils.unregister_class(SimplePanel)


if __name__ == "__main__":
    register()

Support for projects other than 1

The current code is hard coded to work only with pid=1.

The script should be updated either to have pid as a variable (similar to server_url), or, better yet, to query the server for projects visible to the user.

Importing nodes with edited radii

Hi,
I noticed that if you change the radii of the nodes of a skeleton in Catmaid, the add-on does not import the skeletons using those radii. Would it be possible to add a feature that could do that? Also, I was wondering if it is possible to import skeletons with strahler analysis shading so main branches are brighter and more distal branches are darker or more transparent
Thanks,
Ben Gorko

Color neurons by annotations feature not working properly

I am attempting to colorize neurons imported from CATMAID by their respective annotations but it is colorizing everything in the 3D space to the single color selected within this feature. Let me just walk through my process to better help you understand what I mean.

I first import by annotation i.e "KCaBp"
This loads in about 10 neuron skeletons.
Then I use the color by annotations feature to color any "KCaBp" brown and leave the exclude box blank.
This works fine, every KCaBp changes to brown.

I again import by annotation but this time "KCy"
This loads in around 65 neuron skeletons.
Then I attempt to use the color by annotations feature again but color the "KCy" cyan.
(I attempted to use and disregard the exclude box as an experiment since the color by annotations feature was causing me trouble.)
When I did use the exclude box I typed in "KCaBp" so that it would not change the color of the KCaBp neurons to cyan, leaving them brown.

However, this would change everything in the 3D space to cyan (both KCy and KCaBp).

Getting errors and unable to import from Catmaid.

Hi Phillip -

When attempting to pull in neurons by annonation or skeleton ID I receive the following errors.

annotation

skeleton id

I am installing Blender on a new computer so I downloaded the Catmaid-to-Blender import addon and was able to connect without a problem. However, I am still unable to retrieve any neurons. If you could help me to understand what may be going wrong, I would greatly appreciate it.

Thank you

Exporting Volumes to CATMAID not working

Importing volumes from CATMAID works perfectly, but I get the below error when I attempt to export volumes. As a test, I imported a previously generated volume and tried to export it without manipulation and was unsuccessful.

Screen Shot 2020-05-05 at 5 42 41 PM

Invalid SVGs

Hey Philipp - I'm new to Blender and am trying to have a play with your excellent tools here. When I try to create an SVG for a single selected neuron using 'export connectors' tool with the same settings you have in your example on GitHub to get a neuron with a bar chart and coloured postsynapses, I do not get a 'valid' SVG. When I try to open it in Chrome, I get this complaint:

"This page contains the following errors:

error on line 5037 at column 6: Opening and ending tag mismatch: svg line 0 and g

Below is a rendering of the page up to the first error."

And then a small image of the neuron and its bar charts, which looks incomplete. However, the output in the terminal seems fine. I can successfully export an SVG using the export morphology option.

Any idea where I am going wrong?

Thank you!

Python requirements

Using the plugin requires numpy to be installed. It would be nice to mention this in the installation notes.

Importing neurons, without any annotations or names, not working

I'm looking to import all non-zero length skeletons from Seymour, on MacOS. I figured I'd be able to do so by just specify minimum length as 1, and leaving everything else blank. trying that gives the following:

Python: Traceback (most recent call last):
File "/Users/swilson/Library/Application Support/Blender/3.6/scripts/addons/CATMAIDImport.py", line 421, in execute
neuron_names = client.get_names(skeletons_to_retrieve)
File "/Users/swilson/Library/Application Support/Blender/3.6/scripts/addons/CATMAIDImport.py", line 1713, in get_names
return self.fetch(url, post=post)
File "/Users/swilson/Library/Application Support/Blender/3.6/scripts/addons/CATMAIDImport.py", line 1526, in fetch
raise HTTPError('{} errors encountered: {}'.format(len(errors),
requests.exceptions.HTTPError: 1 errors encountered: 500 Server Error: 'NoneType' object is not iterable for url: https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/seymour/1/skeleton/neuronnames

Note that this same error appears regardless of the minimum size threshold or any downsampling values tested. Importing neurons via annotations or names is no problem - is it the case that you cannot leave both of these empty?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.