- It is possible that the path you are trying to access i.e. the folder is not present at the location provided by you in ‘pathInputQuantt’.
- Another reason may be that the path is not added to the MATLAB path. You can do so by going to MATLAB > Home Tab > Set Path. And then you may add it to the path and save it.
Error showing. "Cannot CD to /Users/basu/Desktop/Confocal_Images/TNF_TREATMENT (Name is nonexistent or not a directory).Error in IMAGE_ANALYSIS (line 37) cd (pathInputQuantt)"
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
pathInputQuantt='/Users/basu/Desktop/Confocal_Images/TNF_TREATMENT'% GFP image directory
pathInputTrack='Users/basu/Desktop/Confocal_Images/TNF_TREATMENT'% HOE image directory
pathOutput=pwd; %purpose?
t = clock; %purpose?
% Find the GFP and HOE images from the directory
cd (pathInputQuantt);
fnamesQUANT = dir('RelA.tiff'); % Get the GFP image: Cell
cd (pathInputTrack);
fnamesTRACK = dir('DAPI.tiff'); % Get the HOE image: Nucleus
restoredefaultpath
rehash toolboxcache
savepath
% Get the file names
fileNameQuant = dir('DAPI.tiff');
fileNameTrack = dir('RelA.tiff');
% Get the GFP image (Quant)
fileAddress='C:/Users/basu/Desktop/Confocal_Images/TNF_TREATMENT/UN_TNF_WT/', dir('RelA.tiff'); % Get the full file name
StackQuant.data = rgb2gray(imread(fileAddress)); % Get the image
%StackQuant.data = StackQuant.data(:,:,2);
[StackQuant.height, StackQuant.width] = size(StackQuant.data); % Get the size of the image
% Get the HOE image (Track)
fileAddress=[pathInputTrack, fileNameTrack]; % Get the full file name
StackTrack.data = rgb2gray(imread(fileAddress)); % Get the image
%StackTrack.data = StackTrack.data(:,:,3);
[StackTrack.height, StackTrack.width] = size(StackTrack.data); % Get the size of the image
0 Commenti
Risposte (1)
Raghav
il 4 Apr 2023
Hi,
Based on your question, I understand that you are facing path changing related difficulty while executing your program.
Based on the code provided and the error, there can be following possible reasons for this error:
Also, I will recommend you to check the path again as there is no drive mentioned before ‘/Users’.
Hope it helps!
Thanks,
Raghav Bansal
0 Commenti
Vedere anche
Categorie
Scopri di più su Import, Export, and Conversion in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!