Also related to that... the new version of slicer is very sensitive to
the order you pass parameters--- in particular the placement of the -L
flag causes erratic behavior if it's not the first parameter... i.e.
slicer -L -lut render1
I was passing the -L after scale or something like that and getting
all sorts of weird behavior...
On Mon, May 23, 2011 at 2:51 PM, Christian F. Beckmann
<[log in to unmask]> wrote:
> Hi
>
> If you do happen to have an edge-only volume already, then all this shoudl be easy using overlay / slicer. I was under the impression that you do need slicer to do the edge detection.
> Best
> christian
>
>
> On 22 May 2011, at 03:19, bettyann BA wrote:
>
>> Thanks for your reply, Christian.
>>
>> I did end up using imageMagick's 'convert'.
>> This is what I did:
>>
>> 1. Created .png files from the output of 'overlay' using 'slicer'.
>> 2. Created .png files from an edge-only volume using 'slicer'.
>> 3. I wanted the edges to be blue so I created my own blue.lut text file and
>> used the '-l blue.lut' option in slicer.
>> 4. Converted the edge-only .png files to be transparent via 'convert':
>> convert $ePng -fuzz 3%% -transparent black -strip $ePng
>> 5. Created a composite of the 'overlay' .png and the transparent edge-only .png:
>> convert $overPng $ePng -gravity center -composite -quality 100 $overPng
>>
>> I also found the -L option in 'slicer' produces unreadable labels.
>> Here is the code I used to draw labels onto the .png files via imageMagick's 'convert':
>>
>> #!/bin/sh
>> font='Helvetica'
>> size=9
>> color='White'
>> gravity='NorthWest'
>> axis=X
>> for sl in $slList; do
>> printf -v slF "%03d" $sl
>> ooPng="$tmpDir/slice_$slF.png"
>> anno="${axis}=$sl"
>> cmd="convert $ooPng -font $font -pointsize $size -fill $color"
>> cmd="$cmd -gravity $gravity -draw \"text 3,18 '$anno'\" $ooPng";
>> # echo $cmd
>> eval $cmd
>> done
>>
>> Thanks,
>> - bettyAnn
>
--
David A Gutman, M.D. Ph.D.
Center for Comprehensive Informatics
Emory University School of Medicine
|