You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ViewsExample2.java the first step is to open an image via an IJ instance.
As far as I can see IJ tries to open the image from the network when I do IJ.run("T1 Head (2.4M, 16-bits)");.
As I am behind a restrictive firewall, calling this method failed for me. To fix this for me, I changed the opening command to IJ.run("$localPathToProject$\\images\\t1-head.tif"),
using the file which was distributed with the workshop. Doing so, the image opens as expected.
So far so good.
The point is that the provided image seems to be of UnsignedByteType and not UnsignedShortType. So the wrapping into an Img fails: Img< UnsignedShortType > img = ImageJFunctions.wrapShort( imp );
Am I doing something wrong, or can you confirm this?
The text was updated successfully, but these errors were encountered:
I can confirm this. The reason is that really the t1-head.tif file included in the workshop is 8-bit, while the "T1 Head (2.4M, 16-bits)" that IJ downloads is 16-bit. I don't remember what the reason (if any) for including the 8-bit file was...
In any case, for the case of unavailability of the online "T1 Head", there is ViewsExample2Alternative which uses the local file (and loads it as UnsignedByteType)
I did the tutorial step-by-step and did not look at the alternative before digging deep into looking for the reason oft the cash. I learned a lot by locating the issue. Never the less, from a user point oft view I would suggest to introduce a comment in the ViewsExample2 which mentions that the alternative covers the case for the shipped image.
In
ViewsExample2.java
the first step is to open an image via an IJ instance.As far as I can see IJ tries to open the image from the network when I do
IJ.run("T1 Head (2.4M, 16-bits)");
.As I am behind a restrictive firewall, calling this method failed for me. To fix this for me, I changed the opening command to
IJ.run("$localPathToProject$\\images\\t1-head.tif")
,using the file which was distributed with the workshop. Doing so, the image opens as expected.
So far so good.
The point is that the provided image seems to be of
UnsignedByteType
and notUnsignedShortType
. So the wrapping into an Img fails:Img< UnsignedShortType > img = ImageJFunctions.wrapShort( imp );
Am I doing something wrong, or can you confirm this?
The text was updated successfully, but these errors were encountered: