It appears to be read in successfully; it doesn't throw and error and here is what happens when I look at the object elements:> str(surf)List of 3$ Vertices :'data.frame': 35060 obs. of 4 variables:..$ X : num [1:35060] 162 167 167 172 172 .....$ Y : num [1:35060] 408 408 403 404 408 .....$ Z : num [1:35060] 35.5 33.3 35.6 35.6 34.5 .....$ PointNo: int [1:35060] 1 2 3 4 5 6 7 8 9 10 ...$ Regions : list()$ RegionColourList: logi(0)- attr(*, "class")= chr [1:2] "hxsurf" "list"When I attempt plot3d(surf), the rgl window opens but is a solid gray. If I do this while the window is open and other objects are already plotted, nothing happens and still no errors are thrown.
However, when I try your next suggestion, I get an error that the as.mesh3d function that doesn't exist at all!> wire3d(as.mesh3d(surf))Error in wire3d(as.mesh3d(surf)) : could not find function "as.mesh3d"
I'm sure that the nat and rgl libraries have been imported because otherwise I wouldn't be able to plot my dotprops objects or read the surf object in the first place.As for the surf object complexity, I've already downsampled the isosurface by 5 in Amira. However, if my intuition is correct the 35060 observations in surf correspond to the number of triangles, so I'll downsample a bit more and try again.
In the meantime, I'll have a go at the files on github to see if it's an issue with my file formatting or something else. Thanks!
I am able to read Amira HxSurface (.surf) files into R with the read .hxsurf function but the large hxsurf object that is created does not appear in the rgl window when I use the plot3d function. Has anyone run into this issue?
Do you know that the object has been read in successfully? Is there an error message when you try to plot it. Does R hang? Or do you just not see anything?Maybe you could send the output ofstr(mysurface)Replacing mysurface with the name of your surface object.You can also try plotting like sowire3d(as.mesh3d(mysurface))Which should show a wireframe model.
Could it be read instead as an amiramesh object and plotted that way?
No.
Regardless, all I want to do for now is plot a transparent ventral nervous system standard around my neurons of interest; if there is an hxsurf file out there already I'd be satisfied with that, though I'd prefer to be able to use my own Amira surfaces.
Of course you should be able to use your own surfaces. However plotting a transparent surface is quite demanding. You may need to reduce the number of triangles in your surface model. You can do this in Amira or meshlab. In Amira search the help for how to simplify a surface model. I normally aim for around 25k faces. Smoothing the surface model may help to give a good appearance.We have a VNC model for the VNC included in the nat.flybrains package:Which you can install from GitHub, see:Of course this is not going to be so much use to you unless it is warped to your template space or vice versa.The corresponding template brain stack can be found on zenodo by googling VNCIS1.
Secondly, does specifying the alpha in plot3d only work for surfaces? When I lower the alpha while plotting dotprops objects, the object remains opaque.
That is correct as far as I remember.Best,Greg.--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/nat-user.
To view this discussion on the web, visit https://groups.google.com/d/msgid/nat-user/f2b7adc8-bc1c-4396-9328-e94128f7f7f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Meredith C. PetersonThe Mann LaboratoryDepartment of Biochemistry and BiophysicsColumbia University Medical Center701 W 168th Street HHSC 1104New York, NY 10032
Thanks so much! It works beautifully, even without downsampling.