Unable to input channel Id in Slicer->IGT->Plus Remote

Operating system: windows 10
Slicer version:Slicer4.10.0
Expected behavior:record mha file from image streamed via openigtlink
Actual behavior:does not allow inputing channel id for image

Hello,

I streamed images from PLUS to Slicer and tried to record the image stream as a .mha file. However, I was not able to set the capture device id in IGT->Plus Remote (please see images below). Although the input widget is not grayed out, it does not allow me to type in or choose a capture device id.

I believe that this is causing problems when saving mha files because the following errors were loged in PLUS:

Does anyone have suggestions on how to fix this?

Thanks,
Zoe

@Sunderlandkyl could you have a look at this? Thanks!

Can you provide a link to your config file?

Here’s the config file I’m using.

<PlusConfiguration version="2.1">

	<DataCollection StartupDelaySec="1.0" >
		<DeviceSet
		   Name="PlusServer: Clarius ultrasound device"
		   Description="Broadcasting acquired video through OpenIGTLink"/>
		<Device Id="VideoDevice"
				  Type="Clarius"
				  IpAddress = "192.168.0.101"
				  TcpPort = "5828"
				  ImageSourceId = "Video">
			<DataSources>
				<DataSource Type="Video" Id="Video" PortName="B" PortUsImageOrientation="UN"/>
			</DataSources>
			<OutputChannels>
				<OutputChannel Id="VideoStream" VideoDataSourceId="Video" />
			</OutputChannels>
		</Device>
		<Device
		  Id="CaptureDevice"
		  Type="VirtualCapture"
		  BaseFilename="RecordingTest.mha"
		  EnableCapturingOnStart="TRUE"
		  RequestedFrameRate="30"
		  EnableCapturing="TRUE" >
			<InputChannels>
				<InputChannel Id="VideoStream" />
			</InputChannels>
		</Device>
	</DataCollection>

	<CoordinateDefinitions>
		<Transform From="Image" To="Reference"
		  Matrix="
        0.2 0.0 0.0 0.0
        0.0 0.2 0.0 0.0
        0.0 0.0 0.2 0.0
        0 0 0 1" />
	</CoordinateDefinitions>

	<PlusOpenIGTLinkServer
	  MaxNumberOfIgtlMessagesToSend="1"
	  MaxTimeSpentWithProcessingMs="50"
	  ListeningPort="18944"
	  SendValidTransformsOnly="false"
	  OutputChannelId="VideoStream" >
		<DefaultClientInfo>
			<MessageTypes>
				<Message Type="IMAGE" />
			</MessageTypes>
			<ImageNames>
				<Image Name="Image" EmbeddedTransformToFrame="Reference" />
			</ImageNames>
		</DefaultClientInfo>
	</PlusOpenIGTLinkServer>

</PlusConfiguration>

Can you start PlusServer.exe with log level debug, connect using Slicer, then try to start recording with Plus remote?

Once you’ve done that, can you add a link to the log from Plus?

Hi,
Here’s a screenshot of the relevant part of the log. The complete log can be found here.The log file is relatively long, but you can find the relevant error logs by searching for “error”.

Thanks,
Zoe

It looks like the query for capture devices is being received by Plus, but the response is not being received in Slicer.

Thanks, I’ll keep looking into it.

I think I’ve solved the issue.
There was a bug in the way that command responses were handled in Plus-2.6.

I’ve added a fix so that Plus-2.6 should work with the latest PlusRemote starting tomorrow morning with the next nightly build.
Alternatively, you could also start using the nightly release (Plus-2.7).

Hello Kyle,

Thanks for the fix! I’m able to save .mha files from slicer now!

However, when the saved mha files are reloaded, the dimensions seem to be different from the original image.

The Image dimensions when saving: (640 * 480 * 1)

Reloaded from mha: (4 * 640 * 480)

Thanks,
Zoe

Could you send me the mha that you recorded?

For now, you should be able to replay the mha correctly using Plus (http://perk-software.cs.queensu.ca/plus/doc/nightly/user/DeviceSavedDataSource.html).

Hello Kyle,

I didn’t find a way to add an attachment to this post. Please download the zipped mha file here: https://github.com/zoez526/slicer_debug/blob/master/MhaRecording.7z

Also, I realized that if I open the mha file in visual studio and change the DimSize to be 1 640 480, the image will show up normally. However, the image will show up in the sagittal plane instead of axial plane.

Thanks,
Zoe

@Sunderlandkyl The issue of the frames showing up as a grid in one view due to weird DimSize line in the header. Any chance this is related to the issue described in SlicerRt/Sequences #64Viewing sequences without transforms problems?

Yes, I think that it’s likely the same issue.

I’m wondering if you will be working on this issue soon?

Support for reading .igs.* files has been moved to the SlicerIGSIO extension.

The IGSIO library was recently created from Plus to allow access to reusable components between different applications. One of these components was sequence file IO.

If you install the SlicerIGSIO extension, you should be able to load the files as IGSIO sequence.
I’ve tested it on the file that you provided, and it works well.

It’s included in the latest nightly, and will be included in the stable once it’s built.