From: trillos Date: Mon, 12 Oct 2009 16:26:37 +0000 (+0000) Subject: Changed to version3 X-Git-Tag: CREATOOLS.2-0-3~57 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e39f7913578561d6ca7a5b96e99188f3531c5bfc;hp=deb98a98f9b2006b9f21f2bd953efa369ce31939;p=creaRigidRegistration.git Changed to version3 --- diff --git a/PackRecalage/bbs/appli/ViewerMerge2DInteractive.bbs b/PackRecalage/bbs/appli/ViewerMerge2DInteractive.bbs index 1769742..7512bb6 100644 --- a/PackRecalage/bbs/appli/ViewerMerge2DInteractive.bbs +++ b/PackRecalage/bbs/appli/ViewerMerge2DInteractive.bbs @@ -3,17 +3,19 @@ load std load vtk load wxvtk load creaMaracasVisu -load PackVisuImages -//load creaImageIO load PackRecalage -//include vtk/boxes/bbLoadHola -//new LoadHola image +new FileSelector imageSelector1 + set imageSelector1.Wildcard "*.mhd" +new FileSelector imageSelector2 + set imageSelector2.Wildcard "*.mhd" new MetaImageReader image - set image.In "C:\Documents and Settings\trillos\Bureau\Nicolas\Stage\CreaRecalage\PackRecalage\data\ImagesFabienRecalage\adc-j0.mhd" - + connect imageSelector1.Out image.In + +new MetaImageReader image2 + connect imageSelector2.Out image2.In #new Gimmick image #new Gimmick image2 @@ -22,26 +24,25 @@ new MetaImageReader image new LayoutLine v1Layout new ViewerNV viewer1 -connect image.Out viewer1.In -set viewer1.nTypeView "0" -connect viewer1.Widget v1Layout.Widget1 - + connect image.Out viewer1.In + set viewer1.nTypeView "0" + connect viewer1.Widget v1Layout.Widget1 #Viewer containing image 2 new LayoutLine v2Layout new ViewerNV viewer2 -connect image.Out viewer2.In -set viewer2.nTypeView "0" -connect viewer2.Widget v2Layout.Widget1 + connect image2.Out viewer2.In + set viewer2.nTypeView "0" + connect viewer2.Widget v2Layout.Widget1 #LayoutSplit were the images will be new LayoutSplit initialImages -set initialImages.Proportion "50" -set initialImages.Orientation H -connect v1Layout.Widget initialImages.Widget1 -connect v2Layout.Widget initialImages.Widget2 + set initialImages.Proportion "50" + set initialImages.Orientation H + connect v1Layout.Widget initialImages.Widget1 + connect v2Layout.Widget initialImages.Widget2 #Layout line that will contain the buttons @@ -58,8 +59,6 @@ new Slider slider set slider.ReactiveOnTrack "1" connect slider.Widget buttonsLayout.Widget1 - - #Slider were the xScale will be entered new Slider sliderX @@ -70,8 +69,6 @@ new Slider sliderX set sliderX.ReactiveOnTrack "1" connect sliderX.Widget buttonsLayout.Widget2 - - #Slider were the yScale will be entered new Slider sliderY @@ -91,12 +88,10 @@ new Transform2DBox transform connect sliderX.Out transform.ScaleX connect sliderY.Out transform.ScaleY - - new ReSlicerBox reslice1 connect viewer1.Point reslice1.Origin connect transform.Out reslice1.Transform - connect image.Out reslice1.In + connect image2.Out reslice1.In new SliceImage slice1 connect reslice1.Out slice1.In @@ -106,103 +101,121 @@ new Viewer2D viewer2d connect reslice1.Out viewer2d.In set viewer2d.Slice "1" -#new ViewerNV viewer3 - #connect reslice1.Out viewer3.In - #set viewer3.nTypeView "5" - #set viewer3.WinWidth "600" - # Create the reslicers new SliceImage imgslice1 new SliceImage imgslice2 connect image.Out imgslice1.In - connect reslice1.Out imgslice2.In + connect reslice1.Out imgslice2.In -# Create the visulization box +# Create the visulization box for checkerBoard new CheckBoardBox cbb - connect imgslice1.Out cbb.In1 - connect imgslice2.Out cbb.In2 + connect imgslice1.Out cbb.In1 + connect imgslice2.Out cbb.In2 # Create the slider1 new Slider sdr - set sdr.ReactiveOnTrack 1 - set sdr.Max 50 - set sdr.In 14 + set sdr.ReactiveOnTrack 1 + set sdr.Max 50 + set sdr.In 14 # Create the slider2 new Slider sdr2 - set sdr2.ReactiveOnTrack 1 - set sdr2.Max 50 - set sdr2.In 14 + set sdr2.ReactiveOnTrack 1 + set sdr2.Max 50 + set sdr2.In 14 # Create the ZSlider for the slices new Slider sdrZ - set sdrZ.ReactiveOnTrack 1 - set sdrZ.Max 50 - set sdrZ.Title "Z for slice" + set sdrZ.ReactiveOnTrack 1 + set sdrZ.Max 50 + set sdrZ.Title "Z for slice" + + connect sdrZ.Out imgslice1.Z + connect sdrZ.Out imgslice2.Z + connect sdrZ.BoxChange imgslice1.BoxExecute + connect sdrZ.BoxChange imgslice2.BoxExecute + +#Create Sliders for WinLevel and ColorLevel + +new Slider colorLevel + set colorLevel.Min "0" + set colorLevel.Max "99" + set colorLevel.In "50" + set colorLevel.Title "Color Level" + +new Slider windowLevel + set windowLevel.Min "0" + set windowLevel.Max "99" + set windowLevel.In "50" + set windowLevel.Title "Window Level" + +# Connection to viewers + + connect colorLevel.Out viewer1.ColorLevel + connect colorLevel.Out viewer2.ColorLevel + + connect windowLevel.Out viewer1.WindowLevel + connect windowLevel.Out viewer2.WindowLevel -connect sdrZ.Out imgslice1.Z -connect sdrZ.Out imgslice2.Z -connect sdrZ.BoxChange imgslice1.BoxExecute -connect sdrZ.BoxChange imgslice2.BoxExecute +new MultipleInputs multLevels + connect colorLevel.BoxChange multLevels.In1 + connect windowLevel.BoxChange multLevels.In2 -# Create viewer & layout + connect multLevels.BoxChange viewer1.BoxExecute + connect multLevels.BoxChange viewer2.BoxExecute + +# Create viewer & layout for Checkerboard new LayoutSplit checkerBoard new LayoutLine ly -new Viewer2D viewerCH - set checkerBoard.Proportion 80 +new ViewerNV viewerCH + set viewerCH.nTypeView "0" + set checkerBoard.Proportion 80 -# Graphical pipeline - connect sdr.Out cbb.Cols - connect sdr2.Out cbb.Rows - connect cbb.Out viewerCH.In +//////////////////////// +#Connecting levels - #connect sdrZ.Widget ly.Widget1 - connect sdr.Widget ly.Widget2 - connect sdr2.Widget ly.Widget3 + connect colorLevel.Out viewerCH.ColorLevel + connect windowLevel.Out viewerCH.WindowLevel +////////////////////// - connect viewerCH.Widget checkerBoard.Widget1 - connect ly.Widget checkerBoard.Widget2 -# Create Surface View +# Graphical pipeline + connect sdr.Out cbb.Cols + connect sdr2.Out cbb.Rows + connect cbb.Out viewerCH.In -new SurfaceCreator surf - set surf.Color1 RED - set surf.Color2 BLUE + connect sdr.Widget ly.Widget2 + connect sdr2.Widget ly.Widget3 - connect imgslice1.Out surf.Image1 - connect imgslice2.Out surf.Image2 + connect viewerCH.Widget checkerBoard.Widget1 + connect ly.Widget checkerBoard.Widget2 -new Slider sdrSurf1 - set sdrSurf1.Min -500 - set sdrSurf1.Max 500 - set sdrSurf1.In 100 +#Image Transparency view -new Slider sdrSurf2 - set sdrSurf2.Min -500 - set sdrSurf2.Max 500 - set sdrSurf2.In 300 +new TransparencyV2 trans + connect imgslice1.Out trans.In1 + connect imgslice2.Out trans.In2 - connect sdrSurf1.Out surf.Height1 - connect sdrSurf2.Out surf.Height2 +new Slider sdrP + set sdrP.Max "100" + set sdrP.Min "0" + set sdrP.In "50" -# Create Surface Layouts + connect sdrP.Out trans.Percent -new LayoutSplit surface -new LayoutLine lySurf -new Viewer3D viewerSurf - set surface.Proportion 80 - connect sdrSurf1.Widget lySurf.Widget1 - connect sdrSurf2.Widget lySurf.Widget2 - connect viewerSurf.Renderer surf.Renderer - #connect lySurf.BoxChange viewerSurf.BoxExecute +new ViewerNV transView + connect trans.Out transView.In + set transView.nTypeView "0" - connect surf.Out1 viewerSurf.In1 - connect surf.Out2 viewerSurf.In2 +new LayoutSplit transparency + connect transView.Widget transparency.Widget1 + connect sdrP.Widget transparency.Widget2 + set transparency.Proportion 80 - connect viewerSurf.Widget surface.Widget1 - connect lySurf.Widget surface.Widget2 + connect colorLevel.Out transView.ColorLevel + connect windowLevel.Out transView.WindowLevel #Create Substraction View @@ -266,16 +279,6 @@ new LayoutLine lySubColor connect subView.Widget substraction.Widget1 connect lySub.Widget substraction.Widget2 -# Create the transparency box -new Transparency tb - connect imgslice1.Out tb.Image1 - connect imgslice2.Out tb.Image2 - -# Create viewer and add actors -new Viewer3D transparency - connect tb.Actor1 transparency.In1 - connect tb.Actor2 transparency.In2 - #Multiple inputs for managing the interaction new MultipleInputs mult @@ -284,9 +287,6 @@ new MultipleInputs mult connect sliderY.BoxChange mult.In3 connect viewer1.BoxChange mult.In4 connect viewer2.BoxChange mult.In5 - #connect mult.BoxChange viewer3.BoxExecute - #connect mult.BoxChange viewer2d.BoxExecute - # Execution pipeline for checkboard @@ -295,41 +295,36 @@ new MultipleInputs mult2 connect mult.BoxChange mult2.In2 connect imgslice1.BoxChange mult2.In3 connect imgslice2.BoxChange mult2.In4 + connect multLevels.BoxChange mult2.In5 connect mult2.BoxChange cbb.BoxExecute connect cbb.BoxChange viewerCH.BoxExecute -# Execution pipeline for Surface +#Execution pipeline for trqnsparency -new MultipleInputs mult3 - connect mult2.BoxChange mult3.In1 - connect sdrSurf1.BoxChange mult3.In2 - connect sdrSurf2.BoxChange mult3.In3 +new MultipleInputs mult5 + connect mult2.BoxChange mult5.In1 + connect sdrP.BoxChange mult5.In2 - connect mult3.BoxChange surf.BoxExecute - connect surf.BoxChange viewerSurf.BoxExecute + connect mult5.BoxChange trans.BoxExecute + connect trans.BoxChange transView.BoxExecute #Execution pipeline for Substraction -new MultipleInputs mult4 - connect sdrSub1.BoxChange mult4.In1 - connect sdrSub2.BoxChange mult4.In2 - connect mult2.BoxChange mult4.In3 +new MultipleInputs mult3 + connect sdrSub1.BoxChange mult3.In1 + connect sdrSub2.BoxChange mult3.In2 + connect mult2.BoxChange mult3.In3 -new MultipleInputs mult5 - connect mult4.BoxChange mult5.In1 - connect colorU.BoxChange mult5.In2 - connect colorM.BoxChange mult5.In3 - connect colorL.BoxChange mult5.In4 +new MultipleInputs mult4 + connect mult3.BoxChange mult4.In1 + connect colorU.BoxChange mult4.In2 + connect colorM.BoxChange mult4.In3 + connect colorL.BoxChange mult4.In4 - connect mult5.BoxChange imageSub.BoxExecute + connect mult4.BoxChange imageSub.BoxExecute connect imageSub.BoxChange substraction.BoxExecute -#Execution pipeline for Transparency - -connect mult2.BoxChange tb.BoxExecute -connect tb.BoxChange transparency.BoxExecute - # Button for saving new CommandButton saveBut @@ -355,22 +350,16 @@ new LayoutSplit window1 connect initialImages.Widget window1.Widget1 connect buttonsLayout.Widget window1.Widget2 -#new LayoutSplit checkBoard - #set window1.WinWidth "600" - #set window1.Proportion "80" - #set window1.Orientation V - #connect viewer3.Widget checkBoard.Widget1 - #connect checkView.Widget checkBoard.Widget1 - new LayoutTab tabs connect checkerBoard.Widget tabs.Widget1 - connect surface.Widget tabs.Widget2 - connect substraction.Widget tabs.Widget3 - connect transparency.Widget tabs.Widget4 + connect substraction.Widget tabs.Widget2 + connect transparency.Widget tabs.Widget3 new LayoutLine tools connect sdrZ.Widget tools.Widget1 - connect saveBut.Widget tools.Widget2 + connect colorLevel.Widget tools.Widget2 + connect windowLevel.Widget tools.Widget3 + connect saveBut.Widget tools.Widget4 new LayoutSplit window2 connect tabs.Widget window2.Widget1 @@ -384,6 +373,4 @@ new LayoutSplit main connect window1.Widget main.Widget1 connect window2.Widget main.Widget2 -#exec image -#exec image2 exec main \ No newline at end of file