CenterForDigitalHumanities / SpectralRTI_Toolkit

Process Spectral RTI Images in ImageJ
GNU General Public License v3.0
1 stars 0 forks source link

txt and html files #87

Closed thanneken closed 5 years ago

thanneken commented 5 years ago

Just got through a successful run of AccurateColorRTI on Linux, except that the html file wasn't there. Previously I found the correct html written to the txt file in the same directory. This time the txt file had zero length.

The txt file should have info such as:

preferredFitter=/home/thanneken/wine/HSHfitter/deferredbatch.cmd
Brightness Adjust Option: Yes, by normalizing each image to a selected area
Normalization area bounds: 2262, 7710, 1710, 216
Jpeg Quality: 90 (edit SpectralRTI_Toolkit-prefs.txt to change)
Executing command /home/thanneken/wine/HSHfitter/deferredbatch.cmd /home/thanneken/Downloads/Ambrosiana_C73inf_115/AccurateColorRTI/Ambrosiana_C73inf_115_AccurateColorRTI.lp 3 16 /home/thanneken/Downloads/Ambrosiana_C73inf_115/AccurateColorRTI/Ambrosiana_C73inf_115_AccurateColorRTI_20180627_0305.rti

The html file should have markup such as:

<html lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>WebRTI Ambrosiana_C73inf_115_AccurateColor</title> <link type="text/css" href="css/ui-lightness/jquery-ui-1.10.3.custom.css" rel="Stylesheet"> <link type="text/css" href="css/webrtiviewer.css" rel="Stylesheet"> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery-ui.js"></script> <script type="text/javascript" src="spidergl/spidergl_min.js"></script> <script type="text/javascript" src="spidergl/multires_min.js"></script> </head> <body> <div id="viewerContainer"> <script  type="text/javascript"> createRtiViewer("viewerContainer", "Ambrosiana_C73inf_115_AccurateColorRTI_20180627_0305", $("body").width(), $("body").height()); </script> </div> </body> </html>

I also noticed that the filename of the empty txt file is Ambrosiana_C73inf_115_AccurateColorRTI_20180927_0502.txt It was run about 5:02 pm, so I would have expected it to say 17:02.txt.

thanneken commented 5 years ago

Not sure if this is related, but the appropriate command was not written to deferredbatch.cmd. Perhaps a problem writing to text files? The relevant moment in the log is:

[INFO] On hem capture index 55
[INFO] Saving ACRTI source image /home/thanneken/Downloads/Ambrosiana_C73inf_115/AccurateColorRTI/AccurateColor_Ambrosiana_C73inf_115_RTI-G15_098.jpg
[INFO] Running the fitter for AccurateColor...
[INFO] End fitter process
[INFO] Non windows .jp2 creation.  Command below: 

and at the top:

[INFO] Project directory: /home/thanneken/Downloads/Ambrosiana_C73inf_115/
[INFO] [preferredCompress=/opt/kakadu/bin/kdu_compress, preferredJp2Args=-rate -,2.4,1.48331273,.91673033,.56657224,.35016049,.21641118,.13374944,.08266171 Creversible=no Clevels=5 Stiles={1024,1024} Cblk={64,64} Cuse_sop=yes Cuse_eph=yes Corder=RPCL ORGgen_plt=yes ORGtparts=R Cmodes=BYPASS -double_buffering 10 -num_threads 4 -no_weights, preferredFitter=/home/thanneken/wine/HSHfitter/deferredbatch.cmd, jpegQuality=90, hshOrder=3, hshThreads=16, webRtiMaker=, shortFileNames=true]
[INFO] Variable States listed below!
thehabes commented 5 years ago

After some fixes and multiple runs on windows 7 choosing Accurate Color and Web RTI tasks together...

When hshfitter.exe is provided: The .txt file notes the settings and commands. The RTI file is produced. The .wrti file is produced. In cases of hard failure before the fitter process or when canceling the dialog asking to locate the fitter, none of the files are produced.

When deferred.cmd is provided: The .txt file notes the example commands and example it would make once the RTI file is created for the process. The deferred.cmd notes the example commands to run to create the RTI file then the Web RTI file.

I fixed the date formatter to format in 24 hour mode, not 12 hour mode.

I do not have a way to test in linux at the moment. I believe I had smoothed out the behavior around this.

thanneken commented 5 years ago

Just ran through a test on Linux... I like the way it creates the wrti.html file even before the rti and webrti folders are created.

The only bug is, I think, small.

In the html part of the script is missing an underscore (between process and date): It works when I replace: <script type="text/javascript"> createRtiViewer("viewerContainer", "Ambrosiana_C73inf_115_AccurateColorRTI20181126_1345", $("body").width(), $("body").height()); </script> with: <script type="text/javascript"> createRtiViewer("viewerContainer", "Ambrosiana_C73inf_115_AccurateColorRTI_20181126_1345", $("body").width(), $("body").height()); </script>

thanneken commented 5 years ago

I have a workshop coming up the week of January 14. I'd like to demo the latest version at that time. If we can get this bug fixed I think all the others are more in the area of enhancements. Once this works I'll pull it to the main master branch. Thanks.

thanneken commented 5 years ago

Beautiful... Thanks!