open-discussion > script for kSegments
Showing 1-2 of 2 posts
replyDisplay: Results per page:
Dec 20, 2017  04:12 PM | Ge Tan
script for kSegments
Hi,
I tried to do the step of kSegments as shown in the web (http://www.mccauslandcenter.sc.edu/mricr...),


CONST
kSegments = 5;
VAR
i: integer;
start, thick: single;
BEGIN
thick := 1/kSegments;
RESETDEFAULTS;
COLORBARVISIBLE(false);
BACKCOLOR(255, 255, 255);
LOADIMAGE('G:\Analysis0073\Results\T2_FC_Grey_ROI2_93');
OVERLAYLOAD('motor');
OVERLAYMINMAX(1, -2, -2);
AZIMUTHELEVATION(130, 15);
FOR i := 1 TO kSegments DO BEGIN
start := (i-1)*thick;
CLIPAZIMUTHELEVATION(start, 0, 180);
CUTOUT(0.0, 0.0, 0.0, 1.0, 1.0-start-thick, 1.0);
SAVEBMP('sector'+inttostr(i));
END;
END.


but what I got was wrong (as shown in the attached figure). And i got the same picture (as shown in the attached figure) when i running another script, such as,

BEGIN
LOADIMAGE('mni152_2009bet');
BACKCOLOR(128, 169, 255);
OVERLAYLOADSMOOTH(true);
OVERLAYLOAD('motor');
OVERLAYMINMAX(1, -4, -4);
OVERLAYLOAD('motor');
OVERLAYMINMAX(2, 4, 4);
CUTOUT(0.0, 0.45, 0.5, 0.75, 1.0, 1.0);
SHADERNAME('overlay');
END.


I am looking forward to getting a reply and some help from you to adjust the script, especially for kSegments.

Best regards,
Ge Tan
Attachment: kSegments.JPG
May 7, 2018  05:05 PM | Chris Rorden
RE: script for kSegments
I do not have access to your image 'G:\Analysis0073\Results\T2_FC_Grey_ROI2_93', so I can not replicate your issue. I would look at the lower panel of the scripting form - it will show you any errors in encounters when executing your script. When I ran the script from this web page
  http://www.mccauslandcenter.sc.edu/mricr...
(which uses the image mni152_2009bet which is included with MRIcroGL) it created the 5 bitmaps I could stitch together with an image editor. I should point out that the image mni152_2009bet is very high resolution, and may overwhelm some graphics cards. You can use the image mni152_2009_256 instead - it is lower resolution so it makes less demands on your graphics card.
reply