WSICS
WSICS copied to clipboard
Allow direct usage of previously created LUT
Right now, only template parameters can be used to generate LUT's and normalized images. An option should be added that can directly transform a WSI with an existing LUT. Potentially define if a normalized WSI is output, a template csv or a LUT. (Or all three!)
-
[ ] Direct LUT application
- [ ] Test whether or not feature extraction is required for proper template application
- [ ] If no further feature extraction is required beyond the LUT creation, change algorithm to simply apply the LUT to an input WSI
-
[ ] Write resulting LUT's into a more easily accessible format
Hi, thank you for sharing your work. I am trying to work with WSICS as this is one of my needs. Actually I would like to be able to process individual patches from a known WSI (with known template csv) to match another template. That way I would calculate templates or LUTs from all WSI to one standard, and from that standard to each of the individual WSI templates so I could use the technique for creating augmentations. However I'm having real trouble making a build. I can get WSICS to build but it crashes in MultiResolutionImageReader::open reading any image, i.e. here:
MultiResolutionImageReader reader;
MultiResolutionImage* tiled_image = reader.open(input_file.string());
I wanted to rebuild ASAP (and multiresolutionimageinterface.dll with debug so I could determine what's going on but am unable to get that to build successfully, currently failing in cmake
"CMake Error at CMakeLists.txt:44 (find_package) By not providing "FindOpenJPEG.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenJPEG",
but CMake did not find one.".
I am on windows and using VS 2017. Is there any way you could share a working solution file or more explicit build instructions? Thank you. by the way I am also experiencing the problem that output WSI images are incorrect, they generally show up white in ASAP.
Because I am unable to build multiresolutionimageinterface in debug mode I am unable to find out why reading fails in c++. however I do have the following information:
-
loading the lut tif file in opencv (c++ or python) fails due to OpenCV restriction on image dimensions: e.g. error: (-215:Assertion failed) size.height <= CV_IO_MAX_IMAGE_HEIGHT in function 'cv::validateInputImageSize' The lut is 2^24 in size and opencv is constrained to 2^20 on any dimension
-
Opening regular wsi tif files in python (say from CAMELYON16) works fine but opening the tif lut files produced by wsics.exe just returns with NoneType
Hi Mark,
Sadly the current release suffers from some DLL issues which result in incorrect writing (and perhaps reading) of WSI's. I'm still working to resolve this, but I'm hoping to have finished it by at least the end of the week.
As for compiling ASAP, have you tried updating your Cmake to the most recent version? I believe that should resolve the error your encountering. Alternatively, you could change compilation parameters in VS2017 to output debug information.
In terms of the actual LUT, it's a RGB cv::Mat that's simply written to the disc and given a .tif extension. So perhaps storing it as an image isn't the correct thing to do in this case, as it isn't meant to represent it. I admit that it's a leftover piece of the original software that I refactored, and never really thought about. But I should be able to simply write it into another file format through the OpenCV FileStorage class. Hopefully that'll make it more accessible.
Aplogies for the inconvenience!
Hi Karelger, thank you for your reply and sorry for my tardy response... I am indeed using the latest CMake 3.14.3 and it is here that I receive the error when trying to build ASAP-develop. I was wondering if you could send me a VS sln file as I might be able to update the paths etc in there to get it to build. but of course, if you manage to fix the exe I may just be able to use that.
Regarding the LUT, it seems that although it's a 16777216x1 rgb image it is written out as tif by opencv and therefore seems to have been compressed to a smaller filesize i.e.uncompressed would be 50,331,648 bytes of data, the file is 41,367,034 bytes for example. So a simple binary file would be nice.
Ideally, I would like to simply run the wsics.exe to generate lut files and then load the lut in python and use the lut to transform image patches from the original wsi stats to the target.
I will check back for updates. thanks again
Hi Karelger, have you had any luck getting WSICS working again? thanks