aux platform
This commit is contained in:
30
cmd/extract.go
Normal file
30
cmd/extract.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"starwiz.cn/sjy01/preprocessing/extract"
|
||||
)
|
||||
|
||||
var extractCmd = &cobra.Command{
|
||||
Use: "extract",
|
||||
Short: "Extract data from raw data files",
|
||||
Long: `Extract data from raw data files`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
params := extract.Params{
|
||||
InputData: "demo/4545.dat",
|
||||
OutputPath: "demo/output",
|
||||
TempPath: "demo/temp",
|
||||
DataId: "004545",
|
||||
}
|
||||
p := extract.NewExtractor(¶ms)
|
||||
p.ExtractAosData()
|
||||
dats, _ := p.ExtractOriginalImageData()
|
||||
for _, d := range dats {
|
||||
p.SeprateAuxAndImgData(d)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(extractCmd)
|
||||
}
|
||||
Reference in New Issue
Block a user