Skip to content
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

Customize the kNN Classifier #5

Open
SJ-cog opened this issue May 2, 2022 · 16 comments
Open

Customize the kNN Classifier #5

SJ-cog opened this issue May 2, 2022 · 16 comments

Comments

@SJ-cog
Copy link

SJ-cog commented May 2, 2022

Hello,
I am having trouble in customizing the kNN Classifier. When I hit' rude training' I get a few error messages in Matlab (tried with 2020a, 2021a). Please see the pic attached.
Any help with the issue is much appreciated. @JiyangJiang
Screen Shot 2022-05-02 at 1 15 46 AM

Here is the complete text of the line cropped in the image:
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)CustomiseKNNclassifier_GUI('startVisualAdjustment_btn_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.

Many thanks!

@JiyangJiang
Copy link
Member

JiyangJiang commented May 2, 2022 via email

@SJ-cog
Copy link
Author

SJ-cog commented May 2, 2022

Hi,
Yes, I was able to process the data with the in built classifier without any issues.
I followed the instructions listed here-(https://cns.readthedocs.io/en/latest/manual/customize_knn_classifier.html). The error is occurring at step 6, i.e. after I hit 'Rude training' or try to visually adjust the inbuilt classifier.
Please let me know if I can provide any other information.
Thanks,
Shivangi

@SJ-cog
Copy link
Author

SJ-cog commented May 3, 2022

@JiyangJiang I also tried creating a customize kNN Classifier on another Mac system and got the same error message.

@JiyangJiang
Copy link
Member

JiyangJiang commented May 4, 2022 via email

@SJ-cog
Copy link
Author

SJ-cog commented May 4, 2022

@JiyangJiang sorry but I didn't get any link.

@JiyangJiang
Copy link
Member

JiyangJiang commented May 4, 2022 via email

@SJ-cog
Copy link
Author

SJ-cog commented May 4, 2022

Thank you, I'll try it out and let you know!

@SJ-cog
Copy link
Author

SJ-cog commented May 4, 2022

@JiyangJiang Still got the same error(pasted below). Do you think there is any toolbox which I need to add to make it work in addition to the three listed in the manual?

Error using CustomiseKNNclassifier_GUI>startRudeTrainingBtn_processed_Callback (line 254)
Unknown error occurred.

Error in gui_mainfcn (line 95)
feval(varargin{:});

Error in CustomiseKNNclassifier_GUI (line 42)
gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)CustomiseKNNclassifier_GUI('startRudeTrainingBtn_processed_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.

@SJ-cog
Copy link
Author

SJ-cog commented May 4, 2022

@JiyangJiang in case this is useful- the program is creating the 'customiseClassifier' folder and four sub-folders within it (FLAIR, subjects, T1, textfiles) but they are all empty.

@JiyangJiang
Copy link
Member

JiyangJiang commented May 4, 2022 via email

@SJ-cog
Copy link
Author

SJ-cog commented May 4, 2022

@JiyangJiang thank you for taking time to review the issue and running it on your end. I was finally able to make the custom classifier work on Matlab 2016a. Both the new CNS and old CNS pipeline works on 2016 version. It didn't work on 2019, 2020 and 2021 for me.
However, now I have the problem with fslview. I tried the symbolic linking method you suggested above but its not working for me. I guess it may be because my Mac OS is 64 bit and fslview was 32 bit. In this case, is it possible to change fslview call to fsleyes in the CNS scripts? or is there any other way to make it work? Here is the error message I get when I try to visually edit the image: /Users/shijain/fsl/bin/fslview: line 7: /Users/shijain/fsl/bin/fslview.app/Contents/MacOS/fslview: Bad CPU type in executable

Thanks again for your prompt replies and suggestions! Truly appreciate them!

@JiyangJiang
Copy link
Member

JiyangJiang commented May 4, 2022 via email

@SJ-cog
Copy link
Author

SJ-cog commented May 6, 2022

@JiyangJiang thank you for the suggestion. I think we are close to making this work. I changed fslview to fsleyes in both the visual adjustment scripts. Now this is the message that I am getting. Do I need to add anything else in the script? Is it complaining about the brightness option? Do I need to add anything other option it is displaying in the message?

---=== Welcome to CNS packages ! ===---

CNS: Setting paths ...
CNS: Done.
CNS: Starting customising classifier GUI ...
Starting parallel pool (parpool) using the 'local' profile ... connected to 6 workers.
processing sub-2201 ...
sub-2201 done
argument -b/--brightness: invalid float value: '0.000000,831.600220'

FSLeyes version 1.0.13

Usage: fsleyes [options] file [displayOpts] file [displayOpts] ...

Options for 'volume' overlays
[-n NAME] [-d] [-a PERC] [-b PERC] [-c PERC] [-ll] [-lh] [-or LO HI]
[-un] [-dr LO HI] [-cr LO HI] [-mr LO HI] [-g REAL] [-ls]
[-ch {R,G,B,A}] [-ic] [-cm CMAP] [-nc CMAP] [-cmr INT]
[-in {none,linear,spline}] [-inc] [-i] [-ma] [-ns INT] [-bf REAL]
[-bi] [-s INT] [-r INT] [-nis INT]
[-m {intersection,union,complement}] [-v INT] [-cp POS AZI INC]
[-cl FILE] [-mi FILE]

@SJ-cog
Copy link
Author

SJ-cog commented May 6, 2022

@JiyangJiang for the options listed along with fslview in the visual adjustment script, I replaced -b with -dr; -l with -cm . Can you tell me what -t is doing or what the equivalent FSLeyes option will be?

@JiyangJiang
Copy link
Member

JiyangJiang commented May 9, 2022 via email

@JiyangJiang
Copy link
Member

JiyangJiang commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants