nipy / mindboggle

Automated anatomical brain label/shape analysis software (+ website)
http://mindboggle.info
Other
145 stars 54 forks source link

Clean up fundus/pits extraction #22

Closed binarybottle closed 8 years ago

binarybottle commented 11 years ago

General

def fcNbrLst(FaceDB, Hemi):

you can replace this with mesh.py’s new find_adjacent_faces()

def vrtxNbrLst(VrtxNo, FaceDB, Hemi):

you can replace this with mesh.py’s find_neighbors() or find_neighbors_vertex()

def compnent(FaceDB, Basin, NbrLst, PathHeader):

i don’t understand what this function does. rename Parameters consistently and according to PEP8 naming conventions:

rename function to something clearer:

def judgeFace1(FaceID, FaceDB, CurvatureDB, Threshold = 0):

rename function to something clearer:

rename Parameters consistently and according to PEP8 naming conventions:

def basin(FaceDB, CurvatureDB, Threshold = 0): return Basin, Left

rename Parameters consistently and according to PEP8 naming conventions:

rename Returns:

rename function to something clearer:

def allTrue(List):

superfluous function -- remove

def dfsSeed(Visited, Basin):

too little to warrant a function; remove and include line of code where the function is called

def dfs(Seed, Basin, Visited, NbrLst, FaceDB): return Visited, FcMbr, VrtxMbr

rename Parameters consistently and according to PEP8 naming conventions:

rename Returns:

rename function to something clearer:

the following appends vertices, not faces, so what is going on?:
FcMbr = [] # members that are faces of this connected component

def pmtx(Adj):

superfluous function -- remove

def all_same(items):

too little to warrant a function; remove and include line of code where the function is called

def univariate_pits(CurvDB, VrtxNbrLst, VrtxCmpnt, Thld): return B, C, Child

rename Parameters consistently and according to PEP8 naming conventions:

rename Returns to something clearer (i don’t know what they mean), and rename function to something clearer:

def clouchoux(MCurv, GCurv):

this function is called only within clouchoux_pits(), so remove this function and replace “if clouchoux(MCurv[i], GCurv[i]):” with: “if (MCurv > 0.2) and (GCurv < 0):” and include 0.2 as a Parameter.

def clouchoux_pits(Vertexes, MCurv, GCurv):

rename Parameters consistently and according to PEP8 naming conventions:

rename function to something clearer:

def getBasin_and_Pits(Maps, Mesh, SulciVTK, PitsVTK, SulciThld = 0, PitsThld = 0, Quick=False, Clouchoux=False, SulciMap='depth'):

remove extraneous Parameters and code, rename Parameters consistently and according to PEP8 naming conventions, and rename function to something clearer:

All of the general comments for libbasin.py above apply.

Re: Prim and mst -- how do these differ from the x/min_span_tree.py code?

Minimum spanning tree is general-purpose enough that it should be in utils/paths.py

Best to remove the random from downsample() -- we want everything to be replicable.

binarybottle commented 8 years ago

I will close this issue, as the line-based fundus extraction is not currently being used by Mindboggle.