Announcement

Collapse
No announcement yet.

Programmatically loading a list of images

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Requested Programmatically loading a list of images

    Hello,

    Would it be possible to load pictures programmatically, based on an array or list of file names?
    The situation is that I can detect programmatically any DICOM files within a directory arborescence, and retrieve the list of full paths of these. Then if I want to open irfanView and load these, the only workable solution I could find was to write that list in a file, then
    use the /filelist option referencing that file. However I'd rather skip writing the list to a file and simply load irfanview.
    Or did I miss something? Using wildcards works to some degree if the files are all in the same directory.

    #2
    I am not quite clear what you do want to do.

    There are several ways of passing the list to Irfanview if it has been saved as a file. One you mention, using the /filelist Command line option. If you do not want to use a Command line then you can open a list in txt format in Irfanview Thumbnails and then view the images from that list in the Browser.

    If you do not want to save a list at all then you need to pass the individual filenames to Irfanview one by one. If you set the Start options of Irfanview to Allow only one instance then you can keep relaunching Irfanview with a new image by repeatedly calling .../i_view32.exe [filename]. If your program could output the name of each image file in turn, then you could call Irfanview from a loop in a Batch file.

    Comment


      #3
      You could also create a slideshow, timing your images.
      Download IrfanView Help Manual from:
      IrfanView Website - Here
      Sam_Zen's Website - Here
      Author's Website - Here

      Comment


        #4
        Hello again,

        Thank you very much for your replies. Well I can live with writing the list of files in a file, then delete it afterwards.That works well. Just it looks like using a roundabout way when the list of files is all ready there in memory, having to create another file, write the list into it, get IrfanView to read that file, then delete it. To give more understanding of what I am doing: I have a Windows form and an area where you can drag and drop a folder from Windows Explorer (This could be for instance the CD drive). When you drop it in the specified area of the Windows Form, my program checks the content of the selected folder, detects any DICOM file within its arborescence, then calls irfanView to open the list of detected images.
        On the proposal of forcing one instance only, I had tried that, but it seems like such a loop goes too fast and I wind up with 12 instances of IrfanView visible in task manager (for a folder with 12 images) and it doesn't respond quite well. Probably one should wait that one image is fully loaded before calling irfanview again, then it will indeed not create another instance. However then one has to have some sort of signal saying the image is loaded and one can call irfanView again for the next image. Not quite workable.
        The slideshow is very nice indeed, but it's not what I want to do.

        Comment

        Working...
        X