Hello everyone,
I want to go from an experimental microstructure of a color picture (JPG) to a MICRESS microstructure input file, through the relevant manual I do the image processing, but when it comes to the last step to convert the picture to a microstructure text file I have The following questions, hope to get your help. ("Convert this PGM file to a MICRESS conform microstructure text file with the provided script tool PGM_to_MICRESS.exe
E.g. on the command line: PGM_to_MICRESS.exe <PGM file><microstructure.txt>”)
The problem shows up as: Can't run on my computer. What should I do? Or is there any other way to realize the transformation of microstructured text?
Jane
The text conversion
Re: The text conversion
Hi Jane,
sorry. I thought I had modified all documentation where a PGM_to_MICRESS.exe is mentioned.
Where did you read it?
In fact the provided PGM_to_MICRESS is a Perl script not an executable. We will port this to Python in future.
You need a to install a Perl interpreter to run it on Windows (e.g. Strawberry Perl). Linux distribution usually have one, already.
See here too: viewtopic.php?f=17&t=506&p=2012&hilit=perl#p1839
Hope that helps.
Best,
Ralph
sorry. I thought I had modified all documentation where a PGM_to_MICRESS.exe is mentioned.
Where did you read it?
In fact the provided PGM_to_MICRESS is a Perl script not an executable. We will port this to Python in future.
You need a to install a Perl interpreter to run it on Windows (e.g. Strawberry Perl). Linux distribution usually have one, already.
See here too: viewtopic.php?f=17&t=506&p=2012&hilit=perl#p1839
Hope that helps.
Best,
Ralph
Re: The text conversion
Dear Ralph,
According to the link you sent, I have downloaded and installed the perl script, and then executed the following command, but it shows that access is denied, and the error behavior is the same as what I mentioned in my first forum. Whether the operation is compliant, so the output of the .txt file required in micress is still not implemented, I hope you can help me.
"C:\Users\a litter son jack> Pgm_to_micress.exe D:\ [01] ustb\ [07] MICRESSstudy\ [18] Origin 4.pgm 4.txt
access denied."
Thank you again and wish you a happy life.
Jane
According to the link you sent, I have downloaded and installed the perl script, and then executed the following command, but it shows that access is denied, and the error behavior is the same as what I mentioned in my first forum. Whether the operation is compliant, so the output of the .txt file required in micress is still not implemented, I hope you can help me.
"C:\Users\a litter son jack> Pgm_to_micress.exe D:\ [01] ustb\ [07] MICRESSstudy\ [18] Origin 4.pgm 4.txt
access denied."
Thank you again and wish you a happy life.
Jane
Re: The text conversion
I hope that you installed a perl interpreter. These packages include an exe like perl.exe. A perl script can be executed the way below. Please forget the PGM_to_MICRESS.exe and take the script (it is a text file) from the MICRESS tools folder. I think there is also a link in the other post.
I noted here with the extension .pl which is the usual one for perl script. It remains a normal text file with perl code in it.
Hope that helps.
Best,
Ralph
Code: Select all
perl.exe PGM_to_MICRESS.pl Origin_4.pgm 4.txt
Hope that helps.
Best,
Ralph
Re: The text conversion
Dear Ralph,
I have also been learning how to use the experimental data as the initial micro structure, I have saved the experimental pictures in.PGM format through the software GIMP, and I have downloaded the Perl interpreter according to the link you provided to other users, AND I have read the explanation you provided to other users, but I still don't understand it. If it is convenient, can you provide detailed steps for converting.PGM to micress-readable files? Thank you very much for your support.
lV
I have also been learning how to use the experimental data as the initial micro structure, I have saved the experimental pictures in.PGM format through the software GIMP, and I have downloaded the Perl interpreter according to the link you provided to other users, AND I have read the explanation you provided to other users, but I still don't understand it. If it is convenient, can you provide detailed steps for converting.PGM to micress-readable files? Thank you very much for your support.
lV
Re: The text conversion
Sorry. There are not really more details.
* You have a PGM picture, the perl script (attached ) and a perl interpreter.
* You run it like above and you will get the 2D ASCII file with the pixel values in it which can be read in by MICRESS as an initial microstructure.
* the geometry (picture size) has to be specified in the driving file
See also our training material (Turorial 10a - Importing initial microstructures) to see how a 2D ASCII file can be read in:
https://micress.rwth-aachen.de/basic-tr ... 22.04.html
Best
Ralph
* You have a PGM picture, the perl script (attached ) and a perl interpreter.
* You run it like above and you will get the 2D ASCII file with the pixel values in it which can be read in by MICRESS as an initial microstructure.
* the geometry (picture size) has to be specified in the driving file
See also our training material (Turorial 10a - Importing initial microstructures) to see how a 2D ASCII file can be read in:
https://micress.rwth-aachen.de/basic-tr ... 22.04.html
Best
Ralph
- Attachments
-
- PGM_to_MICRESS.txt
- (3.28 KiB) Downloaded 202 times