Remove unnecessary files, Final style considerations



Back to Contents



First, make sure you have:

(as of June 2020)

You will learn:

  1. What needs to be kept, and what doesn't




You will be deleting files, so it is recommended that you make a copy or two before continuing.

  1. Remove any debug buttons from the viewer page (like that button on the first one or two pages).
  2. Delete any files you aren't using.
    • Viewer Version (viewer.php, viewerOnly.html)
    • the readme
    • custom.js if it is unused
    • Look around for other clutter
  3. Set quickKeys and fakeGPU in the debug section of assets/config.ini to false.
  4. Check slidedim.txt. Make sure no lines have a file number (second number) which isn't their own index number (first number) if that index number isn't used. If that happens, set the file number to match the index number and rename the file in the slides folder.
  5. Delete any slide files you aren't using from the slides folder
  6. Edit assets.txt
    • Remove lines with slide files you just deleted in the previous step
    • Check the file sizes of slidedim.txt, shapes.txt, and config.ini. Make sure these are accurate in assets.txt
  7. If you ever set the forms to not reset, make sure they reset again (the tutorials never directed you to remove resetting, so you would know if you need to reenable this.
  8. If using MS Windows, make sure your line endings on any new files you created are Unix, not DOS (LF vs CRLF). Note, if using visual studio code to convert these, for me, when I click on the line ending symbol at the bottom of the window, the "drop down" for changing the option appears at the top.
  9. If you are sharing the experiment through social media, make a dummy page at the top of your form which is never used in the experiment with an image you would like an auto parser to use. A tag for a simple X ray like image can be found at <img src="html/logo.png"> if you wish to use that. This will use the loading image for the ct viewer itself, so if you changed this (eg to your lab logo) that will display instead. You may wish to look into meta data tags social media sites would like you to add.
  10. Run the ct viewer
    • Make sure nothing important was deleted.
    • Keep the console open (Probably Ctrl+Shift+I), are all the console messages you print out still necessary.
    • Would you like to have more messages at key events where something could go wrong when you ask the lab to run tests on the viewer (so that you can get better feedback from them).
  11. You may wish to remove index.html, or make it a dead page with no link to your trial.
    • You will be distributing the trial with a link directly to it, the homepage is unneeded. and might be an easier way for people (who may give you meaningless data) to find your experiment.
    • Be aware that this might be against some host's terms and conditions (Some free hosts worry about becoming file servers, so web pages are required to be linked together).
  12. When you are happy with how everything is running, clean out your data folder.
  13. Make sure you still have your data folder and use.txt (if you're using it).
All Done




I would recommend adding credits to the end of your debrief (or somewhere).

Give attribution to whoever you got your images from. I know radiopedia likes attribution if you got images from them. Obviously when you conduct studies in the privacy of your own labs, credit doesn't matter. However, if you put something on the Internet, anyone can see it. Some people might want to know where to get the source images for themselves and some might simply want credit for sharing the original image. Even if someone says you don't have to credit them, I recommend doing it anyway. It is possible that someone sold you an image to use which was always free from another source. When you credit them, you have a chance of exposing their fraud.

This viewer is powered by the LibGDX graphics engine. They're super easy going about getting credit, but it would still be nice. Normally I include this in the HTML:
Powered by libGDX (<a href="https://libgdx.badlogicgames.com/">https://libgdx.badlogicgames.com/</a>)<br>
&nbsp;which is licensed under the Apache 2.0 license (<a href="https://www.apache.org/licenses/LICENSE-2.0">https://www.apache.org/licenses/LICENSE-2.0</a>)

Which looks like:
Powered by libGDX (https://libgdx.badlogicgames.com/)
 which is licensed under the Apache 2.0 license (https://www.apache.org/licenses/LICENSE-2.0)



If you want to credit me (and there's no legal reason to do so), something like this could work:
CT Viewer created by Daniel Williams (<a href="http://www.curiousorigins.com/">http://www.curiousorigins.com/</a>)

Which looks like:
CT Viewer created by Daniel Williams (http://www.curiousorigins.com/)


Proceed to see how to upload your experiment to a free web host.