commit
18630538d5
@ -2,4 +2,4 @@
|
||||
GenieFramework = "a59fdf5c-6bf0-4f5d-949c-a137c9e2f353"
|
||||
|
||||
[Genie]
|
||||
instantiated_pwd = "/home/julian/Documentos/Cinvestav_2024/Web/Julia/JuliaIMZML_GUI"
|
||||
instantiated_pwd = "/var/home/pixelguy14/Documentos/Julia_imzML_GUI-main/JuliaIMZML_GUI"
|
||||
|
||||
@ -10,6 +10,7 @@ module App
|
||||
using GenieFramework
|
||||
using Pkg
|
||||
using Libz
|
||||
using Plots
|
||||
using julia_mzML_imzML
|
||||
@genietools
|
||||
|
||||
@ -44,12 +45,20 @@ end
|
||||
@in triqProb = 0.0
|
||||
@in Main_Process = false
|
||||
@out indeximg = 0
|
||||
@out indeximgTriq = 0
|
||||
@out lastimg = 0
|
||||
@out lastimgTriq = 0
|
||||
@in ImgPlus = false
|
||||
@in ImgMinus = false
|
||||
@out test = "/.bmp"
|
||||
@in ImgPlusT = false
|
||||
@in ImgMinusT = false
|
||||
@out testT = "/.bmp"
|
||||
@in msg = ""
|
||||
@in msgimg = ""
|
||||
@in msgtriq = ""
|
||||
@out full_route = ""
|
||||
|
||||
|
||||
# == Reactive handlers ==
|
||||
# reactive handlers watch a variable and execute a block of code when
|
||||
# its value changes
|
||||
@ -68,7 +77,9 @@ end
|
||||
end
|
||||
@onchange Nmass begin
|
||||
indeximg = Nmass
|
||||
indeximgTriq = Nmass
|
||||
lastimg = Nmass
|
||||
lastimgTriq = Nmass
|
||||
end
|
||||
|
||||
# the onbutton handler will set the variable to false after the block is executed
|
||||
@ -81,29 +92,26 @@ end
|
||||
spectra = LoadImzml(full_route)
|
||||
msg = "File loaded. Please do not press the start button until confirmation"
|
||||
slice = GetSlice(spectra, Nmass, Tol)
|
||||
if triqProb != 0
|
||||
# SaveBitmap( joinpath( file_route, "TrIQ_$(Int(Nmass)).bmp" ),
|
||||
# TrIQ( slice, Int(Nmass), triqProb ),
|
||||
# ViridisPalette )
|
||||
if triqProb != 0 #if we have TrIQ
|
||||
SaveBitmap( joinpath( "public", "TrIQ_$(Int(Nmass)).bmp" ),
|
||||
TrIQ( slice, Int(Nmass), triqProb ),
|
||||
ViridisPalette )
|
||||
testT = "/TrIQ_$(Int(Nmass)).bmp"#we define the starting value of the images
|
||||
msgtriq = "TrIQ image with the Nmass of $(Int(Nmass))"
|
||||
else
|
||||
# SaveBitmap( joinpath( file_route, "$(Int(Nmass)).bmp" ),
|
||||
# IntQuant( slice ),
|
||||
# ViridisPalette )
|
||||
#test
|
||||
SaveBitmap( joinpath( "public", "$(Int(Nmass)).bmp" ),
|
||||
IntQuant( slice ),
|
||||
ViridisPalette )
|
||||
test = "/$(Int(Nmass)).bmp"#we define the starting value of the images
|
||||
msgimg = "image with the Nmass of $(Int(Nmass))"
|
||||
end
|
||||
msg="The file has been created inside the 'public' folder of the app"
|
||||
else
|
||||
msg="File does not exist"
|
||||
end
|
||||
spectra = nothing
|
||||
spectra = nothing #Important for memory cleaning
|
||||
slice = nothing
|
||||
test = "/$(Int(Nmass)).bmp"#we define the starting value of the images
|
||||
#Important for memory cleaning
|
||||
GC.gc()
|
||||
end
|
||||
@onbutton ImgMinus begin
|
||||
@ -115,7 +123,7 @@ end
|
||||
indeximg = lastimg
|
||||
end
|
||||
test = "/$(indeximg).bmp"
|
||||
msg = "image with the Nmass of $(indeximg)"
|
||||
msgimg = "image with the Nmass of $(indeximg)"
|
||||
lastimg = indeximg
|
||||
end
|
||||
@onbutton ImgPlus begin
|
||||
@ -127,9 +135,34 @@ end
|
||||
indeximg = lastimg
|
||||
end
|
||||
test = "/$(indeximg).bmp"
|
||||
msg = "image with the Nmass of $(indeximg)"
|
||||
msgimg = "image with the Nmass of $(indeximg)"
|
||||
lastimg = indeximg
|
||||
end
|
||||
|
||||
@onbutton ImgMinusT begin
|
||||
indeximgTriq-=1
|
||||
while !isfile("public/TrIQ_$(indeximgTriq).bmp") && indeximgTriq > 0
|
||||
indeximgTriq -= 1
|
||||
end
|
||||
if(indeximgTriq <= 0) #if it doesn't find a lower value image
|
||||
indeximgTriq = lastimgTriq
|
||||
end
|
||||
testT = "/TrIQ_$(indeximgTriq).bmp"
|
||||
msgtriq = "TrIQ image with the Nmass of $(indeximgTriq)"
|
||||
lastimgTriq = indeximgTriq
|
||||
end
|
||||
@onbutton ImgPlusT begin
|
||||
indeximgTriq+=1
|
||||
while !isfile("public/TrIQ_$(indeximgTriq).bmp") && indeximgTriq < 2001
|
||||
indeximgTriq += 1
|
||||
end
|
||||
if(indeximgTriq >= 2001)
|
||||
indeximgTriq = lastimgTriq
|
||||
end
|
||||
testT = "/TrIQ_$(indeximgTriq).bmp"
|
||||
msgtriq = "TrIQ image with the Nmass of $(indeximgTriq)"
|
||||
lastimgTriq = indeximgTriq
|
||||
end
|
||||
end
|
||||
# == Pages ==
|
||||
# register a new route and the page that will be loaded on access
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
</header>
|
||||
<!--<q-file v-model="Juliapkg" filled="" label="Insert the file where 'julia_mzML_imzML' is located" accept=".txt"></q-file>-->
|
||||
<h6>Please make sure the ibd file is located in the same directory as the imzML file</h6>
|
||||
<h6>Once a directory is loaded, you have to restart the app in order to insert a new one</h6>
|
||||
<h6>Once an image is loaded, reload the page to clear possible memory usage</h6>
|
||||
<div class="row">
|
||||
<div class="st-col col-12 col-sm st-module">
|
||||
<div class="row">
|
||||
@ -41,6 +41,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p>{{msg}}</p>
|
||||
<plotly id="i1j1o" data="plotdata"></plotly>
|
||||
</div>
|
||||
<div class="st-col col-12 col-sm st-module">
|
||||
<div class="row">
|
||||
@ -49,7 +50,12 @@
|
||||
<p></p>
|
||||
<q-btn id="ijhjl-2" color="primary" icon="arrow_back" label="Previous" v-on:click="ImgMinus = true"></q-btn>
|
||||
<q-btn id="i3zt1" color="primary" icon="arrow_forward" label="Next" v-on:click="ImgPlus = true"></q-btn>
|
||||
<q-img id="i6e3p" src="test"></q-img>
|
||||
<q-img id="i6e3p" :src="test"></q-img>
|
||||
<p>{{msgimg}}</p>
|
||||
<q-btn id="ijhjl-2-2" color="primary" icon="arrow_back" label="Previous" v-on:click="ImgMinusT = true"></q-btn>
|
||||
<q-btn id="i3zt1-2" color="primary" icon="arrow_forward" label="Next" v-on:click="ImgPlusT = true"></q-btn>
|
||||
<q-img id="i6e3p-2" :src="testT"></q-img>
|
||||
<p>{{msgtriq}}</p>
|
||||
<!--<q-img id="i6e3p-2" src="/Borrador_Julia_GUI.jpeg"></q-img>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user