brain-products/BVTools

Can't build the converter

Closed this issue · 5 comments

Hello,

I'm new to using Visual Studio and I really need the BV2BIDS converter which is why I'm eager to know what steps I should do to be able to run the file?

I've added the repository to the solution explorer and set the FileFormats.BrainVisionToBidsConverterCLI as the startup project and then ran the program. Build succeeded is written in the output, however upon checking the output folder, the application does not open, or if it does, it immediately disappears when I try to type on it. May I know what I'm doing wrong?

Thank you.

kucint commented

Hi, you did everything well.
Do you want to run application in VS (debug) or rather without it (just launch)?
I suppose you want to debug the application in VS, right?
if so, follow these steps:

  • select BrainVisionToBidsConverterCLI as startup project
  • just press F5
  • because the BrainVisionToBidsConverterCLI is a command line application (it does not provide any User Interface) the console window will open.
  • it is possible that the console window immediately closes after app terminates.
    if so, disable option in Visual studio that closes the console:
    Tools->Options->Debugging->Automatically close the console when debugging stops.
  • start the app again and this time you should see following console output:
    image
  • as you see, application tells you that you must provide arguments in order to execute converter errorlessly. it gives you hints about argument syntax as well
  • you can provide arguments in Visual Studio. To do so:
  • open "Project Debug Properties":
    image
  • in Command line argument field, provide arguments you want to be passed to the application.
    image
  • that's it. let me know if you succeeded.
    Happy Coding!

Hello,

Thank you for your immediate response. I've tried to input arguments into the command line argument field but don't seem to know if I'm typing it out correctly because I get an invalid syntax.
image

This is my attempt in writing out the necessary arguments.
image

Thank you again!

kucint commented

Hi,

  • -dst and --bids-destination folder depicture the same argument, the first one is the short name, the second one is the long name. you should provide one of them, but not both.
  • additionally, you must provide the path to destination folder
  • note that you must provide the path to the source heder file that you want to convert as well

So generally your argument list shall look similar to this one:
-hdr "C:\sourceFolder\FileNameToConvert.vhdr"
-dst "C:\destinationFolderToStoreBidsFiles"

Hello,
I have been able to convert my files now, thank you very much!

kucint commented

Great!
you are very welcome.