-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ITK widget + intensity standardization #5
Comments
Hi! I think you are referring to the ITK widgtes. Have you tried to:
You can also have a look at the itkwidget documentation here |
Hi, I had already installed the ITK widgets, i could see them in the extension manager. i uninstalled and am currently trying to reinstall them. I also had another issue in the code with the instensity standardization step in preprocessing, should i start another issue? thanks :) |
This is the error i have been getting with the intensity standardization stepRemoteTraceback Traceback (most recent call last) """ The above exception was the direct cause of the following exception: RuntimeError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\pykneer\preprocessing_for_nb.py in field_correction(all_image_data, n_of_processes) ~\Anaconda3\lib\multiprocessing\pool.py in map(self, func, iterable, chunksize) ~\Anaconda3\lib\multiprocessing\pool.py in get(self, timeout) RuntimeError: Exception thrown in SimpleITK N4BiasFieldCorrectionImageFilter_Execute: d:\a\1\sitk-build\itk-prefix\include\itk-4.13\itkImageToImageFilter.hxx:241: still not sure how to fix it. Also, i tried running the 3D model after reinstalling the itkwidgets and it still didn't work. |
Just found the issue with the 3D widget. Apparently it was either adblocker or pop up blocker extension on chrome that was blocking the widget from showing up. thanks either way and hope i can get some feedback on the other issue i posted above, thanks :) |
Fantastic, happy you solved the widget issue! For the preprocessing issue. Is it with your images or with demo images?
and
Also, I see that in InputImage_1, Origin and Spacing are the same, just one positive and one negative, which is an interesting coincidence. |
Hi again, i am getting the issue with the demo images, still haven´t tried to use my own set as i want it to have it running smoothly by then. i found it happens with certain images only. The first time i ran the program only file cubeQuant/03 was presenting this issue and once i deleted it from the image_list_preprocessing.txt file, it ran smoothly. |
Hi I think i found something interesting. The origin of the second image is different because it appears to be the origin of the otsu filter mask used for the field correction step. I just checked the code and maybe it could be solved by adding a line to set the origin to zero for the mask used as well, probably setting the spacing to match the one in the image to filter as well. I am yet to try it but ill let you know what happens. |
That's indeed interesting, and surprising. Have you also tried to run the image by itself? I mean as the only image in the input |
To answer your question, yes, i tried it, the problem was mostly when trying to process more than one at a time. A small update, I dug into the code in preprocessing_for_nb.py and sitk_functions.py to have a look at the field_correction function. After a lot of trial and error, i ended up using the field correction code in sitk_functions.py directly on jupyter. `start_time = time.time() read the imageimg = sitk.ReadImage("./preprocessed/01_DESS_01_orig.mha") correct for the magnetic fieldcreating Otsu maskotsu = sitk.OtsuThresholdImageFilter() correct fieldcorrector = sitk.N4BiasFieldCorrectionImageFilter() save image to tempsitk.WriteImage(img, "./preprocessed/01_DESS_01_temp.mha") print ("-> The total time for image was %d seconds (about %d min)" % ((time.time() - start_time), (time.time() - start_time)/60))` I ran this code for each file manually, and i found it interesting that the first time i ran it for each one i ended up having the same issue as before about origin and spacing not being the same. However, right after getting the error message and running the code again, the task was completed succesfully. |
Hi,
in the step 3D MAP: Interactive rendering of 𝑇2 maps i keep getting the Error displaying widget: model not found. I already installed npm and nodejs and ran the line on the anaconda prompt.
The text was updated successfully, but these errors were encountered: