BYU-MicrostructureOfMaterials / OpenXY

Other
35 stars 14 forks source link

Error while reading the first image #29

Open nradi4 opened 3 years ago

nradi4 commented 3 years ago

Hello,

I have multiple problems when submitting the first image. I managed to solve some of them but I don't understand this particular error :

Error using imread>parse_inputs (line 450)
The file name or URL argument must be a character vector.

Error in imread (line 322)
[filename, fmt_s, extraArgs, was_cached_fmt_used] = parse_inputs(cached_fmt, varargin{:});

Error in patterns.ImagepatternProvider/getPatternData (line 85)
                rawIm = imread(obj.imageNames{index});

Error in patterns.ImagepatternProvider (line 63)
            im = obj.getPatternData(1);

Error in patterns.makePatternProvider (line 27)
            patterns.ImagepatternProvider(...

Error in MainGUI>SetImageFields (line 426)
        pats = patterns.makePatternProvider(handles.Settings);

Error in MainGUI>SelectImageButton_Callback (line 396)
SetImageFields(handles,name,path);

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

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

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

Does anyone know where this is coming from ? My file name is 'Nickel test1 Pats_x0y0.bmp' and the next files are well incremented.

Thank you in advance for your help.

eretnek commented 3 years ago

Can you send us an error message? Also, OpenXY can run with a ctf file, but you may also need a cpr file.

On Mon, May 17, 2021, 2:04 AM nradi @.***> wrote:

Hello,

I was wondering if there's a way to use OpenXY without a grain file ? I use Esprit by Bruker to get my ebsd data and I only have .ctf files.

I converted the .ctf file to .ang and wrote a .txt grain file that is similar to the one in the demo. OpenXY can read both files without a problem but I have multiple errors when running the program. I also can't open the Advanced Settings window when loading the scan file.

Do you have an idea why it isn't working ? Is there any way to do otherwise ?

Thank you in advance for your answer.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BYU-MicrostructureOfMaterials/OpenXY/issues/29, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWHJDKTDSZ5U27EQL3DGDTTODEZLANCNFSM4475YJUQ .

dtfullwood commented 3 years ago

Are the images on some external disk or something? I wonder whether the path name is causing a problem. If you could pause the run in imagepatternProvider.m just before line 85 (e.g. add a 'keyboard' command just before the line; breakpoints don't always work for me), then you could query obj.imageNames{index} and see what the issue with the filename is.

nradi4 commented 3 years ago

Can you send us an error message? Also, OpenXY can run with a ctf file, but you may also need a cpr file. On Mon, May 17, 2021, 2:04 AM nradi @.***> wrote: Hello, I was wondering if there's a way to use OpenXY without a grain file ? I use Esprit by Bruker to get my ebsd data and I only have .ctf files. I converted the .ctf file to .ang and wrote a .txt grain file that is similar to the one in the demo. OpenXY can read both files without a problem but I have multiple errors when running the program. I also can't open the Advanced Settings window when loading the scan file. Do you have an idea why it isn't working ? Is there any way to do otherwise ? Thank you in advance for your answer. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#29>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWHJDKTDSZ5U27EQL3DGDTTODEZLANCNFSM4475YJUQ .

I think the error message is linked to the first image and not the file scan itself. Bruker ctf files don't come with cpr files so I wrote a text file that has the grain informations in the same way as the demo grain file. OpenXY seems to read it without problems but I have errors when I choose the first image. I don't think the errors are linked to the scan file but I don't understand why the demo example worked just fine for me but I can't manage to use my own files.

The error message is the following

Error using imread>parse_inputs (line 450)
The file name or URL argument must be a character vector.

Error in imread (line 322)
[filename, fmt_s, extraArgs, was_cached_fmt_used] = parse_inputs(cached_fmt, varargin{:});

Error in patterns.ImagepatternProvider/getPatternData (line 87)
                rawIm = imread(obj.imageNames{index});

Error in patterns.ImagepatternProvider (line 63)
            im = obj.getPatternData(1);

Error in patterns.makePatternProvider (line 27)
            patterns.ImagepatternProvider(...

Error in MainGUI>SetImageFields (line 426)
        pats = patterns.makePatternProvider(handles.Settings);

Error in MainGUI>SelectImageButton_Callback (line 396)
SetImageFields(handles,name,path);

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

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

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

Thank you for your answer.

nradi4 commented 3 years ago

Are the images on some external disk or something? I wonder whether the path name is causing a problem. If you could pause the run in imagepatternProvider.m just before line 85 (e.g. add a 'keyboard' command just before the line; breakpoints don't always work for me), then you could query obj.imageNames{index} and see what the issue with the filename is.

The images are on the same disk as the one I used for the demo example and it worked just fine then. I'm not that of an advanced Matlab user so I don't really know how to run functions like immagepatternProvider that are linked to other classes like patternProvider and ImageFilter. If I try and run them I get this error

Abstract classes cannot be instantiated. Class 'patterns.ImagepatternProvider' inherits abstract methods or properties but does not implement them. See the list of methods and properties that 'patterns.ImagepatternProvider' must implement if you do not intend the class to be abstract.

Do you have an idea how can I solve this problem ? I can provide you with the files if necessary.

Thank you in advance for your help.

dtfullwood commented 3 years ago

How big is the dataset? You can email me directly on dfullwood@byu.edu