-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ROI definition issue on Macbook - seemingly easy fix #328
Comments
I do not think that's a good fix. The function accept vw as an input
variable. So if the variable is provided, it should be used. Your edit
would overwrite the input variable every time the function is called.
It is hard to tell what is causing your problem - are you using the GUI or
a script? The problem may arise from combining GUI use, which defines a
view structure as a Global variable, usually with all caps, such as
VOLUME{1}, whereas scripts often use local variables. If you call
meshROI2Volume from a GUI, it should do the right thing and update your
global view structure.
Jon
…On Thu, Jan 16, 2020 at 2:41 AM fails1to1compile09 ***@***.***> wrote:
Dear all,
Another question: on my Macbook Mojave, mrMesh does work, but there is an
issue with transferring the ROI from the brain's surface in the Mesh window
to the Gray volume window.
With my somewhat limited programming experience, I figured out a seemingly
easy fix, but if someone can confirm that it is a valid fix (and won't
cause any problems), that would be great.
It appears that while Volume{x} updates the Mesh number (e.g.,
Volume{1}.meshNum3d=2), it does not get updated in the vw variable. mrMesh
tries to find the selected mesh in view, and crashes.
If I make the following change in the function meshROI2Volume, it appears
to update the variable vw to Volume{1} in my case, but presumably the
current volume, and the issue dissappears.
vw now also contains the substructure meshNum3d.
The change: replace "if notDefined('vw'), vw = getSelectedVolume; end" by
"vw = getSelectedVolume;". (line 27).
Does anyone see any issue with this temporary fix?
Thank you
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_vistalab_vistasoft_issues_328-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAAQFPXXTVFB2JNVDUCHKES3Q6A2W7A5CNFSM4KHRZH2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IGTLF2A&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=W4u2U_DhoNoJOD0UdsYQiqH56Bg3zFfOtNa0RCuuEIs&m=MCAikCvo-lGMIVmvoD8vtcv45E0H0_7Na6UsvkH6ZVc&s=H4k1rGOMVnOVq2ax72d99kB_uP5mCMZIu5vb2OJecog&e=>,
or unsubscribe
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAQFPXSENJ5LBJW7PHVIMXLQ6A2W7ANCNFSM4KHRZH2A&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=W4u2U_DhoNoJOD0UdsYQiqH56Bg3zFfOtNa0RCuuEIs&m=MCAikCvo-lGMIVmvoD8vtcv45E0H0_7Na6UsvkH6ZVc&s=oUvAEtCOO3I2XxueG5uw5flgy16MYIWb3GdZU-r7Oyg&e=>
.
--
Jonathan Winawer
Associate Professor of Psychology and Neural Science
New York University
6 Washington Place
New York, NY, 10003
(212) 998-7922 (phone)
(212) 995-4018 (fax)
[email protected]
http://psych.nyu.edu/winawer/
|
Dear Prof. Winawer, and other colleagues, (EDITED on Sunday 19 January 4:25 am, PST; 7:25 am EST) Thank you very much. Problem in the 3D window - more information - and possible solution
When I use debugging mode (the red circles on the left of the code), and I check what kind of vw variable the function gets as input, I see something that looks very differently from VOLUME{1}. If I try to debug step by step, I add the following after "if notDefined('vw'), vw = getSelectedVolume; end" (line 27). in meshROI2Volume: Now the code finishes running AND -unlike in earlier edits- it stores the ROIs. The required tmp fields appear to originate from a structure that is very similar to VOLUME{1}, which is what made me think that "meshROI2Volume" gets the wrong vw structure input for some reason. For now, I go for the safer solution: don't use the 3D window for ROIs at all The way to do this is:
In this approach, the issue does not occur. It also uses meshROI2Volume, but it gets an empty vw input (as I found out when using 'debugging mode' to evaluate what was happening). As a result, when the code runs line 27 "if notDefined('vw'), vw = getSelectedVolume; end", it will actually run vw = getSelectedVolume, which appears to work in this context. |
Can you please share with us exactly what you are doing? In other words, if
you are running code on the command line, what is the code, starting from
when you first open the vistasession until you run into a problem? If you
are doing this in a GUI, what is the exact sequence of GUI commands?
Without this, it is hard to reproduce your error.
…On Fri, Jan 17, 2020 at 10:30 AM fails1to1compile09 < ***@***.***> wrote:
An update: I searched the code a little more, and if I add the following
after "if notDefined('vw'), vw = getSelectedVolume; end" (line 27). in
meshROI2Volume:
*tmp = getSelectedVolume; vw.meshNum3d=tmp.meshNum3d; vw.mesh=tmp.mesh;
vw.edges=tmp.edges; vw.nodes=tmp.nodes; vw.coords=tmp.coords;
vw.ROIs=tmp.ROIs; vw.viewType=tmp.viewType; vw.ui=tmp.ui; vw.name
<http://vw.name>=tmp.name <http://tmp.name>;
vw.selectedROI=tmp.selectedROI; vw.anat=tmp.anat;
vw.refreshFn=tmp.refreshFn; vw.curDataType=tmp.curDataType; clear tmp*
This works and the ROI is stored now (and it does not completely redefine
the vw structure). However, if I compare a generated ROI between the
earlier suggested 'solution' with the current 'solution', the coordinates
are identical. Additionally, it may still not be the proper solution yet,
because it may theoretically somehow overwrite other fields of the vw
structure (?).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_vistalab_vistasoft_issues_328-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAAQFPXQDFSED6DPPFBEXUEDQ6H2LPA5CNFSM4KHRZH2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJISB5A-23issuecomment-2D575742196&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=W4u2U_DhoNoJOD0UdsYQiqH56Bg3zFfOtNa0RCuuEIs&m=ZaHsH5AdB5Qpqm8z0fkXeeAl86v6Iy4fYqgM891TU1s&s=9qqU5xxdJXKfrrzIzo8ZQAmV6PO2g7uu7iZvbEVOg2o&e=>,
or unsubscribe
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAQFPXQ6LQKI3OHGSDA3R33Q6H2LPANCNFSM4KHRZH2A&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=W4u2U_DhoNoJOD0UdsYQiqH56Bg3zFfOtNa0RCuuEIs&m=ZaHsH5AdB5Qpqm8z0fkXeeAl86v6Iy4fYqgM891TU1s&s=R0tHqUsdrrS8L9mhkVdPHhHDR2eKC8ZOtzvgWT02P8s&e=>
.
--
Jonathan Winawer
Associate Professor of Psychology and Neural Science
New York University
6 Washington Place
New York, NY, 10003
(212) 998-7922 (phone)
(212) 995-4018 (fax)
[email protected]
http://psych.nyu.edu/winawer/
|
I tried to expand a little on what I did below (perhaps the extra details will clarify it): The only time I use the code, is to 1) initialise the session (mrInit), and to 2) open the GUI session (e.g., "mrVista", "mrVista '3'"). After that, I only use the GUI. I do some extra things for the connective field model, but by that stage, I don't use the mrMesh anymore (ROIs have been delineated using the above general 2-step GUI approach). I do this: If I instead do things from the VOLUME window (all GUI; I only give the main steps), I don't get the error. If requested, I can also give the steps for that, but it appears to be less relevant. |
Is this sufficient detail, or is a more thorough description required? Edit: to clarify, I found the above mentioned 'alternative' working approach from the VOLUME window more or less through trial and error. I wasn't sure if it is the correct approach. I guess it might be helpful to fix the 3D window approach, in case others are (failing at) using it, but -given that there is a working approach- it is either unnecessary or should not have priority (?) Thank you for your time |
Dear all,
Another question: on my Macbook Mojave, mrMesh does work, but there is an issue with transferring the ROI from the brain's surface in the Mesh window to the Gray volume window.
I figured out a seemingly easy fix, but if someone can confirm that it is a valid fix (and won't cause any problems), that would be great.
It appears that while Volume{x} updates the Mesh number (e.g., Volume{1}.meshNum3d=2), it does not get updated in the vw variable. mrMesh tries to find the selected mesh in view, and crashes.
If I make the following change in the function meshROI2Volume, it appears to update the variable vw to Volume{1} in my case, but presumably the current volume, and the issue dissappears.
vw now also contains the substructure meshNum3d.
The change: replace "if notDefined('vw'), vw = getSelectedVolume; end" by "vw = getSelectedVolume;". (line 27).
Does anyone see any issue with this temporary fix?
Thank you
The text was updated successfully, but these errors were encountered: