-
Notifications
You must be signed in to change notification settings - Fork 1
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
Is next version ready for python3? #6
Comments
Hi Kai, It should work. If you get some error feel free to report it here. |
Um...it seems to be something wrong with the directory:
|
It looks like python files were not generated by cmake from its templates. What was an output of the cmake and make commands, can you recompile it and put it here? Moreover, try to look to the folder /home/kai/masterthesis/lbpLibrary/build/lbpLibrary/LbpLibrary/python/ is there anything or is it empty? |
Right the installation seems easy. Thanks! Do you have any resources or paper that talks this library? I have 3D volume and mask images from LIDC-IDRI that I would like to test them with your library.
|
Unfortunately, it was my project 8 years ago (when i was bachelor student) and I don't have any English materials. But in principle if you want to use 3d part of the library you should follow the following code:
Mask is used to define size and number of points which will be used in the LBP algorithm. coordsToPoints transforms mask coordinates into data coordinates . For example we have a point [1,1,2] (lets assume [height, width, slice]) . So the point for this coordinate is width * point[0] + point[1] * height * width * point[2] -- it is more complicated because it creates 8 points from one coordinate in order to compute their mean value during computation of LBP vector. There are four pre-created mask files in the repository but you can create different masks using octave utilities -- maskGenerator.m script. In the mask you can specify the size of your data, so you can skip coordsToPoints function -- this function is useful when you have data of different sizes because in the file there are both the coords -- geometry of the mask -- and points with respect to some size of the data. I hope it is clear. If you have some question, feel free to put it here and I'll do my best to answer you. |
Ok, thanks for the tips! I will try to see if I can test your model with this type of data, which is similar to that from this site https://www.fmrib.ox.ac.uk/primers/intro_primer/ExBox14/IntroBox14.html |
Hi, sorry for delay I was on vacation last week. I'm not sure if your mask is the same thing as the mask in the library. The mask here is supposed to set the geometry of the LBP code computation. For example LBP1x8 in the 2D version is 8 points in the distance 1. Can you describe your task in more detail? |
No problem. The mask is for lung CT scan segmentation, to extract region of interest. I have this function below to read the data from the image or mask to 3D numpy.ndarray.
Execute the above function,
The data (region of interest) are similar as it was extracted with the mask. So I would like to produce 3D LBP with the 3D numpy.ndarray (float or int32) data and/or the mask. Thank you very much! For about info about this type of data set, there is a page about it: https://www.ncbi.nlm.nih.gov/pubmed/21452728 |
Am I right that you want to compute LBP codes only on the voxels inside your mask? In general you need to write a loop that will compute LBP vector for a part of the data. The result will be a list of LBP vectors.
I hope that the code is clear. In lbp_vec you will find the list of LBP vectors. |
Thank you so much! I think when using the PyRadiomics, I would need to feed it with the mask and the segmented data (ROI). For the 3D LBP, perhaps I can obtain the LBP value without the mask. I will start another topic if I need further help. Thanks again! |
I tested this working for python 2.x. Is the next version working for python3.x?
The text was updated successfully, but these errors were encountered: