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

navigation

(zoe) #1

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


(Andras Lasso) #2

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


(Kyle Sunderland) #3

Can you provide a link to your config file?


(zoe) #4

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>


(Kyle Sunderland) #5

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?


(zoe) #6

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


(Kyle Sunderland) #7

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.


(Kyle Sunderland) #8

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).


(zoe) #9

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


(Kyle Sunderland) #10

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).


(zoe) #11

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


(James Butler) #12

@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?


(Kyle Sunderland) #13

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


(zoe) #14

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


(Kyle Sunderland) #15

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.